|
|
@@ -101,7 +101,6 @@ type ActionShow struct { |
|
|
|
RefName string |
|
|
|
IssueInfos []string |
|
|
|
CommentLink string |
|
|
|
IssueTitle string |
|
|
|
Cloudbrain *CloudbrainShow4Action |
|
|
|
} |
|
|
|
|
|
|
@@ -246,9 +245,8 @@ func (a *Action) ToShow() *ActionShow { |
|
|
|
actionShow.Content = a.Content |
|
|
|
actionShow.RefName = a.RefName |
|
|
|
|
|
|
|
if strings.Contains(a.Content, "|") { |
|
|
|
if strings.Contains(a.Content, "|") && a.IsIssueAction() { |
|
|
|
actionShow.IssueInfos = a.GetIssueInfos() |
|
|
|
actionShow.IssueTitle = a.GetIssueTitle() |
|
|
|
} |
|
|
|
|
|
|
|
if a.Repo != nil { |
|
|
@@ -390,6 +388,24 @@ func (a *Action) IsCloudbrainAction() bool { |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
func (a *Action) IsIssueAction() bool { |
|
|
|
switch a.OpType { |
|
|
|
case ActionCreateIssue, |
|
|
|
ActionCloseIssue, |
|
|
|
ActionClosePullRequest, |
|
|
|
ActionReopenIssue, |
|
|
|
ActionReopenPullRequest, |
|
|
|
ActionCommentPull, |
|
|
|
ActionCommentIssue, |
|
|
|
ActionCreatePullRequest, |
|
|
|
ActionApprovePullRequest, |
|
|
|
ActionRejectPullRequest, |
|
|
|
ActionMergePullRequest: |
|
|
|
return true |
|
|
|
} |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
// GetFeedsOptions options for retrieving feeds |
|
|
|
type GetFeedsOptions struct { |
|
|
|
RequestedUser *User // the user we want activity for |
|
|
|