Repository navigation
pr-first-commit-title - Preserve previous user changes - #7237
Merged
Merged
Conversation
use-first-commit-message-for-new-prs - Preserve previous user changespr-first-commit-title - Preserve previous user changes
fregante
commented
Feb 2, 2024
Comment on lines
40
to
+43
| async function init(): Promise<void | false> { | ||
| const sessionResumeId = $('meta[name="session-resume-id"]')?.content; | ||
| const previousTitle = sessionResumeId && sessionStorage.getItem(`session-resume:${sessionResumeId}`); | ||
| if (previousTitle) { |
Member
Author
There was a problem hiding this comment.
@pgimalac the code I had pasted worked, the only change it needed was that the resumeId is the target repo, not the current repo (getRepo())
GitHub sets sessionStorage when the user leaves the page, and removes it on load, that's why it was hard to see.
fregante
commented
Feb 2, 2024
| if (firstCommit.body && !requestedContent.has('pull_request[body]')) { | ||
| insertTextIntoField( | ||
| $('#new_pull_request textarea[aria-label="Comment body"]')!, | ||
| expectElement('#pull_request_body'), |
Member
Author
There was a problem hiding this comment.
Also fixes setting the body since the selector was outdated.
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.
use-first-commit-message-for-new-prsoverrides user set title when refreshing page #7191use-first-commit-message-for-new-prs- Do not replace title on page reload #7198Test URLs
https://github.com/refined-github/sandbox/compare/rendered-commit-title?expand=1
Screenshot
Screen.Recording.9.mov