Skip to content

Various fixes for sync-pr-commit-title - #2738

Merged
fregante merged 10 commits into
masterfrom
`sync-pr-commit-title`
Jan 28, 2020
Merged

fregante merged 10 commits into
masterfrom
`sync-pr-commit-title`

Conversation

@fregante

@fregante fregante commented Jan 28, 2020 •

Copy link
Copy Markdown
Member

Fixes #2713: avoid renaming merge commits
Fixes #1743 (comment): avoid renaming the PR if the commit title is "the same but clipped"
Fixes: it asks to rename the PR even if it's not necessary, in some cases
Also: slight code cleanup

Test

Test opening/closing/reopening the merge box on a PR you can merge, also switching between Merge/Squash and changing the title.

And rename some variables
The order of operations was wrong, so the note would appear when the title was the same
The form is always `is-dirty`, so there's no way to detect use changes.

Every time the form is opened, the title will be reset.
This feature is a little spaghetti code, I tried to separate the logic from the UI
@fregante fregante added the bug label Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

sync-pr-commit-title renames PR to "Merge pull request #XXX from <branch>" Change PR title to match merge commit title

1 participant