Skip to content

Commit

Permalink
Enable support for workflow dispatch events
Browse files Browse the repository at this point in the history
These events include the same information as pull request events
if they are triggered in the context of a PR.

If they are triggered as a standalone workflow run, there will be no
associated PRs to find matching reviews and they will remain unapproved.

Change-type: patch
Signed-off-by: Kyle Harding <[email protected]>
  • Loading branch information
klutchell committed Dec 30, 2024
1 parent 2994754 commit e5f10ad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/handlers/deployment-protection-rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ export async function handleDeploymentProtectionRule(
return;
}

if (!['pull_request', 'pull_request_target', 'push'].includes(event)) {
if (
![
'pull_request',
'pull_request_target',
'push',
'workflow_dispatch',
].includes(event)
) {
context.log.info(
'Ignoring unsupported deployment protection rule event: %s',
event,
Expand Down

0 comments on commit e5f10ad

Please sign in to comment.