From c67956fe9b3a61cf807970de8b49261393c3bc91 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Thu, 13 Aug 2026 17:23:22 +0200 Subject: [PATCH 1/4] Split actions for checking title to use `pull_request_target` in limited scope --- .github/workflows/check_pr_title.yml | 38 ++++---------------------- .github/workflows/spellcheck_title.yml | 34 +++++++++++++++++++++++ 2 files changed, 40 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/spellcheck_title.yml diff --git a/.github/workflows/check_pr_title.yml b/.github/workflows/check_pr_title.yml index 01f4f2018..637dc2414 100644 --- a/.github/workflows/check_pr_title.yml +++ b/.github/workflows/check_pr_title.yml @@ -1,7 +1,7 @@ name: Check PR title on: - pull_request: + pull_request_target: types: - opened - reopened @@ -13,38 +13,12 @@ on: - '.github/workflows/check_pr_title.yml' jobs: - lint: - runs-on: ubuntu-latest + main: + name: Validate PR title + runs-on: ubuntu-slim permissions: - statuses: write + pull-requests: read steps: - - uses: aslafy-z/conventional-pr-title-action@v3 + - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - spellcheck: - runs-on: ubuntu-slim - if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip check PR title') }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - - - name: Install aspell - run: sudo apt-get update && sudo apt-get install aspell - - - name: Check PR title spelling - env: - PR_TITLE: ${{ github.event.pull_request.title }} - run: | - echo "$PR_TITLE" - if aspell --personal="./.github/project_dict.pws" list <<< "$PR_TITLE" | grep -q .; then - echo "Misspelled words found." - aspell --personal="./.github/project_dict.pws" list <<< "$PR_TITLE" - exit 1 - else - echo "No misspelled words found." - exit 0 - fi diff --git a/.github/workflows/spellcheck_title.yml b/.github/workflows/spellcheck_title.yml new file mode 100644 index 000000000..08af60387 --- /dev/null +++ b/.github/workflows/spellcheck_title.yml @@ -0,0 +1,34 @@ +name: spellcheck_title.yml +on: + pull_request: + types: [opened, reopened, edited, synchronize, labeled, unlabeled] + paths: + - '.github/workflows/spellcheck_title.yml' + +jobs: + spellcheck: + runs-on: ubuntu-slim + if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip check PR title') }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + + + - name: Install aspell + run: sudo apt-get update && sudo apt-get install aspell + + - name: Check PR title spelling + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: | + echo "$PR_TITLE" + if aspell --personal="./.github/project_dict.pws" list <<< "$PR_TITLE" | grep -q .; then + echo "Misspelled words found." + aspell --personal="./.github/project_dict.pws" list <<< "$PR_TITLE" + exit 1 + else + echo "No misspelled words found." + exit 0 + fi From 290070921f001aefbb76f511e5b19177a3f6fcb8 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Thu, 13 Aug 2026 21:07:45 +0200 Subject: [PATCH 2/4] use pull request for path trigger --- .github/workflows/check_pr_title.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check_pr_title.yml b/.github/workflows/check_pr_title.yml index 637dc2414..71b439107 100644 --- a/.github/workflows/check_pr_title.yml +++ b/.github/workflows/check_pr_title.yml @@ -9,6 +9,7 @@ on: - synchronize - labeled - unlabeled + pull_request: paths: - '.github/workflows/check_pr_title.yml' From f02c6f2d14b5224b878dfd39d297d91e0c87561f Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Thu, 13 Aug 2026 22:32:00 +0200 Subject: [PATCH 3/4] Update workflow titles --- .github/workflows/check_pr_title.yml | 2 +- .github/workflows/spellcheck_title.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_pr_title.yml b/.github/workflows/check_pr_title.yml index 71b439107..c1d103607 100644 --- a/.github/workflows/check_pr_title.yml +++ b/.github/workflows/check_pr_title.yml @@ -1,4 +1,4 @@ -name: Check PR title +name: Semantic PR title check on: pull_request_target: diff --git a/.github/workflows/spellcheck_title.yml b/.github/workflows/spellcheck_title.yml index 08af60387..8a1040cc2 100644 --- a/.github/workflows/spellcheck_title.yml +++ b/.github/workflows/spellcheck_title.yml @@ -1,4 +1,4 @@ -name: spellcheck_title.yml +name: Spellcheck PR title on: pull_request: types: [opened, reopened, edited, synchronize, labeled, unlabeled] From d569f147baa9104f6f7ec1f14b81400b57ccdae9 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Thu, 13 Aug 2026 22:40:17 +0200 Subject: [PATCH 4/4] more change --- .github/workflows/check_pr_title.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_pr_title.yml b/.github/workflows/check_pr_title.yml index c1d103607..da46300c3 100644 --- a/.github/workflows/check_pr_title.yml +++ b/.github/workflows/check_pr_title.yml @@ -15,7 +15,7 @@ on: jobs: main: - name: Validate PR title + name: Semantic check runs-on: ubuntu-slim permissions: pull-requests: read