Skip to content

Conversation

AgentEnder
Copy link
Member

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

  • Tested locally with valid PR titles (e.g., feat(core): add new feature)
  • Tested locally with invalid PR titles (confirmed validation failure)
  • Tested with breaking change notation (fix(core)!: breaking change)
  • Test on actual PR once merged

🤖 Generated with Claude Code

Sorry, something went wrong.

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>
@AgentEnder AgentEnder requested a review from a team as a code owner August 21, 2025 19:59
@AgentEnder AgentEnder requested a review from Cammisuli August 21, 2025 19:59
Copy link

vercel bot commented Aug 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Aug 21, 2025 8:19pm

Copy link
Contributor

nx-cloud bot commented Aug 21, 2025

View your CI Pipeline Execution ↗ for commit d994d90

Command Status Duration Result
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 36s View ↗
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded <1s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 5s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 5s View ↗
nx documentation ✅ Succeeded 7s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-21 20:28:49 UTC

@AgentEnder AgentEnder merged commit c916349 into master Aug 21, 2025
7 checks passed
@AgentEnder AgentEnder deleted the feat/pr-title-validation branch August 21, 2025 20:31
FrozenPandaz pushed a commit that referenced this pull request Aug 22, 2025

Verified

This commit was signed with the committer’s verified signature.
FrozenPandaz Jason Jean
## 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

Verified

This commit was signed with the committer’s verified signature.
FrozenPandaz Jason Jean
…#32458)"

This reverts commit c916349.
FrozenPandaz added a commit that referenced this pull request Aug 22, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
… (#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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants