sindresorhus/refined-github

`sync-pr-commit-title` messing up PR title #3829

FloEdelmann posted onGitHub

I squashed and merged this PR without changing the commit title. Afterwards, the PR title was messed up:

grafik

The commit title is fine:

grafik

Unfortunately, I cannot remember if the feature suggested the title change before merging.


posted by FloEdelmann over 4 years ago

It happened again:

Now I am sure that it didn't suggest (or rather warn in this case :sweat_smile:) to change the title before merging.

posted by FloEdelmann over 4 years ago

New insights :bulb:

It's caused by GitHub's new (beta) auto-merge feature:

When a PR can't be merged immediately due to failing tests or missing reviews, the .is-squashing element now contains two similar forms: One for overriding branch restrictions as an admin, and a new one to enable auto-merge once all restrictions are met.

In both, there is a commit message input with id merge_title_field.

The code in sync-pr-commit-title expects this input to exist only once and thus only operates on the first one, regardless whether it is hidden (which was the case for aforementioned PRs) or not.

posted by FloEdelmann over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests