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 37
37
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38
38
run : |
39
39
./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):
44
44
45
45
print (f"pr: { pr .html_url } " )
46
46
47
+ fail = False
48
+
47
49
for label in pr .get_labels ():
48
50
print (f"label: { label .name } " )
49
51
50
52
if label .name in DNM_LABELS :
51
53
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 )
54
63
55
64
56
65
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments