Skip to content

Commit

Permalink
DEV: Move title check to own workflow (#2384)
Browse files Browse the repository at this point in the history
Move the title check script introduced in #2378 into its own workflow where it's triggered by `[opened, reopened, edited, synchronize]`, where the difference is in the addition of `edited` type. This allows the workflow to be triggered on editing any part of the PR, most importantly the title attribute to fix it not following conventions. Otherwise, it would require the user to either push a new commit or open/close the PR which is not as intuitive to fix.
  • Loading branch information
MasterOdin authored Dec 31, 2023
1 parent 5eefbaf commit b8a877c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/github-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,6 @@ jobs:
- name: Test with mypy
run : |
mypy pypdf
- name: Check PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
python .github/scripts/check_pr_title.py
if: github.event_name == 'pull_request'
package:
name: Build & verify package
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/title-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'PR Title Check'
on:
pull_request:
# check when PR
# * is created,
# * title is edited, and
# * new commits are added (to ensure failing title blocks merging)
types: [opened, reopened, edited, synchronize]

jobs:
title-check:
name: Title check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: python .github/scripts/check_pr_title.py

0 comments on commit b8a877c

Please sign in to comment.