Commit 2447b0d 1 parent c8003e1 commit 2447b0d Copy full SHA for 2447b0d
File tree 4 files changed +37
-0
lines changed
4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : lgtm command
2
+ on :
3
+ repository_dispatch :
4
+ types : [lgtm-command]
5
+ jobs :
6
+ lgtm :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : mkimuram/test-gha/plugins/lgtm@main
Original file line number Diff line number Diff line change 18
18
unassign
19
19
kind
20
20
remove-kind
21
+ lgtm
21
22
retest
22
23
meow
23
24
woof
Original file line number Diff line number Diff line change
1
+ name : ' Lgtm'
2
+ description : ' Add lgtm label to pr'
3
+ runs :
4
+ using : " composite"
5
+ steps :
6
+ - name : Add lgtm label to pr
7
+ shell : bash
8
+ run : |
9
+ label="lgtm"
10
+ # lgtm is only for pr
11
+ [ -n "${PR_NUM}" ] || false
12
+ # TODO: Check if actor has right to lgtm
13
+ # If no args add lgtm label
14
+ if [ -z "${ARGS}" ];then
15
+ echo "{\"labels\":[\"${label}\"]}" | \
16
+ gh api repos/${REPO}/issues/${ISSUE_NUM}/labels -X POST --input -
17
+ # If args is cancel remove lgtm label
18
+ elif [[ "${ARGS}" == "cancel" ]];then
19
+ gh api repos/${REPO}/issues/${ISSUE_NUM}/labels/${label} -X DELETE
20
+ fi
21
+ env :
22
+ REPO : ${{ github.repository }}
23
+ ISSUE_NUM : ${{ github.event.client_payload.github.payload.issue.number }}
24
+ PR_NUM : ${{ github.event.client_payload.pull_request.number }}
25
+ ARGS : ${{ github.event.client_payload.slash_command.args.unnamed.all }}
26
+ GITHUB_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change
1
+ | `/lgtm` | `/lgtm [cancel] ` | Adds or removes the 'lgtm' label which is typically used to gate merging. |
You can’t perform that action at this time.
0 commit comments