Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 8 additions & 33 deletions .github/workflows/check_pr_title.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,25 @@
name: Check PR title
name: Semantic PR title check

on:
pull_request:
pull_request_target:
Comment thread
coderabbitai[bot] marked this conversation as resolved.
types:
- opened
- reopened
- edited
- synchronize
- labeled
- unlabeled
pull_request:
paths:
- '.github/workflows/check_pr_title.yml'

jobs:
lint:
runs-on: ubuntu-latest
main:
name: Semantic check
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
34 changes: 34 additions & 0 deletions .github/workflows/spellcheck_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Spellcheck PR title
on:
pull_request:
types: [opened, reopened, edited, synchronize, labeled, unlabeled]
paths:
Comment on lines +2 to +5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): The paths filter restricts the spellcheck workflow to PRs that modify the workflow file itself, which likely defeats the purpose.

If you want this workflow to validate titles on all relevant PRs (except those explicitly skipped), remove the paths restriction or expand it so that typical code or documentation changes also trigger the job.

- '.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