-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.23 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
37
38
39
40
41
42
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
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
reviewers: [],
team_reviewers: ['NotMyFault-org/dummy']
});