done #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Label PRs | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
label_pr: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- name: Label Merged PR | |
if: github.event.pull_request.merged == true | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const pr = context.payload.pull_request; | |
// Add labels to merged pull requests | |
await github.rest.issues.addLabels({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: pr.number, | |
labels: ['gssoc-ext', 'hacktoberfest-accepted'] | |
}); |