Skip to content

Commit 2bbf7b8

Browse files
committed
ci: move PR body check to a different workflow
Move PR body check to a workflow that monitors editing of PRs. Avoids rerunnin compliance check and other heavy weights workflows on just an edit of the PR body. Signed-off-by: Anas Nashif <[email protected]>
1 parent ffcfb43 commit 2bbf7b8

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

.github/workflows/compliance.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ jobs:
7070
west config manifest.group-filter -- +ci,-optional
7171
west update -o=--depth=1 -n 2>&1 1> west.update.log || west update -o=--depth=1 -n 2>&1 1> west.update2.log
7272
73-
- name: Check for PR description
74-
if: ${{ github.event.pull_request.body == '' }}
75-
continue-on-error: true
76-
id: pr_description
77-
run: |
78-
echo "Pull request description cannot be empty."
79-
exit 1
80-
8173
- name: Run Compliance Tests
8274
continue-on-error: true
8375
id: compliance

.github/workflows/do_not_merge.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
name: Do Not Merge
1+
name: PR Metadata Check
22

33
on:
44
pull_request:
5-
types: [synchronize, opened, reopened, labeled, unlabeled]
5+
types:
6+
- synchronize
7+
- opened
8+
- reopened
9+
- labeled
10+
- unlabeled
11+
- edited
612

713
permissions:
814
contents: read
@@ -22,3 +28,13 @@ jobs:
2228
echo "Pull request is labeled as 'DNM', 'TSC', 'Architecture Review' or 'dev-review'."
2329
echo "This workflow fails so that the pull request cannot be merged."
2430
exit 1
31+
32+
empty_pr_description:
33+
if: ${{ github.event.pull_request.body == '' }}
34+
name: PR Description
35+
runs-on: ubuntu-22.04
36+
steps:
37+
- name: Check for PR description
38+
run: |
39+
echo "Pull request description cannot be empty."
40+
exit 1

0 commit comments

Comments
 (0)