-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathaction.yml
74 lines (68 loc) · 2.36 KB
/
action.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
name: pull-request-responsibility
description: Github-native automation for pull requests
branding:
icon: zap
color: gray-dark
inputs:
actions:
description: >
The set of actions to be run on pull requests. If not provided, only
"assign" will be run by default.
Provide a comma-separated list without spaces. Examples:
request,assign,merge,copy-labels-linked
assign,copy-labels-linked
Default: "assign"
required: false
default: 'assign'
token:
description: >
A Github access token. Needed in order to read data from and write to
Github.
In most cases, the GITHUB_TOKEN will suffice; however, to use the full
feature set of the "request" action, a properly-scoped PAT is required.
required: false
default: ''
reviewers:
description: >
The Github team to pull reviewers from. Must be a valid team name from the
repository's parent organization. REQUIRED to use the "request" action.
For example: "reviewers"
required: false
default: ''
num_to_request:
description: >
The number of reviewers to request on PRs. Provide an integer. REQUIRED to
use the "request" action.
required: false
default: 0
runs:
using: "composite"
steps:
- run: python3 -m pip install -qqq --upgrade pip
shell: bash
- run: python3 -m pip install -qqq githubgql
shell: bash
- run: >
if [[ "${{ inputs.actions }}" =~ (^|,)"merge"(,|$) ]]; then
echo " --- MERGE --- " && $GITHUB_ACTION_PATH/src/merge "${{ inputs.token }}"
fi
shell: bash
- run: >
if [[ "${{ inputs.actions }}" =~ (^|,)"copy-labels-linked"(,|$) ]]; then
echo " --- COPY-LABELS-LINKED --- " && $GITHUB_ACTION_PATH/src/copy-labels-linked "${{ inputs.token }}"
fi
shell: bash
- run: >
if [[ "${{ inputs.actions }}" =~ (^|,)"request"(,|$) ]]; then
echo " --- REQUEST --- " && $GITHUB_ACTION_PATH/src/request "${{ inputs.token }}" "${{ inputs.reviewers }}" "${{ inputs.num_to_request }}"
fi
shell: bash
- run: >
if [[ "${{ inputs.actions }}" =~ (^|,)"assign"(,|$) ]]; then
echo " --- ASSIGN --- " && $GITHUB_ACTION_PATH/src/assign "${{ inputs.token }}"
fi
shell: bash
- run: bash -c "env | sort"
shell: bash
- run: cat $GITHUB_EVENT_PATH
shell: bash