pr-first-commit-title - Restore feature#9030
Merged
Merged
Conversation
77313a3 to
a66f310
Compare
SunsetTechuila
commented
Mar 3, 2026
|
|
||
| function getFirstCommit(firstCommit: HTMLElement): {title: string; body: string | undefined} { | ||
| const body = $optional('.Details-content--hidden pre', firstCommit) | ||
| const body = $optional('.Details-content--hidden pre', firstCommit.parentElement!) |
Member
Author
There was a problem hiding this comment.
fixes body being omitted
SunsetTechuila
commented
Mar 3, 2026
| ?.textContent | ||
| .trim() ?? undefined; | ||
|
|
||
| const title = parseRenderedText(firstCommit.firstElementChild!, ({nodeName}) => |
Member
Author
There was a problem hiding this comment.
fixes parts of the name being omitted if it starts with a reference: https://github.com/refined-github/sandbox/compare/rendered-commit-title?expand=1
SunsetTechuila
commented
Mar 3, 2026
| const sessionResumeId = $optional('meta[name="session-resume-id"]')?.content; | ||
| return Boolean(sessionResumeId && sessionStorage.getItem(`session-resume:${sessionResumeId}`)); | ||
| return Boolean( | ||
| sessionStorage.getItem(`copilot-generate-pull-title:${location.pathname}`) |
Member
Author
There was a problem hiding this comment.
That prefix is used even if Copilot is disabled
Member
There was a problem hiding this comment.
Some of these comments would work best as inline comments, for example when they describe or explain some code (not so much when they explain changes)
fregante
approved these changes
Mar 7, 2026
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.
https://github.blog/changelog/2026-02-25-generate-pull-request-titles-with-copilot-on-the-web/
and fixes + cleanup
Test URLs
https://github.com/refined-github/sandbox/compare/9012-2?expand=1
Screenshot