Skip to content

Commit

Permalink
fix: conventional commits for PR titles
Browse files Browse the repository at this point in the history
  • Loading branch information
simjak committed Jan 5, 2024
1 parent 2553089 commit 1b2013d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/conventional_commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate
uses: CondeNast/conventional-pull-request-action@v0.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitlintRulesPath: "./commitlint.config.js"
commitTitleMatch: "false"
ignoreCommits: "false"
- name: Install commitlint
run: |
npm install @commitlint/cli @commitlint/config-conventional
- name: Fetch merge commit message
id: merge_commit
run: |
MERGE_COMMIT_MESSAGE=$(git log --merges -n 1 --pretty=format:"%s")
echo "::set-output name=message::$MERGE_COMMIT_MESSAGE"
- name: Validate merge commit message
run: |
echo "${{ steps.merge_commit.outputs.message }}" | npx commitlint

0 comments on commit 1b2013d

Please sign in to comment.