Skip to content

Commit

Permalink
chore(.github/workflows): add label after maintainer merge (#10483)
Browse files Browse the repository at this point in the history
By automatically adding a label,
it is easier to find PRs that have been maintainer merged
but slipped through some crack.
  • Loading branch information
jcommelin authored and dagurtomas committed Mar 22, 2024
1 parent 43c65e6 commit 1ab553e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/maintainer_merge_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ jobs:
issue-number: ${{ github.event.issue.number }}
body: |
🚀 Pull request has been placed on the maintainer queue by ${{ github.event.comment.user.login }}.
- name: Add label to PR
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { owner, repo, number: issue_number } = context.issue;
await github.rest.issues.addLabels({ owner, repo, issue_number, labels: ['maintainer-merge'] });
7 changes: 7 additions & 0 deletions .github/workflows/maintainer_merge_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ jobs:
issue-number: ${{ github.event.pull_request.number }}
body: |
🚀 Pull request has been placed on the maintainer queue by ${{ github.event.review.user.login }}.
- name: Add label to PR
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { owner, repo, number: issue_number } = context.issue;
await github.rest.issues.addLabels({ owner, repo, issue_number, labels: ['maintainer-merge'] });
7 changes: 7 additions & 0 deletions .github/workflows/maintainer_merge_review_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ jobs:
issue-number: ${{ github.event.pull_request.number }}
body: |
🚀 Pull request has been placed on the maintainer queue by ${{ github.event.comment.user.login }}.
- name: Add label to PR
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { owner, repo, number: issue_number } = context.issue;
await github.rest.issues.addLabels({ owner, repo, issue_number, labels: ['maintainer-merge'] });

0 comments on commit 1ab553e

Please sign in to comment.