From 53016b85f6baed06f88def5927c93d5ca63446ed Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Sat, 30 Dec 2023 23:56:32 -0500 Subject: [PATCH 1/4] Move title check to own job --- .github/workflows/github-ci.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-ci.yaml b/.github/workflows/github-ci.yaml index 54f986cb2..2db0cbe15 100644 --- a/.github/workflows/github-ci.yaml +++ b/.github/workflows/github-ci.yaml @@ -164,12 +164,17 @@ jobs: - name: Test with mypy run : | mypy pypdf - - name: Check PR title - env: + + title-check: + name: Title check + runs-on: ubuntu-latest + steps: + - name: Check PR title + env: PR_TITLE: ${{ github.event.pull_request.title }} - run: | + run: | python .github/scripts/check_pr_title.py - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' package: name: Build & verify package From a15e0f210a772446f4651c01ff9a02a69cc60bd5 Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Sat, 30 Dec 2023 23:58:02 -0500 Subject: [PATCH 2/4] checkout first --- .github/workflows/github-ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/github-ci.yaml b/.github/workflows/github-ci.yaml index 2db0cbe15..c1f8270a4 100644 --- a/.github/workflows/github-ci.yaml +++ b/.github/workflows/github-ci.yaml @@ -169,6 +169,8 @@ jobs: 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 }} From 01315f6aa97e4cb9cb1416857e4c125f5b73748b Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Sun, 31 Dec 2023 00:05:50 -0500 Subject: [PATCH 3/4] move check to own workflow --- .github/workflows/github-ci.yaml | 13 ------------- .github/workflows/title-check.yml | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/title-check.yml diff --git a/.github/workflows/github-ci.yaml b/.github/workflows/github-ci.yaml index c1f8270a4..7d0f1426c 100644 --- a/.github/workflows/github-ci.yaml +++ b/.github/workflows/github-ci.yaml @@ -164,19 +164,6 @@ jobs: - name: Test with mypy run : | mypy pypdf - - 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 - if: github.event_name == 'pull_request' package: name: Build & verify package diff --git a/.github/workflows/title-check.yml b/.github/workflows/title-check.yml new file mode 100644 index 000000000..61bdc04a1 --- /dev/null +++ b/.github/workflows/title-check.yml @@ -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 \ No newline at end of file From 170396e336599e8ed785d309aac780bfaab8590a Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Sun, 31 Dec 2023 05:12:49 +0000 Subject: [PATCH 4/4] Update title-check.yml --- .github/workflows/title-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/title-check.yml b/.github/workflows/title-check.yml index 61bdc04a1..9a4e96b88 100644 --- a/.github/workflows/title-check.yml +++ b/.github/workflows/title-check.yml @@ -17,4 +17,4 @@ jobs: - name: Check PR title env: PR_TITLE: ${{ github.event.pull_request.title }} - run: python .github/scripts/check_pr_title.py \ No newline at end of file + run: python .github/scripts/check_pr_title.py