File tree Expand file tree Collapse file tree 3 files changed +44
-12
lines changed Expand file tree Collapse file tree 3 files changed +44
-12
lines changed Original file line number Diff line number Diff line change
1
+ name : Labels Check
2
+
3
+ on :
4
+ pull_request :
5
+ types : [opened, labeled, unlabeled, synchronize]
6
+
7
+ jobs :
8
+ QA-check :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v3
12
+ - uses : ./
13
+ with :
14
+ hasSome : QA:tested,QA:skipped
15
+ githubToken : ${{ secrets.GITHUB_TOKEN }}
16
+ Do_not_merge-check :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@v3
20
+ - uses : ./
21
+ with :
22
+ hasNone : do not merge,blocked
23
+ githubToken : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -11,6 +11,15 @@ Github Action to check if a PR's labels pass the specified rules
11
11
## Output
12
12
- ` passed ` : boolean
13
13
14
+ ## Permissions
15
+ If you have customized permissions for your GitHub token you will need to manually add these permissions for this action:
16
+ ```
17
+ permissions:
18
+ pull-requests: read
19
+ checks: write
20
+ ```
21
+ More info on the syntax: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions
22
+
14
23
## Example workflow file
15
24
``` yml
16
25
name : Labels Check
Original file line number Diff line number Diff line change 1
- name : ' PR labels checker'
2
- description : ' Checks PR labels for specified rules'
1
+ name : " PR labels checker"
2
+ description : " Checks PR labels for specified rules"
3
3
inputs :
4
4
hasSome :
5
- description : ' Comma separated list of labels, PR needs at least of them'
5
+ description : " Comma separated list of labels, PR needs at least of them"
6
6
required : false
7
7
hasAll :
8
- description : ' Comma separated list of labels, PR needs all of them'
8
+ description : " Comma separated list of labels, PR needs all of them"
9
9
required : false
10
10
hasNone :
11
- description : ' Comma separated list of labels, PR must not have any of them'
11
+ description : " Comma separated list of labels, PR must not have any of them"
12
12
required : false
13
13
hasNotAll :
14
- description : ' Comma separated list of labels, PR must not have all of them'
14
+ description : " Comma separated list of labels, PR must not have all of them"
15
15
required : false
16
16
githubToken :
17
- description : ' The Github secret token to access PR check API'
17
+ description : " The Github secret token to access PR check API"
18
18
required : true
19
19
outputs :
20
20
passed :
21
- description : ' Have the provided labels passed all tests?'
21
+ description : " Have the provided labels passed all tests?"
22
22
runs :
23
- using : ' node12'
24
- main : ' index.js'
23
+ using : " node12"
24
+ main : " index.js"
25
25
branding :
26
- icon : ' tag'
27
- color : ' blue'
26
+ icon : " tag"
27
+ color : " blue"
You can’t perform that action at this time.
0 commit comments