Skip to content

Change the default commit message to "Pull request title and description." #501

Description

@methane

The short story

"pull request title and description" would be better default for our workflow.

image

Long version

Using pull request title and description for the default commit message allow us to check and edit commit message without pressing "Squash and merge" button.

This is really important for automerge workflow because we can not edit commit message for now.

Activity

  1. corona10 commented on Apr 21, 2023

    @corona10
    Member

    big +1

  2. arhadthedev commented on Apr 24, 2023

    @arhadthedev
    Member

    @hugovk Could you apply this too, please? (if not yet)

  3. ezio-melotti commented on Apr 24, 2023

    @ezio-melotti
    Member

    I now changed from "title and commit" to "title and description".
    Let me know if it works as expected.

  4. ezio-melotti commented on Apr 25, 2023

    @ezio-melotti
    Member

    This change seems to include the PR template too if the user doesn't remove it, see e.g. python/cpython@8330580

    I think we should avoid this, and if we want to keep the "title and description" I can see a few options:

    • edit the template and add a message to encourage the user to remove the template
    • have bedevere removing it after the PR is created
    • strip all the comments when the commit description is created, if possible (while leaving them in the original message)

    I can also open a separate issue if this is not being already discussed/tracked elsewhere.

  5. zware commented on Apr 25, 2023

    @zware
    Member

    I'm starting to think our best option may be just Default to pull request title. If there's relevant description, it can be copy/pasted when editing the commit message.

  6. CAM-Gerlach commented on Apr 25, 2023

    @CAM-Gerlach
    Member

    IMO, this still requires that the committer pays careful attention to editing the PR description down to just a summary of the parts relevant to the final commit, and manually adding in relevant details if provided in the individual commit messages but not in the PR description.

    Relative to the status quo (title + commit messages), PR descriptions can be much longer and contain a lot more detail irrelevant or excessive to include in the final commit. Conversely, they can also often completely blank, lacking even the minimal detail typically present in commit messages. Furthermore, it is just a single copy/paste to add the PR description to a commit message (likely only a fraction of the editing time required), whereas it is potentially much more complex and requires much more reformatting to paste in the commit history when that is desirable. Vs. just the PR title, it only takes a couple keystrokes to wipe the commit list from the description, and it can also be done automatically via a Refined GitHub option.

    Therefore, ISTM that title + commit messages is the most flexible option that most easily allows achieving either of the other two, depending on which the committer determines is most appropriate for the circumstances while reducing the potential harm (a massive wall of mostly not-relevant text) if a core dev does not carefully check and edit it (as indeed happens not-infrequently), it seems it is the least-bad default option.

  7. methane commented on Apr 26, 2023

    @methane
    MemberAuthor

    I concur with you. Please revert to "pull request title + commit details".

  8. ezio-melotti commented on Apr 26, 2023

    @ezio-melotti
    Member

    Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions