Skip to content

Commit

Permalink
Merge branch 'main' into FixStatusCheckWhenRuleMatchMultiple
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind authored Mar 7, 2024
2 parents 16dce07 + c72e1a7 commit 1f4b607
Show file tree
Hide file tree
Showing 40 changed files with 289 additions and 185 deletions.
10 changes: 7 additions & 3 deletions models/activities/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,14 @@ 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
ret := strings.SplitN(a.Content, "|", 3)
for len(ret) < 3 {
ret = append(ret, "")
}
return ret
}

// GetIssueTitle returns the title of first issue associated with the action.
Expand Down
2 changes: 1 addition & 1 deletion public/assets/img/svg/gitea-bitbucket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/assets/img/svg/gitea-facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/assets/img/svg/gitea-jetbrains.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/assets/img/svg/gitea-microsoftonline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/assets/img/svg/gitea-open-with-jetbrains.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/assets/img/svg/gitea-open-with-vscode.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/assets/img/svg/gitea-open-with-vscodium.svg

This file was deleted.

1 change: 1 addition & 0 deletions public/assets/img/svg/gitea-vscode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/assets/img/svg/gitea-vscodium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions routers/api/v1/repo/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"code.gitea.io/gitea/routers/api/v1/utils"
"code.gitea.io/gitea/services/context"
"code.gitea.io/gitea/services/convert"
files_service "code.gitea.io/gitea/services/repository/files"
commitstatus_service "code.gitea.io/gitea/services/repository/commitstatus"
)

// NewCommitStatus creates a new CommitStatus
Expand Down Expand Up @@ -64,7 +64,7 @@ func NewCommitStatus(ctx *context.APIContext) {
Description: form.Description,
Context: form.Context,
}
if err := files_service.CreateCommitStatus(ctx, ctx.Repo.Repository, ctx.Doer, sha, status); err != nil {
if err := commitstatus_service.CreateCommitStatus(ctx, ctx.Repo.Repository, ctx.Doer, sha, status); err != nil {
ctx.Error(http.StatusInternalServerError, "CreateCommitStatus", err)
return
}
Expand Down
Loading

0 comments on commit 1f4b607

Please sign in to comment.