Skip to content

Commit 821ae33

Browse files
authored
Update checker.yml
1 parent e9e90e6 commit 821ae33

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/checker.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check if a PR has a valid Issue
1+
name: PR has a valid Issue?
22

33
on:
44
pull_request_target:
@@ -17,3 +17,21 @@ jobs:
1717
with:
1818
prbody: ${{ github.event.pull_request.body }}
1919
prurl: ${{ github.event.pull_request.url }}
20+
21+
- name: PR has a valid Issue
22+
if: ${{ steps.validator.outputs.valid == 1 }}
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
PRNUM: ${{ github.event.pull_request.number }}
26+
run: |
27+
gh pr edit $PRNUM --add-label "PR:Ready-to-Review"
28+
gh pr edit $PRNUM --remove-label "PR:No-Issue"
29+
30+
- name: PR has no valid Issue
31+
if: ${{ steps.validator.outputs.valid == 0 }}
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
PRNUM: ${{ github.event.pull_request.number }}
35+
run: |
36+
gh pr comment $PRNUM --body "PR is not linked to any issue, please make the corresponding changes in the body."
37+
gh pr edit $PRNUM --add-label "PR:No-Issue"

0 commit comments

Comments
 (0)