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

Placeholder title when creating a PR does not behave like GitHub website #2988

Closed
mcaballeropinto opened this issue Sep 5, 2021 · 14 comments · Fixed by #3321
Closed

Placeholder title when creating a PR does not behave like GitHub website #2988

mcaballeropinto opened this issue Sep 5, 2021 · 14 comments · Fixed by #3321
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@mcaballeropinto
Copy link

mcaballeropinto commented Sep 5, 2021

Issue Type: Bug

Repro steps:

  1. Create a branch
  2. Commit once
  3. Push branch
  4. Create a new pull request using the VS Code extension

Expected:

  • As there is only one commit, the first line of the commit becomes the placeholder of the PR title and the rest of lines are pasted in the description
  • This is what happens if you create the PR in the GH website

Actual:

  • The placeholder of the PR title is the branch name

Extension version: 2021.9.1985
VS Code version: Code 1.60.0 (Universal) (e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff, 2021-09-01T10:54:53.442Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 3
Memory (System) 16.00GB (0.09GB free)
Process Argv --crash-reporter-id 28bd1807-0bda-4011-b469-c3c4de71e6be
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt678:30270856
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30358481
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30360495
bridge0723:30353136
pythonf5test824cf:30361778
vsdyn478:30356813
pythonvspyt187:30362782
pydsgst2:30361792
vscus224cf:30358040
vssid140:30362080

@mcaballeropinto mcaballeropinto changed the title Placeholder title when creating a PR does not behave like GitHub Placeholder title when creating a PR does not behave like GitHub website Sep 5, 2021
@alexr00 alexr00 self-assigned this Sep 21, 2021
@alexr00 alexr00 added the bug Issue identified by VS Code Team member as probable bug label Sep 21, 2021
@alexr00 alexr00 added this to the October 2021 milestone Sep 21, 2021
@mtaran
Copy link

mtaran commented Sep 24, 2021

I've been seeing this recently and I suspect it's due to #2846 (since that was the only change in the right timeframe).

@joshuaobrien any thoughts on what might have happened?

@alexr00 alexr00 modified the milestones: October 2021, September 2021 Sep 24, 2021
@joshuaobrien
Copy link
Contributor

Thanks for the tag. I'll take a look @mtaran

@alexr00 alexr00 removed this from the September 2021 milestone Sep 29, 2021
@alexr00 alexr00 added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels Sep 29, 2021
@alexr00
Copy link
Member

alexr00 commented Sep 29, 2021

I'm not seeing this now. @mcaballeropinto does your repo have a PR template?

@mcaballeropinto
Copy link
Author

Nop, it does not. This is issue is actually intermittent, I sometimes get the right title but others I get the branch name. I can't figure out how to repro it consistently.

@alexr00
Copy link
Member

alexr00 commented Sep 30, 2021

Closing for now. If I see it again I'll re-open.

@alexr00 alexr00 closed this as completed Sep 30, 2021
@melink14
Copy link

I'm seeing this now as well. (Spent awhile looking for the setting to fix before realizing the settings were removed)

I'm not sure which info is needed though. I first reproduced it with an unpublished branch but can also reproduce it with a random branch like: https://github.com/melink14/rikaikun/tree/melink14/xo

(Creating pull request in Github UI behaves as expected with title == commit)

@alexr00
Copy link
Member

alexr00 commented Jan 24, 2022

Reopening for further investigation.

@alexr00 alexr00 reopened this Jan 24, 2022
@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 Jan 24, 2022
@alexr00 alexr00 added this to the February 2022 milestone Jan 24, 2022
@melink14
Copy link

melink14 commented Jan 24, 2022

As a follow up, I realized that melink14/xo branch has two commits so it's not the best example. Though the behavior still differs from the Github default of using the first commit.

I went ahead and published the branch I first noticed this on (without opening a PR) for easier testing:
https://github.com/melink14/rikaikun/tree/melink14/pure-esbuild

In this one as well, Create Pull Request in vscode gives Melink14/pure-esbuild while github gives title from commit.

@mtaran
Copy link

mtaran commented Jan 24, 2022

+1!

I also still hit this pretty regularly. I only noticed that it's not especially consistent, but happens less on already-uploaded branches.

Would love to see this fixed, since it's a key part of one of the most common and high-impact uses of this extension.

@arnetheduck
Copy link

One way I've been able to reproduce:

when creating a PR that targets a non-default branch, after switching to it the title and description should be updated, iff the new branch has a single commit only compared to the new "into" branch.

This is something that happens quite often when developing against an "unstable" branch, while the "stable" branch is set as the default.

Github automatically detects when switching into branches and fills in the title / description.

@TylerLeonhardt
Copy link
Member

Verfied but opened #3357 as a result of testing this

@melink14
Copy link

Commenting here to preserve past context but let me know if opening a new issue would be preferred.

I'm still seeing this for about 50% of new PRs I create but I'm not sure exactly what could be causing it.
It happened when creating this PR most recently: melink14/rikaikun#980

This branch was ontop of main with only one commit made via the vs code source control UI.

The output doesn't appear to have anything logged when creating a pull request; is there someway to turn on verbose logging and get output containing the reasons why it chose fallback PR title?

@alexr00
Copy link
Member

alexr00 commented Apr 19, 2022

@melink14 I just pushed some additional logging around how we get the title. It will be available in the preview version of the extension tomorrow. If you want to help track this down, you can install the preview version tomorrow and use the setting "githubPullRequests.logLevel": "debug" to enable the debug logging. Then, next time you see the issue can you share the output from "GitHub Pull Request"? The important lines should have "CreatePullRequestViewProvider" in them. Thank you!

@melink14
Copy link

Thanks alex, I switched to preview version and will set log level in preparation for helping debug!

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
7 participants