-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: remove short commit ID from commit link display. #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughPush-event and other link rendering now use raw URL text instead of custom labels; sanitizeMarkdown reverted to remove code blocks and inline code; workflows updated to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (4)
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. Comment |
…ngrade actions/checkout to v4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/scripts/transform-message-for-card.ts(2 hunks).github/workflows/Lark-notification.yml(1 hunks)
🔇 Additional comments (3)
.github/scripts/transform-message-for-card.ts (3)
64-64: Code block sanitization looks good.The regex correctly identifies and replaces Markdown code blocks with a localized placeholder. The non-greedy
*?quantifier ensures proper matching of multiple code blocks.
66-66: Inline code sanitization is appropriate.The regex strips backticks from inline code while preserving the content. Note that it won't match empty inline code (e.g.,
` `) or handle escaped backticks, but these edge cases are rare in typical commit messages and descriptions.
115-115: Commit link simplified to use full URL.This change aligns with the PR objective by removing the shortened commit ID. The link text now displays the full commit URL, which is more verbose but self-contained. The implementation correctly leverages the default parameter of
createLink.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/scripts/transform-message-for-card.ts (1)
221-223: Minor inconsistency in link text format.Within the same handler, line 221 now uses the URL as link text, while line 223 retains the custom
#${pull_request!.number}format. If the goal is consistency, consider aligning these; otherwise, this mixed approach is fine if the distinction is intentional (comment link vs. PR reference).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/scripts/transform-message-for-card.ts(8 hunks)
🔇 Additional comments (2)
.github/scripts/transform-message-for-card.ts (2)
115-115: LGTM - aligns with PR objective.The commit link now displays the URL as the link text instead of the short commit ID, as intended by this refactor.
131-131: Verify: Changes extend beyond stated PR objective.The PR title indicates "remove short commit ID from commit link display," but these changes also affect link text for issues, pull requests, discussions, comments, and releases. The links will now display full URLs (e.g.,
https://github.com/org/repo/issues/123) instead of potentially shorter identifiers.Please confirm this broader scope was intentional. If only the commit link was meant to change, these lines should retain their original link text arguments.
Also applies to: 148-148, 165-165, 179-179, 193-193, 207-207, 221-221
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.