Skip to content

👷 add CI check enforcing gitmoji PR title convention#4619

Draft
thomas-lebeau wants to merge 3 commits into
mainfrom
worktree-pr-title-lint
Draft

👷 add CI check enforcing gitmoji PR title convention#4619
thomas-lebeau wants to merge 3 commits into
mainfrom
worktree-pr-title-lint

Conversation

@thomas-lebeau
Copy link
Copy Markdown
Collaborator

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

  • Add a Lint PR title GitHub Actions workflow that runs on PR open/edit/reopen and rejects titles missing an allowed gitmoji prefix.
  • Extract the canonical gitmoji list into scripts/lib/gitmoji.ts (single source of truth) and refactor the changelog generator to consume it instead of its own local copy.
  • Add scripts/check-pr-title.ts + spec, invoked from the workflow via PR_TITLE env var (passed through env, not inline, to avoid shell injection).

Test instructions

  • Run yarn test:script and check scripts/check-pr-title.spec.ts passes.
  • Locally: PR_TITLE='✨ something' node scripts/check-pr-title.ts exits 0; PR_TITLE='no prefix' node scripts/check-pr-title.ts exits 1 with the allowed-prefix list.
  • Once merged, opening a PR with a non-gitmoji title should fail the Lint PR title check.

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

- 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
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 13, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 169.51 KiB 169.51 KiB 0 B 0.00%
Rum Profiler 5.97 KiB 5.97 KiB 0 B 0.00%
Rum Recorder 21.23 KiB 21.23 KiB 0 B 0.00%
Logs 54.70 KiB 54.70 KiB 0 B 0.00%
Rum Slim 127.85 KiB 127.85 KiB 0 B 0.00%
Worker 22.99 KiB 22.99 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0021 0.0021 0.00%
RUM - add action 0.0105 0.01 -4.76%
RUM - add error 0.0097 0.0116 +19.59%
RUM - add timing 0.0004 0.0006 +50.00%
RUM - start view 0.0092 0.0109 +18.48%
RUM - start/stop session replay recording 0.0007 0.0007 0.00%
Logs - log message 0.0139 0.0165 +18.71%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 38.24 KiB 38.60 KiB +374 B
RUM - add action 64.64 KiB 63.51 KiB -1.13 KiB
RUM - add timing 36.73 KiB 41.24 KiB +4.51 KiB
RUM - add error 70.01 KiB 69.60 KiB -414 B
RUM - start/stop session replay recording 45.58 KiB 45.66 KiB +84 B
RUM - start view 483.88 KiB 492.16 KiB +8.29 KiB
Logs - log message 55.00 KiB 54.36 KiB -648 B

🔗 RealWorld

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.
@thomas-lebeau thomas-lebeau force-pushed the worktree-pr-title-lint branch from 29cc343 to 004679b Compare May 13, 2026 16:24
@thomas-lebeau thomas-lebeau changed the title 👷 add CI check enforcing gitmoji PR title convention add CI check enforcing gitmoji PR title convention May 13, 2026
@thomas-lebeau thomas-lebeau changed the title add CI check enforcing gitmoji PR title convention 👷 add CI check enforcing gitmoji PR title convention May 13, 2026
@datadog-prod-us1-4
Copy link
Copy Markdown

datadog-prod-us1-4 Bot commented May 13, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 76.96% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 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
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.

1 participant