Skip to content

Commit e243df0

Browse files
clubandersonclaude
andcommitted
ci: add approved label when /approve is commented
Adds a GitHub Actions job that automatically adds the "approved" label to PRs when someone comments /approve on them. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Andrew Anderson <andy@clubanderson.com>
1 parent 2963cc7 commit e243df0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/prow-github.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,19 @@ jobs:
3535
/hold
3636
/cc
3737
/uncc"
38+
39+
# Add approved label when /approve is commented
40+
add-approved-label:
41+
runs-on: ubuntu-latest
42+
if: github.event.issue.pull_request && contains(github.event.comment.body, '/approve')
43+
steps:
44+
- name: Add approved label
45+
uses: actions/github-script@v7
46+
with:
47+
script: |
48+
await github.rest.issues.addLabels({
49+
owner: context.repo.owner,
50+
repo: context.repo.repo,
51+
issue_number: context.issue.number,
52+
labels: ['approved']
53+
});

0 commit comments

Comments
 (0)