Skip to content

Update lts.yaml

Update lts.yaml #6

Workflow file for this run

name: PR Actions for LTS Branch
on:
pull_request:
types:
- opened
- synchronize
jobs:
handle_pr:
runs-on: ubuntu-latest
steps:
- name: Check if PR target branch starts with stable-
if: startsWith(github.event.pull_request.base.ref, 'stable-')
run: echo "IS_LTS=true" >> $GITHUB_ENV
- name: Check if PR targets LTS branch
if: env.IS_LTS == 'true'
uses: actions/github-script@v6
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']
});
- name: Request review from jenkins/release
if: env.IS_LTS == 'true'
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: process.env.PR_NUMBER,
reviewers: [],
team_reviewers: ['NotMyFault-org/dummy']
});