Skip to content

Improve "Commit Messages" section in committing.rst #199

Closed
@berkerpeksag

Description

@berkerpeksag

It would be great if we could tweak the section at http://cpython-devguide.readthedocs.io/committing.html#commit-messages a bit. For example,

  1. It doesn't include (GH-NNNN) suffix in the first line:

    bpo-42: the spam module is now more spammy. (GH-1234)
    
  2. It doesn't mention about stripping unnecessary parts when doing the merge (see python/cpython@6924ed5 for example)

  3. It doesn't talk about what to do with backport PRs (e.g. should we drop the backport PR number from the title?)
    Currently, we do have:

    bpo-42: the spam module is now more spammy. (GH-1234) (#4242)
    

    #4242 is the backport PR here, but it's rarely useful and it can be seen by using the GitHub UI.

    I suggest stripping it and only keep the original PR number:

    bpo-42: the spam module is now more spammy. (GH-1234)
    

    Another question is that should we add [X.Y] to commit messages too or should we only add it to the PR title?

  4. It doesn't talk about what to do with GH-NNNN annotations when the first line of the commit message is too long. See python/cpython@edef358 for example. Should we move the annotation to the end of the commit message in this case? For example:

    bpo-29196: Removed old-deprecated classes Plist, Dict and _InternalDict
    in the plistlib module.
    
    Dict values in the result of functions readPlist() and readPlistFromBytes()
    are now exact dicts.
    
    Pull request: GH-488
    

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions