Skip to content

Commit

Permalink
Ensure pull requests are conventional (#137)
Browse files Browse the repository at this point in the history
Pull requests are squashed so individual commits are pointless which makes the `commitizen` pre-commit hook completely useless. Integrate [this action](https://github.com/amannn/action-semantic-pull-request) instead to ensure the pull request tile follow the [conventional commits](https://www.conventionalcommits.org) which becomes the commit message once merged.

- Remove commitizen pre-commit hook.
- Add semantic pull request validation workflow.
  • Loading branch information
kalbasit authored Dec 21, 2024
1 parent cd336fc commit 8726273
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Lint PR"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened
permissions:
pull-requests: read
jobs:
validate-pr-title:
name: Validate PR title
runs-on: ubuntu-24.04
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion nix/pre-commit/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
pre-commit.check.enable = false;
pre-commit.settings.hooks = {
check-merge-conflicts.enable = true;
commitizen.enable = true;
deadnix.enable = true;
gofmt.enable = true;
golangci-lint.enable = true;
Expand Down

0 comments on commit 8726273

Please sign in to comment.