label-lts-prs.yml 713 B

1234567891011121314151617181920212223
  1. name: Label PRs targeting LTS branches
  2. on: [pull_request_target]
  3. permissions:
  4. pull-requests: write
  5. jobs:
  6. label:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - name: Check if PR targets LTS branch
  10. if: startsWith(github.event.pull_request.base.ref, 'stable-')
  11. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
  12. with:
  13. github-token: ${{ secrets.GITHUB_TOKEN }}
  14. script: |
  15. github.rest.issues.addLabels({
  16. owner: context.payload.repository.owner.login,
  17. repo: context.payload.repository.name,
  18. issue_number: context.payload.pull_request.number,
  19. labels: ['into-lts']
  20. });