Skip to content

Commit dec300d

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 ecb1139 commit dec300d

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
@@ -67,14 +67,6 @@ jobs:
6767
west config manifest.group-filter -- +ci,-optional
6868
west update -o=--depth=1 -n 2>&1 1> west.update.log || west update -o=--depth=1 -n 2>&1 1> west.update2.log
6969
70-
- name: Check for PR description
71-
if: ${{ github.event.pull_request.body == '' }}
72-
continue-on-error: true
73-
id: pr_description
74-
run: |
75-
echo "Pull request description cannot be empty."
76-
exit 1
77-
7870
- name: Run Compliance Tests
7971
continue-on-error: true
8072
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
jobs:
814
do-not-merge:
@@ -18,3 +24,13 @@ jobs:
1824
echo "Pull request is labeled as 'DNM', 'TSC', 'Architecture Review' or 'dev-review'."
1925
echo "This workflow fails so that the pull request cannot be merged."
2026
exit 1
27+
28+
empty_pr_description:
29+
if: ${{ github.event.pull_request.body == '' }}
30+
name: PR Description
31+
runs-on: ubuntu-22.04
32+
steps:
33+
- name: Check for PR description
34+
run: |
35+
echo "Pull request description cannot be empty."
36+
exit 1

0 commit comments

Comments
 (0)