| 1234567891011121314151617181920212223 |
- name: Label PRs targeting LTS branches
- on: [pull_request_target]
- permissions:
- pull-requests: write
- jobs:
- label:
- runs-on: ubuntu-latest
- steps:
- - name: Check if PR targets LTS branch
- if: startsWith(github.event.pull_request.base.ref, 'stable-')
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- github.rest.issues.addLabels({
- owner: context.payload.repository.owner.login,
- repo: context.payload.repository.name,
- issue_number: context.payload.pull_request.number,
- labels: ['into-lts']
- });
|