Skip to content

clear-pr-merge-commit-message - Add Undo button#9337

Merged
fregante merged 8 commits into
refined-github:mainfrom
agriyakhetarpal:undo-and-redo-for-clearing-pr-merge-time-commit-messages
May 2, 2026
Merged

clear-pr-merge-commit-message - Add Undo button#9337
fregante merged 8 commits into
refined-github:mainfrom
agriyakhetarpal:undo-and-redo-for-clearing-pr-merge-time-commit-messages

Conversation

@agriyakhetarpal
Copy link
Copy Markdown
Contributor

This PR addresses the second part of and closes #9330. I have added an "Undo"/"Redo" toggle link to the note next to the merge-time message about PR commit descriptions. It is a link element that mutates between two states.

Test URLs

Tested on a test PR on my own repository here: agriyakhetarpal/agriyakhetarpal#1

I haven't added any test code for this; I'm not sure how to do so, and if there's a practical way. The clearing logic is already tested, and undo/redo is roughly two lines of state, which probably isn't worth testing on its own.

Screenshot

I have a screen recording, if that helps!

Screen.Recording.2026-05-02.at.03.55.47.mov

Thank you :)

@github-actions github-actions Bot added the bug label May 1, 2026
@agriyakhetarpal agriyakhetarpal changed the title Support undoing and redoing commit descriptions when merging PRs Support undoing and redoing clearance of commit descriptions when merging PRs May 1, 2026
@fregante fregante added enhancement and removed bug labels May 2, 2026
Comment thread source/features/clear-pr-merge-commit-message.tsx Outdated
Comment thread source/features/clear-pr-merge-commit-message.tsx Outdated
Comment thread source/features/clear-pr-merge-commit-message.tsx Outdated
Comment thread source/features/clear-pr-merge-commit-message.tsx Outdated
@fregante
Copy link
Copy Markdown
Member

fregante commented May 2, 2026

Looks great already, btw. These are just code nits

- Link "Cleared" instead of "Refined GitHub"
- Add btn-link class to button
- Don't use an inline listener
- Inline the link via event.currentTarget

Co-Authored-By: Federico <[email protected]>
@agriyakhetarpal
Copy link
Copy Markdown
Contributor Author

Thank you, I appreciate the suggestions! I incorporated all of them, though I think you meant the const anchor line on line 30 instead of line 19. Either way, this should be good now. I added a type="button" to the button that I caught on a second glance, and had missed earlier.

Copy link
Copy Markdown
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

TMNT 👌

@fregante fregante changed the title Support undoing and redoing clearance of commit descriptions when merging PRs clear-pr-merge-commit-message - Add Undo button May 2, 2026
@github-actions github-actions Bot added the bug label May 2, 2026
@fregante fregante requested a review from SunsetTechuila May 2, 2026 11:21
Comment thread source/features/clear-pr-merge-commit-message.tsx Outdated
Comment thread source/features/clear-pr-merge-commit-message.tsx Outdated
Comment thread source/features/clear-pr-merge-commit-message.tsx Outdated
@fregante fregante merged commit 7b9a915 into refined-github:main May 2, 2026
10 checks passed
@agriyakhetarpal agriyakhetarpal deleted the undo-and-redo-for-clearing-pr-merge-time-commit-messages branch May 2, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Dependabot's "Signed-off-by" commit message gets cleared in merge commits

3 participants