mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 05:13:05 +02:00
fix: Invalid UTF-8 commit messages in JSON API responses (#37542)
This commit is contained in:
1 parent
2200ed7499
commit
c9b9e376fb
54 files changed
+221
-215
No files matched your search
@@ -5,7 +5,6 @@ package actions
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
actions_model "code.gitea.io/gitea/models/actions"
|
||||
"code.gitea.io/gitea/models/perm"
|
||||
@@ -98,7 +97,7 @@ func DispatchActionWorkflow(ctx reqctx.RequestContext, doer *user_model.User, re
|
||||
var entry *git.TreeEntry
|
||||
|
||||
run := &actions_model.ActionRun{
|
||||
Title: strings.SplitN(runTargetCommit.CommitMessage, "\n", 2)[0],
|
||||
Title: runTargetCommit.MessageTitle(),
|
||||
RepoID: repo.ID,
|
||||
Repo: repo,
|
||||
OwnerID: repo.OwnerID,
|
||||
|
||||
Reference in new issue
Block a user