Skip to content

ci: improve lint-pr-title action - #1692

Merged
yogeshchoudhary147 merged 2 commits into
mainfrom
ci/lint-pr-title
Jul 19, 2026
Merged

ci: improve lint-pr-title action#1692
yogeshchoudhary147 merged 2 commits into
mainfrom
ci/lint-pr-title

Conversation

@yogeshchoudhary147

@yogeshchoudhary147 yogeshchoudhary147 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move commitlint.config.mjs into .github/actions/lint-pr-title/ — it's action-specific, not repo-wide
  • Add .npmrc with omit-lockfile-registry-resolved=true to strip internal registry URLs from the lock file
  • Commit package-lock.json for reproducible, cacheable installs and switch to npm ci
  • Add reopened to workflow trigger types so validation runs when a closed PR is reopened
  • Simplify ESM imports and pass parserOpts from load() into lint()

Summary by CodeRabbit

  • Bug Fixes
    • Pull request title checks now also run when a pull request is reopened.
    • Commit title validation now consistently applies the configured commit rules and linting/parsing options.
  • Chores
    • Improved automated check setup by using a clean install method for the title linting action.
    • Prevented install scripts from running and reduced lockfile registry metadata noise.

@yogeshchoudhary147
yogeshchoudhary147 requested a review from a team as a code owner July 18, 2026 12:46
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 32073d33-5a1d-4ef4-8878-6401bd04dc38

📥 Commits

Reviewing files that changed from the base of the PR and between b29238b and f47fbd1.

📒 Files selected for processing (1)
  • .github/workflows/lint-pr-title.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/lint-pr-title.yml

📝 Walkthrough

Walkthrough

The PR title linting action now uses local commitlint rules and parser options, resolves configuration from its action directory, and installs dependencies with npm ci. The workflow also runs when pull requests are reopened and applies action-local npm settings.

Changes

PR title linting

Layer / File(s) Summary
Commitlint configuration and runtime
.github/actions/lint-pr-title/commitlint.config.mjs, .github/actions/lint-pr-title/src/index.js
Defines commit type and subject rules, loads configuration relative to the action directory, and passes configured parser options to commitlint.
Workflow triggers and dependency installation
.github/actions/lint-pr-title/.npmrc, .github/workflows/lint-pr-title.yml
Adds action-local npm settings, triggers linting for reopened pull requests, and replaces npm install with npm ci.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately describes the main change set: improvements to the lint-pr-title action.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/lint-pr-title

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yogeshchoudhary147
yogeshchoudhary147 merged commit e00f6ea into main Jul 19, 2026
25 of 27 checks passed
@yogeshchoudhary147
yogeshchoudhary147 deleted the ci/lint-pr-title branch July 19, 2026 17:55
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.

2 participants