This commit is contained in:
Lunny Xiao
2022-10-16 23:23:47 +08:00
committed by Jason Song
parent 482832da76
commit f75a4abc5d
6 changed files with 26 additions and 17 deletions

View File

@ -86,7 +86,7 @@ func notify(repo *repo_model.Repository, doer *user_model.User, payload, ref str
for id, content := range workflows {
run := bots_model.Run{
Name: commit.Message(),
Title: commit.Message(),
RepoID: repo.ID,
WorkflowID: id,
TriggerUserID: doer.ID,
@ -96,6 +96,9 @@ func notify(repo *repo_model.Repository, doer *user_model.User, payload, ref str
EventPayload: payload,
Status: core.StatusPending,
}
if len(run.Title) > 255 {
run.Title = run.Title[:255]
}
jobs, err := jobparser.Parse(content) // TODO: parse with options
if err != nil {
log.Error("jobparser.Parse: %v", err)