Skip to content

done

done #24

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']
});