File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Check if a PR has a valid Issue
1+ name : PR has a valid Issue?
22
33on :
44 pull_request_target :
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"
You can’t perform that action at this time.
0 commit comments