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
1111## Output
1212- ` passed ` : boolean
1313
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+
1423## Example workflow file
1524``` yml
1625name : 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"
33inputs :
44 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"
66 required : false
77 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"
99 required : false
1010 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"
1212 required : false
1313 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"
1515 required : false
1616 githubToken :
17- description : ' The Github secret token to access PR check API'
17+ description : " The Github secret token to access PR check API"
1818 required : true
1919outputs :
2020 passed :
21- description : ' Have the provided labels passed all tests?'
21+ description : " Have the provided labels passed all tests?"
2222runs :
23- using : ' node12'
24- main : ' index.js'
23+ using : " node12"
24+ main : " index.js"
2525branding :
26- icon : ' tag'
27- color : ' blue'
26+ icon : " tag"
27+ color : " blue"
You can’t perform that action at this time.
0 commit comments