Skip to content

👷 add CI check enforcing gitmoji PR title convention#4619

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

👷 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

@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.0019 0.0021 +10.53%
RUM - add action 0.0104 0.0109 +4.81%
RUM - add error 0.0126 0.0111 -11.90%
RUM - add timing 0.0007 0.0005 -28.57%
RUM - start view 0.0109 0.0104 -4.59%
RUM - start/stop session replay recording 0.0008 0.0007 -12.50%
Logs - log message 0.0176 0.0158 -10.23%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 42.69 KiB 37.89 KiB -4.81 KiB
RUM - add action 67.95 KiB 65.46 KiB -2.49 KiB
RUM - add timing 37.49 KiB 43.01 KiB +5.52 KiB
RUM - add error 73.15 KiB 70.79 KiB -2.36 KiB
RUM - start/stop session replay recording 41.06 KiB 45.42 KiB +4.35 KiB
RUM - start view 492.59 KiB 473.48 KiB -19.10 KiB
Logs - log message 55.59 KiB 56.08 KiB +498 B

🔗 RealWorld

@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: 2287de0 | Docs | Datadog PR Page | Give us feedback!

- 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 on PR open/edit/reopen/synchronize
- Update AGENTS.md to reflect the new requirement
@thomas-lebeau thomas-lebeau force-pushed the worktree-pr-title-lint branch from a9c02a3 to c349f5e Compare May 15, 2026 05:17
@thomas-lebeau thomas-lebeau marked this pull request as ready for review May 15, 2026 07:24
@thomas-lebeau thomas-lebeau requested a review from a team as a code owner May 15, 2026 07:24
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c349f5e1fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/lib/gitmoji.ts Outdated
The changelog generator extracts the first pictographic via
`\p{Extended_Pictographic}`, which strips the U+FE0F variation selector.
Without normalization, `PUBLIC_EMOJI_PRIORITY.includes('⚡')` fails and
Performance/Experimental commits land in Internal Changes.
Comment thread AGENTS.md Outdated
Co-authored-by: Adrian de la Rosa <adrian.delarosa@datadoghq.com>
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