-
Notifications
You must be signed in to change notification settings - Fork 16
77 lines (62 loc) · 2.28 KB
/
submission_review.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: MHub Contribution Magic Keywords
on:
issue_comment:
types: [created, edited]
permissions:
pull-requests: write
jobs:
request_review:
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/review')}}
name: Request Review
runs-on: [ubuntu-latest]
steps:
- name: Add Request Review Label
uses: actions-ecosystem/action-add-labels@v1
with:
labels: REQUEST REVIEW
request_test:
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/test') }}
name: Request Test
runs-on: [ubuntu-latest]
steps:
# Checkout the latest code from the repo
- name: Checkout repo
uses: actions/checkout@v4
# Setup which version of Python to use
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
# install python dependencies
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install jsonschema PyYAML
# Display the Python version being used
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Run check comment script
id: check_comment
env:
COMMENT: ${{ github.event.comment.body }}
run: python .github/scripts/comment_check.py "$COMMENT"
- name: Add TEST REQUESTED Label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ steps.check_comment.outputs.test_report == 'passed' }}
with:
labels: TEST REQUESTED
- name: Remove INVALID TEST REQUEST Label
uses: actions-ecosystem/action-remove-labels@v1
if: ${{ steps.check_comment.outputs.test_report == 'passed' }}
with:
labels: INVALID TEST REQUEST
- name: Remove TEST REQUESTED Label
uses: actions-ecosystem/action-remove-labels@v1
if: ${{ steps.check_comment.outputs.test_report == 'failed' }}
with:
labels: TEST REQUESTED
- name: Add INVALID TEST REQUEST Label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ steps.check_comment.outputs.test_report == 'failed' }}
with:
labels: INVALID TEST REQUEST