Skip to content

Squash+Merge title = PR title doesn't handle updated PR titles #1555

Closed

Description

@janpio

Feature #276, Force "squash and merge" title to be the pull request title, doesn't take into account that a user might update the PR title before using the squash+merge button. They have to reload the page first to get the new PR title into the input field, which is unexpected.

Activity

  1. busches commented on Oct 3, 2018

    @busches
    Member

    I wasn't able to recreate this. I opened a PR in two windows, changed the PR title in window two, saw the title update in the first, and hit Squash and Merge and it had the correct title.

    The title is chosen when you hit Squash and Merge, so it won't work if you were to hit that first, then change the title. The only other cause I can think of is the title change not syncing over, which would be on GitHub's end. If you have a way to recreate this, please list the steps.

  2. janpio commented on Oct 3, 2018

    @janpio
    ContributorAuthor
    1. Create a PR
    2. Open PR
    3. Use "squash and merge" to see how it fills the commit title with the current PR title
    4. Click "Cancel"
    5. Edit the PR title
    6. Use "squash and merge" to see how it still fills the commit title with the old PR title, the new PR title is placed into the commit message:

    image

    Interesting enough this does not happen consistently. If it started placing the correct PR title after and edit, it will keep doing so. Reloading seems to trigger the correct behavior all the time, but it sometimes also just works starting with the second edit. Strange.

  3. sindresorhus commented on Oct 4, 2018

    @sindresorhus
    Member

    I've been seeing this issue for some time too, just forgot to open an issue.

  4. fregante commented on Dec 2, 2018

    @fregante
    Member

    I don't see the issue and honestly I don't know why it would be there since the field is updated every time you click "Squash and merge"

    r

  5. notlmn commented on Dec 2, 2018

    @notlmn
    Contributor

    According to @janpio, the field doesn't automatically update when it is open and title is changed. You have to click cancel and squash button again to update the tile value inside the field.

    #1651 allows you to do that without having to close and reopen the squash confirmation options.

  6. fregante commented on Dec 2, 2018

    @fregante
    Member

    Step 4 is “Cancel” so in his description it doesn’t stay open

  7. janpio commented on Dec 2, 2018

    @janpio
    ContributorAuthor

    I just reproduced it by using the exact steps I posted above (including the cancel).
    (I am using FF 63.0.3 on Windows 10, addon version is 18.12.1.1752)
    I'll see if I can quickly produce a gif...

  8. janpio commented on Dec 2, 2018

    @janpio
    ContributorAuthor

    Here you go:
    repro

    When creating a new PR I can repro it every time.

  9. fregante commented on Dec 2, 2018

    @fregante
    Member

    Lol I see a variety of funny business in your screencast.

    1. Technically GitHub already uses the correct title when there's more than one commit; this feature only prevents GitHub from using the commit's message when there's only one (i.e. in your GIF we don't know if it's working at all because the first title you see is provided by GitHub)
    2. fix-squash-and-merge-message should copy the first comment's message to the commit message; in your screencast it doesn't happen (separate bug?)
    3. After you change the title, the new title actually appears as the commit message instead of the commit message. 🤷‍♂️

    This shows that the bug is probably deeper than observeEl and these two features should probably be reviewed and merged.

    @janpio do you see any errors in the console?

  10. janpio commented on Dec 2, 2018

    @janpio
    ContributorAuthor

    Re 1: So a better repro would be with a PR that has only 1 commit?
    Re 2: Maybe because it is empty?
    Re 3: Yep, I missed that in the initial report but mentioned it in my repro steps comment.

    I have a strange warning in the console, but this seems to be coming from GitHub itself:

    Failed to update content <div id="partial-discussion-header" class="gh-header js-details-container Details js-socket-channel js-updatable-content js-pull-header-details pull request js-transitionable Details--on" data-channel="pull_request:235277971" data-url="/janpio/ionic-epubjs/pull/56/show_partial?partial=pull_requests%2Ftitle" data-pull-is-open="true" data-gid="MDExOlB1bGxSZXF1ZXN0MjM1Mjc3OTcx"> Error: "element had interactions"
    	e https://assets-cdn.github.com/assets/frameworks-7fcedd2a70cd3dde438cbad4c2d08128.js:1:137968
    	v https://assets-cdn.github.com/assets/frameworks-7fcedd2a70cd3dde438cbad4c2d08128.js:1:5032
    	_invoke https://assets-cdn.github.com/assets/frameworks-7fcedd2a70cd3dde438cbad4c2d08128.js:1:4799
    	t https://assets-cdn.github.com/assets/frameworks-7fcedd2a70cd3dde438cbad4c2d08128.js:1:5208
    	r https://assets-cdn.github.com/assets/frameworks-7fcedd2a70cd3dde438cbad4c2d08128.js:1:7338
    	r https://assets-cdn.github.com/assets/frameworks-7fcedd2a70cd3dde438cbad4c2d08128.js:1:7432
     updatable-content.js:41:14
    

    image

    Might be related though.

  11. fregante commented on Dec 2, 2018

    @fregante
    Member
    1. Yes, although our code shouldn’t make a distinction between the two, it’s just that in this case it doesn’t clearly show if it works at least once.
    2. Our code doesn’t make a distinction between full and empty. It should either match the emptiness or throw an error

    That console error is GitHub’s

  12. janpio commented on Dec 2, 2018

    @janpio
    ContributorAuthor

    Ok, let me know if I can do anything else to help debug this.

  13. fregante commented on Feb 15, 2019

    @fregante
    Member

    Closing in favor of #1790

  14. asvishnyakov commented on Aug 5, 2025

    @asvishnyakov
  15. locked and limited conversation to collaborators on Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions