Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a pull request doesn't use commit message for PR description when the base branch has more commits #3350

Closed
maxfurman opened this issue Feb 24, 2022 · 6 comments · Fixed by #3523
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@maxfurman
Copy link

This extension used to use the latest commit message content to pre-fill the PR title and description when using the Create Pull Request feature. Now it only pre-fills the title and leaves the description blank. Did this behavior change intentionally? If so, is there a setting to switch it back?

  • Extension version: 0.36.2
  • VSCode Version: 1.64.2
  • OS: MacOS 10.15.7

Steps to Reproduce:

  1. Create a new branch
  2. Add a commit to that branch with a multi-line commit message
  3. Click the "Create Pull Request" button in the Source Control pane
  4. See that the Title is set to the first line of the commit message but the description is blank.
@alexr00 alexr00 self-assigned this Feb 24, 2022
@alexr00
Copy link
Member

alexr00 commented Feb 24, 2022

Thanks for the detailed issue! I'm not able to reproduce this issue. Can you share a sample commit message and how you committed (command line, VS Code source control view, etc.)?

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Feb 24, 2022
@maxfurman
Copy link
Author

Sure. I use the terminal with GIT_EDITOR="code --wait" to type the commit message into VS Code. We use a template for our commits so they all look like:

Commit title goes here

This commit does X Y and Z, and a few other
things too.

See Jira issue ABC-123

modified: src/app/whatever.rb
- changed this file

modified: src/app/another.rb
- and this one too

Generally speaking, I would want everything below the first line to be the description of the PR. The extension used to do this by default, so I'm not sure what changed.

@alexr00
Copy link
Member

alexr00 commented Feb 25, 2022

Thanks for the example and details. I tried with exactly your sample commit message and I'm still not able to repro the issue. A few more questions:

  • When do you push your branch?
  • Is there only the one new commit between on your "from" branch?
  • Can you share the Output from "GitHub Pull Request"?
  • Can you also open the developer tools (command Developer: Toggle Developer Tools) and share any output from the console?

My exact steps:

  1. git checkout -b <branchname>
  2. make sure I have GIT_EDITOR="code --wait"
  3. Edit a file
  4. git commit and paste in the example message
  5. "Create Pull Request" from the Source Control view.

I also tried with 4a: push branch.

@adamaslan
Copy link

Im having issues with gh pr create.

It doesnt auto-fill the title anymore either :/

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels May 6, 2022
@alexr00 alexr00 added this to the May 2022 milestone May 6, 2022
@alexr00 alexr00 changed the title Creating a pull request no longer uses commit message for PR description Creating a pull request doesn't commit message for PR description when the base branch has more commits May 6, 2022
alexr00 added a commit that referenced this issue May 6, 2022
@alexr00 alexr00 changed the title Creating a pull request doesn't commit message for PR description when the base branch has more commits Creating a pull request doesn't use commit message for PR description when the base branch has more commits May 6, 2022
alexr00 added a commit that referenced this issue May 6, 2022
@roblourens roblourens added the verification-steps-needed Steps to verify are needed for verification label Jun 2, 2022
@roblourens
Copy link
Member

Were you able to repro it @alexr00? Are there different steps?

@alexr00
Copy link
Member

alexr00 commented Jun 2, 2022

I was able to repro. The steps:

  1. Checkout topic branch A from base branch main.
  2. Make a commit on branch A.
  3. Make several commits on branch main.
  4. Fetch main if you don't already have the changes from step 3.
  5. Try to create a PR and verify that the PR description and title match those of the commit in step 2.

@alexr00 alexr00 removed the verification-steps-needed Steps to verify are needed for verification label Jun 2, 2022
@joyceerhl joyceerhl added the verified Verification succeeded label Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
5 participants