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 <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif
2024-12-03 17:46:37 -05:00
committed by Benjamin Cabé
parent 66fa04962f
commit 7b1e610cc7
2 changed files with 18 additions and 10 deletions

View File

@@ -65,14 +65,6 @@ jobs:
west config manifest.group-filter -- +ci,-optional
west update -o=--depth=1 -n 2>&1 1> west.update.log || west update -o=--depth=1 -n 2>&1 1> west.update2.log
- name: Check for PR description
if: ${{ github.event.pull_request.body == '' }}
continue-on-error: true
id: pr_description
run: |
echo "Pull request description cannot be empty."
exit 1
- name: Run Compliance Tests
continue-on-error: true
id: compliance

View File

@@ -1,8 +1,14 @@
name: Do Not Merge
name: PR Metadata Check
on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
types:
- synchronize
- opened
- reopened
- labeled
- unlabeled
- edited
permissions:
contents: read
@@ -22,3 +28,13 @@ jobs:
echo "Pull request is labeled as 'DNM', 'TSC', 'Architecture Review' or 'dev-review'."
echo "This workflow fails so that the pull request cannot be merged."
exit 1
empty_pr_description:
if: ${{ github.event.pull_request.body == '' }}
name: PR Description
runs-on: ubuntu-22.04
steps:
- name: Check for PR description
run: |
echo "Pull request description cannot be empty."
exit 1