mirror of
https://github.com/go-gitea/gitea.git
synced 2026-01-16 17:10:36 +00:00
Fix some trivial problems (#36336)
1. correctly parse git protocol's "OldCommit NewCommit RefName" line, it should be explicitly split by space 2. add missing "return" in CreatePullRequest 3. add comments for "/user.keys" and "/user.gpg" outputs 4. trim space for the "commit status context name" to follow the same behavior of git_model.NewCommitStatus
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
actions_model "code.gitea.io/gitea/models/actions"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
@@ -129,6 +130,7 @@ func createCommitStatus(ctx context.Context, repo *repo_model.Repository, event,
|
||||
runName = wfs[0].Name
|
||||
}
|
||||
ctxName := fmt.Sprintf("%s / %s (%s)", runName, job.Name, event)
|
||||
ctxName = strings.TrimSpace(ctxName) // git_model.NewCommitStatus also trims spaces
|
||||
state := toCommitStatus(job.Status)
|
||||
if statuses, err := git_model.GetLatestCommitStatus(ctx, repo.ID, commitID, db.ListOptionsAll); err == nil {
|
||||
for _, v := range statuses {
|
||||
|
||||
Reference in New Issue
Block a user