-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
44 lines (39 loc) · 1.26 KB
/
pr-18.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
43
44
name: Set reviewer for v18
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- "18.0"
push:
branches:
- "18.0"
jobs:
pr18:
runs-on: ubuntu-latest
#env:
# GH_TOKEN: ${{ github.token }}
# GH_TOKENS: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install GitHub CLI
run: |
sudo apt update
sudo apt install gh -y
- name: Assign reviewer
env:
#REVIEWER: "eldy,lvessiller-opendsi,rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer
REVIEWER: "rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer
run: |
echo "Run action by ${{ github.actor }}"
echo "github.token=${{ github.token }}"
echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH"
echo Get the pr_number
pr_number=$(jq --raw-output .number < $GITHUB_EVENT_PATH)
echo "pr_number=$pr_number"
echo Authenticate login gh
gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
echo Set the reviewere
gh pr edit $pr_number --add-reviewer "$REVIEWER"
continue-on-error: true