Skip to content

Open a PR with all commits title + body as PR description #8445

Description

@guerinoni

Describe the feature or problem you’d like to solve

Often, when individuals compose detailed commit messages along with informative bodies, it can be cumbersome to manually copy and paste this information into a GitHub pull request description. Fortunately, using a straightforward command, it is possible to automatically generate a comprehensive list of commits, complete with titles and bodies. This simplifies the process of creating a high-quality pull request description effortlessly.

Proposed solution

I propose a new flag to this in order to keep the current behavior untouched gh pr create --fillverbose

Activity

  1. andyfeller commented on Dec 11, 2023

    @andyfeller
    Contributor

    @guerinoni : thank you for opening up this enhancement idea! 🤗

    Could you share an example of what this would look like? I'm not sure if you have an arbitrary repository with commits that you have been using for development purposes, but it would help the maintainers see what the git history and the resulting PR would look like with this proposed change.

  2. guerinoni commented on Dec 11, 2023

    @guerinoni
    ContributorAuthor

    Yes, I present you an example from another repository. Let say I have those 2 commits

    commit 2952f01e84cdbcb46a69be282ce3053226c18a41
    Author: Aliaksandr Kalenik <[email protected]>
    Date:   Mon Dec 11 16:47:40 2023 +0100
    
        LibWeb: Add pair of methods to apply/reset scroll offset of paintable
    
        Separate scroll application from before_children_paint and
        after_children_paint.
    
    commit 8eacb81ebaf229e947b22beaf581e1860e48076e
    Author: Andreas Kling <[email protected]>
    Date:   Mon Dec 11 16:50:04 2023 +0100
    
        LibJS: Skip redundant marking of Shape property table keys
    
        All the keys in a property table are guaranteed to be marked via
        Shape::m_property_key in each step of the transition chain that leads
        up to the Shape.
    

    Right now if I do gh pr create the GH PR description will be

    - LibWeb: Add pair of methods to apply/reset scroll offset of paintable
    - LibJS: Skip redundant marking of Shape property table keys
    

    This is good, but why should I re-write all details that I already put as git msg body?
    Basically because if you do rebae and merge you will keep all commits, and this is good to check offline from git command line.

    With my changes, already in PR linked the output would be gh pr create --autofillverbose

    - LibWeb: Add pair of methods to apply/reset scroll offset of paintable
       Separate scroll application from before_children_paint and
       after_children_paint.
    - LibJS: Skip redundant marking of Shape property table keys
       All the keys in a property table are guaranteed to be marked via
       Shape::m_property_key in each step of the transition chain that leads
       up to the Shape.
    

    At least it is more complete, maybe you want summarize all thing in a bunch of words, but as default behavior without doing it manually it is a good output :)

  3. andyfeller commented on Jan 5, 2024

    @andyfeller
    Contributor

    With my changes, already in PR linked the output would be gh pr create --autofillverbose

    - LibWeb: Add pair of methods to apply/reset scroll offset of paintable
       Separate scroll application from before_children_paint and
       after_children_paint.
    - LibJS: Skip redundant marking of Shape property table keys
       All the keys in a property table are guaranteed to be marked via
       Shape::m_property_key in each step of the transition chain that leads
       up to the Shape.
    

    At least it is more complete, maybe you want summarize all thing in a bunch of words, but as default behavior without doing it manually it is a good output :)

    Firstly, I personally like the idea in being able to bring the content along. Not everyone or issue will be so cleanly crafted due to individual styles but I get it.

    Should git commit body be aligned the git commit title?

    • LibWeb: Add pair of methods to apply/reset scroll offset of paintable
      Separate scroll application from before_children_paint and
      after_children_paint.
    • LibJS: Skip redundant marking of Shape property table keys
      All the keys in a property table are guaranteed to be marked via
      Shape::m_property_key in each step of the transition chain that leads
      up to the Shape.

    Should there be spacing between the markdown list items for readability?

    • LibWeb: Add pair of methods to apply/reset scroll offset of paintable
      Separate scroll application from before_children_paint and
      after_children_paint.

    • LibJS: Skip redundant marking of Shape property table keys
      All the keys in a property table are guaranteed to be marked via
      Shape::m_property_key in each step of the transition chain that leads
      up to the Shape.

    Should the git commit titles be bolded?

    • LibWeb: Add pair of methods to apply/reset scroll offset of paintable

      Separate scroll application from before_children_paint and
      after_children_paint.

    • LibJS: Skip redundant marking of Shape property table keys

      All the keys in a property table are guaranteed to be marked via
      Shape::m_property_key in each step of the transition chain that leads
      up to the Shape.

    People will totally change this however they want, but I think a few stylistic formatting changes might make this more readable for reviewers and authors.

  4. guerinoni commented on Jan 5, 2024

    @guerinoni
    ContributorAuthor

    @andyfeller Yes you're right... Maybe the "best style" is the latest one you shared, title bold + space before commit msg... I'll change the implementation :)

  5. added
    gh-prrelating to the gh pr command
    and removed on Jan 11, 2024
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

    enhancementa request to improve CLIgh-prrelating to the gh pr commandhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions