-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (34 loc) · 1.05 KB
/
pull-request.yml
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: Pull Request
on: [pull_request]
jobs:
prchecks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Configure pre-commit to skip branch name validation
run: |
echo "SKIP=branch-name-validation" >> $GITHUB_ENV
- uses: pre-commit/[email protected]
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: run unit tests
run: ./scripts/test-unit.sh
assignAuthor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Assign PR to Creator
run: |
if [ "$PR_AUTHOR_TYPE" != "Bot" ]
then
gh pr edit $PRNUM --add-assignee $PR_AUTHOR
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRNUM: ${{ github.event.pull_request.number }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
PR_AUTHOR_TYPE: ${{ github.event.pull_request.user.type }}