-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(repo): add GitHub Actions workflow to validate PR titles #32458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+38
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading status checks…
Adds a new PR check that validates PR titles match our git commit rules using the existing commit-lint.js script. The workflow runs on PR events and ensures all PR titles follow the conventional commit format. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub.
|
View your CI Pipeline Execution ↗ for commit d994d90
☁️ Nx Cloud last updated this comment at |
FrozenPandaz
approved these changes
Aug 21, 2025
FrozenPandaz
pushed a commit
that referenced
this pull request
Aug 22, 2025
## Current Behavior Currently, there is no automated check to ensure that PR titles follow our conventional commit format. This can lead to inconsistent PR titles that don't match our commit conventions. ## Expected Behavior With this change, all PR titles will be automatically validated against our git commit rules when a PR is: - Opened - Edited - Synchronized - Reopened The check uses the existing `scripts/commit-lint.js` script to validate PR titles, ensuring they follow the same format as our commit messages (e.g., `feat(scope): description`, `fix(scope): description`, etc.). ## Related Issue(s) This was requested to improve PR quality and consistency across the repository. ## Implementation Details - Added a new GitHub Actions workflow: `.github/workflows/pr-title-validation.yml` - The workflow writes the PR title and body to a temporary file in the format specified - Runs `node ./scripts/commit-lint.js` on the file to validate the PR title - The check will fail if the PR title doesn't match our conventional commit format - The workflow only runs for the `nrwl` repository owner (consistent with other workflows) ## Test Plan - [x] Tested locally with valid PR titles (e.g., `feat(core): add new feature`) - [x] Tested locally with invalid PR titles (confirmed validation failure) - [x] Tested with breaking change notation (`fix(core)!: breaking change`) - [ ] Test on actual PR once merged 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit c916349)
FrozenPandaz
added a commit
that referenced
this pull request
Aug 22, 2025
Loading
Loading status checks…
FrozenPandaz
added a commit
that referenced
this pull request
Aug 22, 2025
Loading
Loading status checks…
… (#32458)" This reverts commit c916349. <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> This workflow may have a vulnerability. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> We'll investigate it before re-introducing it. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current Behavior
Currently, there is no automated check to ensure that PR titles follow our conventional commit format. This can lead to inconsistent PR titles that don't match our commit conventions.
Expected Behavior
With this change, all PR titles will be automatically validated against our git commit rules when a PR is:
The check uses the existing
scripts/commit-lint.js
script to validate PR titles, ensuring they follow the same format as our commit messages (e.g.,feat(scope): description
,fix(scope): description
, etc.).Related Issue(s)
This was requested to improve PR quality and consistency across the repository.
Implementation Details
.github/workflows/pr-title-validation.yml
node ./scripts/commit-lint.js
on the file to validate the PR titlenrwl
repository owner (consistent with other workflows)Test Plan
feat(core): add new feature
)fix(core)!: breaking change
)🤖 Generated with Claude Code