Skip to content

Commit cae73af

Browse files
committed
support label event
1 parent 3c1c508 commit cae73af

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

models/actions/run.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ func (run *ActionRun) GetPushEventPayload() (*api.PushPayload, error) {
154154
}
155155

156156
func (run *ActionRun) GetPullRequestEventPayload() (*api.PullRequestPayload, error) {
157-
if run.Event == webhook_module.HookEventPullRequest || run.Event == webhook_module.HookEventPullRequestSync {
157+
if run.Event == webhook_module.HookEventPullRequest ||
158+
run.Event == webhook_module.HookEventPullRequestSync ||
159+
run.Event == webhook_module.HookEventPullRequestLabel {
158160
var payload api.PullRequestPayload
159161
if err := json.Unmarshal([]byte(run.EventPayload), &payload); err != nil {
160162
return nil, err

services/actions/commit_status.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ func createCommitStatus(ctx context.Context, job *actions_model.ActionRunJob) er
5454
return fmt.Errorf("head commit is missing in event payload")
5555
}
5656
sha = payload.HeadCommit.ID
57-
case webhook_module.HookEventPullRequest, webhook_module.HookEventPullRequestSync:
57+
case webhook_module.HookEventPullRequest,
58+
webhook_module.HookEventPullRequestSync,
59+
webhook_module.HookEventPullRequestLabel:
5860
if run.TriggerEvent == actions_module.GithubEventPullRequestTarget {
5961
event = "pull_request_target"
6062
} else {

0 commit comments

Comments
 (0)