Skip to content

Commit 7b1e610

Browse files
nashifkartben
authored andcommitted
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 66fa049 commit 7b1e610

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
@@ -65,14 +65,6 @@ jobs:
6565
west config manifest.group-filter -- +ci,-optional
6666
west update -o=--depth=1 -n 2>&1 1> west.update.log || west update -o=--depth=1 -n 2>&1 1> west.update2.log
6767
68-
- name: Check for PR description
69-
if: ${{ github.event.pull_request.body == '' }}
70-
continue-on-error: true
71-
id: pr_description
72-
run: |
73-
echo "Pull request description cannot be empty."
74-
exit 1
75-
7668
- name: Run Compliance Tests
7769
continue-on-error: true
7870
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)