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:
committed by
Benjamin Cabé
parent
66fa04962f
commit
7b1e610cc7
8
.github/workflows/compliance.yml
vendored
8
.github/workflows/compliance.yml
vendored
@@ -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
vendored
20
.github/workflows/do_not_merge.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user