Browse Source

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>
pull/87660/head
Anas Nashif 7 months ago committed by Benjamin Cabé
parent
commit
7b1e610cc7
  1. 8
      .github/workflows/compliance.yml
  2. 20
      .github/workflows/do_not_merge.yml

8
.github/workflows/compliance.yml

@ -65,14 +65,6 @@ jobs: @@ -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

20
.github/workflows/do_not_merge.yml

@ -1,8 +1,14 @@ @@ -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: @@ -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

Loading…
Cancel
Save