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 issue failed: No matching repository (name for source repo of my fork) found for (name of source user for my fork) #1990

Closed
Esterni opened this issue Jul 12, 2020 · 14 comments · Fixed by #2778
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@Esterni
Copy link

Esterni commented Jul 12, 2020

Issue Type: Bug

Currently working on a fork that has since been renamed. Attempting to create an issue using any method (# TODO, Create Issue..., Create issue from selection...) gives a notification that no matching repos were found, but the names given are for the original repo and author names.

Unsure of the steps to reproduce specifically. I'm fairly new to using git overall, but have had guidance from someone more experienced. I'm told there's nothing particularly special about how I'm working with this.

Extension version: 0.17.0
VS Code version: Code 1.47.0 (d5e9aa0227e057a60c82568bf31c04730dc15dcd, 2020-07-09T08:02:06.629Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz (4 x 2594)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.88GB (1.79GB free)
Process Argv
Screen Reader no
VM 0%
@RMacfarlane RMacfarlane added bug Issue identified by VS Code Team member as probable bug issues labels Jul 16, 2020
@alexr00 alexr00 added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels Aug 10, 2020
@alexr00 alexr00 self-assigned this Aug 10, 2020
@alexr00 alexr00 added this to the Backlog milestone Aug 10, 2020
@alexr00
Copy link
Member

alexr00 commented Aug 10, 2020

@Esterni I think you need to update your remotes. What is the output of git remote -v in your repo? Does it show the original name or the rename?

@alexr00 alexr00 removed feature-request Request for new features or functionality issues labels Aug 10, 2020
@alexr00 alexr00 removed this from the Backlog milestone Aug 10, 2020
@alexr00 alexr00 added the info-needed Issue requires more information from poster label Aug 10, 2020
@Esterni
Copy link
Author

Esterni commented Aug 11, 2020

@alexr00 since creating this issue I've moved the project into it's own repo. My apologies for not being able to provide more information or troubleshooting on this

@sunt05
Copy link

sunt05 commented Jan 17, 2021

The issue here: I'm working on a forked repo and archived the upstream one; it seems this plugin always tries to create issues in the upstream repo and thus fails.

image

My repos with issues are the following:

  1. new one (origin): https://github.com/UMEP-dev/SUEWS
  2. old/archived one (upstream): https://github.com/Urban-Meteorology-Reading/SUEWS

Thanks for your help!

@alexr00
Copy link
Member

alexr00 commented Jan 18, 2021

@sunt05 can you try adding this setting

	"githubPullRequests.remotes": [
		"origin"
	],

By default, we try to be smart and look for an upstream repo. This setting should cause upstream to be ignored.

@sunt05
Copy link

sunt05 commented Jan 18, 2021

@sunt05 can you try adding this setting

	"githubPullRequests.remotes": [
		"origin"
	],

By default, we try to be smart and look for an upstream repo. This setting should cause upstream to be ignored.

Thanks for following up this issue.
The above, however, doesn't work; I have even tried to remove the upstream remote with a freshly cloned repo, no success either.

I'm happy to provide more diagnostic info if needed: I really like this feature and would like to use it in a forked repo.

@burkeholland
Copy link
Collaborator

burkeholland commented Jan 28, 2021

I'm unable to create the PR without an upstream defined. Which seems logical, but the extension seems like it knows about the upstream without me configuring it.

  1. Clone a fork
  2. Create a branch
  3. Push a change
  4. Start a PR

The extension recognizes the "parent repo", but is unable to create the PR for that repo with a "no matching repository" found error. If you manually add the upstream to the remotes, then the PR works. Are we expecting people to add the upstream, or should GHRPI handle that logic for them if they don't have it defined?

@RMacfarlane
Copy link
Contributor

We're expecting people to add the upstream, but we can do a better job of nudging them to do this.

If you don't set the upstream, we also won't try to fetch PRs from it in the tree. (A case where you might intentionally not set an upstream is If you've forked a project with the intent to diverge from the original.) Instead of automatically fetching data from the upstream everywhere, we could show a one-time notification if we detect something is a fork, asking if an upstream remote should be added, or show a message in the create PR view about it

@burkeholland
Copy link
Collaborator

Yeah - I like the upstream notification. Perhaps we could add it when they try to initiate the PR. This will match what people who are used to GitHub expect.

@burkeholland
Copy link
Collaborator

Added feature request to automatically create the upstream if it doesn't exist.

#2439

@alexr00
Copy link
Member

alexr00 commented Jun 14, 2021

@sunt05 we have added better upstream support. If you are still seeing this issue then please comment here and I'll reopen this issue and investigate further.

@alexr00 alexr00 closed this as completed Jun 14, 2021
@sunt05
Copy link

sunt05 commented Jun 14, 2021

Thanks for your work.
However, I'm sorry that the issue seems to persist: if I have a forked repo and would like a submit an issue to the forked repo, the plugin simply fails.
I've already set the Remotes to include only origin:
image

@alexr00 alexr00 reopened this Jun 14, 2021
@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 Jun 14, 2021
@alexr00 alexr00 added this to the June 2021 milestone Jun 14, 2021
alexr00 added a commit that referenced this issue Jun 14, 2021
@alexr00
Copy link
Member

alexr00 commented Jun 14, 2021

@sunt05 thanks for commenting back so quickly. We tried to do something smart when a repo is a fork, but we should not do that if you have your remotes configured at all. With the fix I merged, if you have your remotes configured, then we won't try to be smart about choosing an upstream repo for you.

You can try out the fix in our nightly build (extension id github.vscode-pull-request-github-insiders) tomorrow.

@sunt05
Copy link

sunt05 commented Jun 14, 2021

Great, thanks @alexr00 ! Will try this tomorrow.

@sunt05
Copy link

sunt05 commented Jun 16, 2021

Confirmed: it's working now with the nightly build!

Many thanks @alexr00!

@alexr00 alexr00 added the verified Verification succeeded label Jun 16, 2021
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
Development

Successfully merging a pull request may close this issue.

5 participants