Skip to content

Commit

Permalink
CI: checkout repo before spell checking pr title (#2776)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chethan-rao authored Nov 8, 2023
1 parent 1effddd commit 9cc8b93
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR Title Checks
name: Conventional Commit Message Check

on:
# This is a dangerous event trigger as it causes the workflow to run in the
Expand Down Expand Up @@ -35,21 +35,6 @@ env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

jobs:
typos:
name: Spell check PR title
runs-on: ubuntu-latest
steps:
- name: Store PR title in a file
shell: bash
env:
TITLE: ${{ github.event.pull_request.title }}
run: echo $TITLE > pr_title.txt

- name: Spell check
uses: crate-ci/typos@master
with:
files: ./pr_title.txt

pr_title_check:
name: Verify PR title follows conventional commit standards
runs-on: ubuntu-latest
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/pr-title-spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR Title Spell Check

on:
pull_request:
types:
- opened
- edited
- synchronize

jobs:
typos:
name: Spell check PR title
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Store PR title in a file
shell: bash
env:
TITLE: ${{ github.event.pull_request.title }}
run: echo $TITLE > pr_title.txt

- name: Spell check
uses: crate-ci/typos@master
with:
files: ./pr_title.txt

0 comments on commit 9cc8b93

Please sign in to comment.