forked from forgejo/forgejo
Backport #23683 by @sillyguodong Fix: #23674 If the type of `hook_event` is `pull_request_sync`, also need to insert a record of `commit_status` into DB. Because `pull_request` event and `pull_request_sync` event have the same payload, so the code is reusable. Screenshot:  Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
This commit is contained in:
parent
1faa39b44c
commit
a9b4aa4cc4
2 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ func CreateCommitStatus(ctx context.Context, job *actions_model.ActionRunJob) er
|
|||
|
||||
sha = payload.HeadCommit.ID
|
||||
creatorID = payload.Pusher.ID
|
||||
case webhook_module.HookEventPullRequest:
|
||||
case webhook_module.HookEventPullRequest, webhook_module.HookEventPullRequestSync:
|
||||
payload, err := run.GetPullRequestEventPayload()
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetPullRequestEventPayload: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue