Skip to content

Problem parsing comma when using: gh pr create --fill #8719

Description

@dlandis

Describe the bug

When I ran gh pr create --fill I had one commit on the branch with a msg like this:

Testing one, two, three

More details and some paragraphs here.

It looks like the CLI created the PR title with everything up to the first comma:

Testing one

Then the body/description for the PR included the rest of the first line in the body:

two, threeMore details and some paragraphs here.

So it was split after the first comma.

gh version 2.44.1 (2024-02-16)
https://github.com/cli/cli/releases/tag/v2.44.1

This might relate somewhat to this issue although I'm not sure:
#8706

Steps to reproduce the behavior

Create a branch with a single commit that has comma in the first line of the commit message. Then:

gh pr create --fill

Expected vs actual behavior

I would expect the whole first line of the commit message to be used as the subject for the PR. Not just the text up until the first comma.

Activity

  1. williammartin commented on Feb 20, 2024

    @williammartin
    Member

    Thanks for opening this issue and apologies for breaking you.

    I believe I can see why this would happen with the change from #8423 which I think makes some bad assumptions about commas: https://github.com/cli/cli/pull/8423/files#diff-ccedca01e076cd065987253b366873ca2bee2e28c9d0bc13d50d7b7795c0bf4eR252

    This is the second bug this PR has caused so I'm leaning towards reverting it.

  2. added
    priority-3Affects a small number of users or is largely cosmetic
    coreThis issue is not accepting PRs from outside contributors
    priority-2Affects more than a few users but doesn't prevent core functions
    gh-prrelating to the gh pr command
    and removed
    priority-3Affects a small number of users or is largely cosmetic
    on Feb 20, 2024
  3. williammartin commented on Feb 29, 2024

    @williammartin
    Member

    #8768 was merged yesterday, so a fix should go out in our next release. I would anticipate that being Tuesday.

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

    bugSomething isn't workingcoreThis issue is not accepting PRs from outside contributorsgh-prrelating to the gh pr commandpriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions