Skip to content

ci(perf-benchmark): Enable GitHub autolink for commit SHAs in benchmark comments#1353

Merged
yamadashy merged 3 commits intomainfrom
ci/bench-comment-autolink-commit-sha
Mar 29, 2026
Merged

ci(perf-benchmark): Enable GitHub autolink for commit SHAs in benchmark comments#1353
yamadashy merged 3 commits intomainfrom
ci/bench-comment-autolink-commit-sha

Conversation

@yamadashy
Copy link
Copy Markdown
Owner

@yamadashy yamadashy commented Mar 29, 2026

Remove <code> HTML tags wrapping commit SHAs in perf benchmark PR comments so that GitHub's autolink feature can recognize and link them automatically.

Checklist

  • Run npm run test
  • Run npm run lint

Open with Devin

…tolink

GitHub auto-links 7+ char commit SHAs in PR comments, but wrapping them
in <code> HTML tags prevented this. Remove the tags so SHAs become
clickable links automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 29, 2026

⚡ Performance Benchmark

Latest commit:d256318 style(perf-benchmark): Format regex with Biome
Status:✅ Benchmark complete!
Ubuntu:1.92s (±0.02s) → 1.92s (±0.01s) · -0.00s (-0.1%)
macOS:1.03s (±0.04s) → 1.02s (±0.03s) · -0.01s (-1.1%)
Windows:2.78s (±0.06s) → 2.78s (±0.06s) · +0.00s (+0.1%)
Details
  • Packing the repomix repository with node bin/repomix.cjs
  • Warmup: 2 runs (discarded), interleaved execution
  • Measurement: 20 runs / 30 on macOS (median ± IQR)
  • Workflow run
History

362a8eb fix(perf-benchmark): Make regex backwards-compatible with old <code> format

Ubuntu:1.96s (±0.01s) → 1.95s (±0.03s) · -0.01s (-0.5%)
macOS:1.11s (±0.10s) → 1.12s (±0.18s) · +0.01s (+0.7%)
Windows:2.50s (±0.59s) → 2.48s (±0.66s) · -0.03s (-1.1%)

86a4208 ci(perf-benchmark): Remove <code> tags from commit SHAs for GitHub autolink

Ubuntu:2.05s (±0.01s) → 2.05s (±0.02s) · +0.01s (+0.4%)
macOS:1.06s (±0.10s) → 1.06s (±0.10s) · -0.01s (-0.5%)
Windows:2.42s (±0.06s) → 2.41s (±0.04s) · -0.01s (-0.5%)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 29, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d8dad78a-1ccb-4a07-9996-6cb34e4a698c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Removed <code> HTML wrapping from commit SHAs across three benchmark scripts: updated comment table row rendering, adjusted regex parsing, and modified history label generation. Changes affect only HTML formatting structure with no logic alterations.

Changes

Cohort / File(s) Summary
Comment Generation
.github/scripts/perf-benchmark/bench-comment.mjs
Removed <code> HTML wrapping around short SHA in "Latest commit" table row.
Pending Comment Parsing & Rendering
.github/scripts/perf-benchmark/bench-pending.mjs
Updated regex pattern to parse short SHA without <code> wrapper; removed <code> element from table row rendering.
History Rendering
.github/scripts/perf-benchmark/bench-utils.mjs
Removed <code> HTML element wrapping around SHA in collapsible history entry labels.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: enabling GitHub autolink for commit SHAs by removing code wrapping tags.
Description check ✅ Passed The description adequately explains the purpose (removing tags to enable GitHub autolink), follows the template structure, and includes completed checklist items.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/bench-comment-autolink-commit-sha

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 and usage tips.

gemini-code-assist[bot]

This comment was marked as resolved.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.13%. Comparing base (b21a85f) to head (d256318).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1353   +/-   ##
=======================================
  Coverage   87.13%   87.13%           
=======================================
  Files         116      116           
  Lines        4393     4393           
  Branches     1020     1020           
=======================================
  Hits         3828     3828           
  Misses        565      565           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

devin-ai-integration[bot]

This comment was marked as resolved.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 29, 2026

Deploying repomix with  Cloudflare Pages  Cloudflare Pages

Latest commit: d256318
Status: ✅  Deploy successful!
Preview URL: https://9e38a88e.repomix.pages.dev
Branch Preview URL: https://ci-bench-comment-autolink-co.repomix.pages.dev

View logs

@claude

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/scripts/perf-benchmark/bench-pending.mjs (1)

15-15: Backward compatibility: First run after merge may not archive previous result.

The updated regex expects the new format (SHA without <code> tags), but the existing PR comment will still have the old format with <code> tags. During the first workflow run after this PR merges, the regex won't match the old format, so that benchmark result won't be archived into history.

This is likely acceptable as a one-time migration cost, but worth noting. Alternatively, you could make the <code> wrapper optional in the regex:

🔧 Optional: Make regex backward-compatible
-  const commitMatch = mainSection.match(/Latest commit:<\/strong><\/td><td>([a-f0-9]+)\s*(.*?)<\/td>/);
+  const commitMatch = mainSection.match(/Latest commit:<\/strong><\/td><td>(?:<code>)?([a-f0-9]+)(?:<\/code>)?\s*(.*?)<\/td>/);

This makes the <code> tags optional, allowing parsing of both old and new formats.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/scripts/perf-benchmark/bench-pending.mjs at line 15, The regex in
bench-pending.mjs that builds commitMatch currently only matches the new SHA
format and will miss older PR comments that wrapped the SHA in <code> tags;
update the regular expression used for commitMatch (the /Latest
commit:<\/strong><\/td><td>([a-f0-9]+)\s*(.*?)<\/td>/ pattern) to make an
optional <code>...</code> wrapper around the SHA (e.g., allow optional <code>
before and </code> after the capture) so both old and new formats are accepted
and the previous result will be parsed and archived.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/scripts/perf-benchmark/bench-pending.mjs:
- Line 15: The regex in bench-pending.mjs that builds commitMatch currently only
matches the new SHA format and will miss older PR comments that wrapped the SHA
in <code> tags; update the regular expression used for commitMatch (the /Latest
commit:<\/strong><\/td><td>([a-f0-9]+)\s*(.*?)<\/td>/ pattern) to make an
optional <code>...</code> wrapper around the SHA (e.g., allow optional <code>
before and </code> after the capture) so both old and new formats are accepted
and the previous result will be parsed and archived.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4abe255b-801c-4786-91f1-8982e7f866c5

📥 Commits

Reviewing files that changed from the base of the PR and between b21a85f and 86a4208.

📒 Files selected for processing (3)
  • .github/scripts/perf-benchmark/bench-comment.mjs
  • .github/scripts/perf-benchmark/bench-pending.mjs
  • .github/scripts/perf-benchmark/bench-utils.mjs

…format

Make <code> tags optional in the commit SHA regex so existing benchmark
comments with the old format are still parsed correctly during transition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 29, 2026

Code Review

Clean, minimal PR. No new issues found beyond what was already identified and fixed.

Area Verdict
Code quality ✅ Changes are consistent across all 3 files
Security ✅ No risk — SHAs are hex-only, commit messages escaped via esc()
Performance ✅ No impact — CI script string templates only
Backwards compat ✅ Addressed in second commit — regex now accepts both old and new formats
Conventions ✅ Conventional Commits with ci(perf-benchmark) scope
Note on other bot reviews

Both CodeRabbit and Gemini flagged the backwards compatibility issue with the regex in bench-pending.mjs — but their reviews were based on the first commit only. The second commit (362a8eb) already makes <code> tags optional in the regex with (?:<code>)? / (?:<\/code>)?, resolving the concern.

LGTM 👍

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yamadashy yamadashy merged commit dbc7aee into main Mar 29, 2026
61 checks passed
@yamadashy yamadashy deleted the ci/bench-comment-autolink-commit-sha branch March 29, 2026 12:27
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