👷 add CI check enforcing gitmoji PR title convention#4619
Draft
thomas-lebeau wants to merge 3 commits into
Draft
👷 add CI check enforcing gitmoji PR title convention#4619thomas-lebeau wants to merge 3 commits into
thomas-lebeau wants to merge 3 commits into
Conversation
- Add `scripts/check-pr-title.ts` with the gitmoji prefix validation logic - Extract the canonical gitmoji list into `scripts/lib/gitmoji.ts` and reuse it from the changelog generator - Wire a `lint-pr-title` GitHub Actions workflow that runs the check on PR open/edit/reopen - Update AGENTS.md to reflect the new requirement
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
The script imports shared helpers from executionUtils.ts, which pulls in undici. Install dependencies (with the setup-node yarn cache) so the import resolves on CI.
29cc343 to
004679b
Compare
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: a9c02a3 | Docs | Datadog PR Page | Give us feedback! |
- gate the script entry point with NODE_TEST_CONTEXT so the local disallow-non-scripts rule recognizes the top-level runMain() - switch ReadonlyArray<T> to readonly T[] (array-type rule) - single-quote two non-template strings
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
PR titles become commit messages on
main(squash merge) and feed the changelog generator, which requires a gitmoji prefix. Today nothing prevents a PR from landing with a non-conforming title, which then needs a manual fix-up.Changes
Lint PR titleGitHub Actions workflow that runs on PR open/edit/reopen and rejects titles missing an allowed gitmoji prefix.scripts/lib/gitmoji.ts(single source of truth) and refactor the changelog generator to consume it instead of its own local copy.scripts/check-pr-title.ts+ spec, invoked from the workflow viaPR_TITLEenv var (passed through env, not inline, to avoid shell injection).Test instructions
yarn test:scriptand checkscripts/check-pr-title.spec.tspasses.PR_TITLE='✨ something' node scripts/check-pr-title.tsexits 0;PR_TITLE='no prefix' node scripts/check-pr-title.tsexits 1 with the allowed-prefix list.Lint PR titlecheck.Checklist