-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.06 KB
/
lts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: PR Actions for LTS Branch
on:
pull_request:
types:
- opened
- synchronize
jobs:
handle_pr:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- 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'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr edit ${{ github.event.pull_request.number }} --add-reviewer NotMyFault-org/dummy