File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 3737 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3838 run : |
3939 ./scripts/ci/do_not_merge.py -p "${{ github.event.pull_request.number }}"
40-
41- empty_pr_description :
42- if : ${{ github.event.pull_request.body == '' }}
43- name : PR Description
44- runs-on : ubuntu-24.04
45- steps :
46- - name : Check for PR description
47- run : |
48- echo "Pull request description cannot be empty."
49- exit 1
Original file line number Diff line number Diff line change @@ -44,13 +44,22 @@ def main(argv):
4444
4545 print (f"pr: { pr .html_url } " )
4646
47+ fail = False
48+
4749 for label in pr .get_labels ():
4850 print (f"label: { label .name } " )
4951
5052 if label .name in DNM_LABELS :
5153 print (f"Pull request is labeled as \" { label .name } \" ." )
52- print ("This workflow fails so that the pull request cannot be merged." )
53- sys .exit (1 )
54+ fail = True
55+
56+ if not pr .body :
57+ print ("Pull request is description is empty." )
58+ fail = True
59+
60+ if fail :
61+ print ("This workflow fails so that the pull request cannot be merged." )
62+ sys .exit (1 )
5463
5564
5665if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments