Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Mar 6, 2024
1 parent 5cddab4 commit da1bf58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions models/activities/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,10 @@ func (a *Action) GetCreate() time.Time {
return a.CreatedUnix.AsTime()
}

// GetIssueInfos returns a list of issues associated with
// the action.
// GetIssueInfos returns a list of associated information with the action.
func (a *Action) GetIssueInfos() []string {
return strings.SplitN(a.Content, "|", 3)
// make sure it always returns 3 elements, because there are some access to the a[1] and a[2] without checking the length
return strings.SplitN(a.Content+"||", "|", 3)
}

// GetIssueTitle returns the title of first issue associated with the action.
Expand Down

0 comments on commit da1bf58

Please sign in to comment.