aboutsummaryrefslogtreecommitdiffstats
path: root/services/actions
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2025-01-08 02:58:47 +0900
committerGitHub <noreply@github.com>2025-01-08 01:58:47 +0800
commit32d45ee0696cd8d489f5ee36b5fc43eb2ff9460f (patch)
treef2c81f4b5d93229373491f0d19855badc6481c18 /services/actions
parent0d7d2ed39d0c0435cdc6403ee7764850154dca5a (diff)
downloadgitea-32d45ee0696cd8d489f5ee36b5fc43eb2ff9460f.tar.gz
gitea-32d45ee0696cd8d489f5ee36b5fc43eb2ff9460f.zip
Update status check for all supported on.pull_request.types in Gitea (#33117)
Thanks @Zettat123 Follow #33116 Fix #33051 on.pull_request.types doc: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request on.pull_request.types added in this PR: ``` assigned, unassigned, review_requested, review_request_removed, milestoned, demilestoned, labeled, unlabeled ``` unsupported types in Gitea: ``` // Unsupported activity types: // converted_to_draft, ready_for_review, locked, unlocked, auto_merge_enabled, auto_merge_disabled, enqueued, dequeued ``` TODO: - [x] add test
Diffstat (limited to 'services/actions')
-rw-r--r--services/actions/commit_status.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/actions/commit_status.go b/services/actions/commit_status.go
index 7f52c9d31b..94ab89a3b7 100644
--- a/services/actions/commit_status.go
+++ b/services/actions/commit_status.go
@@ -54,7 +54,13 @@ func createCommitStatus(ctx context.Context, job *actions_model.ActionRunJob) er
return fmt.Errorf("head commit is missing in event payload")
}
sha = payload.HeadCommit.ID
- case webhook_module.HookEventPullRequest, webhook_module.HookEventPullRequestSync:
+ case // pull_request
+ webhook_module.HookEventPullRequest,
+ webhook_module.HookEventPullRequestSync,
+ webhook_module.HookEventPullRequestAssign,
+ webhook_module.HookEventPullRequestLabel,
+ webhook_module.HookEventPullRequestReviewRequest,
+ webhook_module.HookEventPullRequestMilestone:
if run.TriggerEvent == actions_module.GithubEventPullRequestTarget {
event = "pull_request_target"
} else {