philschatz / atom-pull-requests

:octocat: View/Edit comments on a Pull Request directly inside the Atom Editor
47 stars 9 forks source link

How to make this work with an upstream #8

Closed plessbd closed 7 years ago

plessbd commented 8 years ago

So I have a question that I have not found the answer to.

This might be "support forked Pull Requests" and I just dont know it

I have my fork of a private repository I do a pull request to the upstream repo. Is there a way for me to see the pull request comments if I only have my repo checked out?

as an example

git remote -v

coworker1 git@github.com/coworker1/repo.git (push)
coworker1 git@github.com/coworker1/repo.git (fetch) 
origin git@github.com/plessbd/repo.git (push)
origin git@github.com/plessbd/repo.git (fetch) 
upstream git@github.com/myorg/repo.git (push)
upstream git@github.com/myorg/repo.git (fetch) 

I am willing to help test this out if it is something you are working towards, I have never worked on an atom plugin before though

philschatz commented 8 years ago

Ah yes, that is the "support forked Pull Requests" item. One challenge is that it is unclear which GitHub repository to search for Pull Requests data (since there is no information in the local git repository).

I can probably search for Pull Requests in the current repository (that is what happens currently) as well as the original repository since GitHub does provide a parent: field when getting information about a repository (Example: search for parent: in https://api.github.com/repos/philschatz/tree-view ).

I hope that helps!

plessbd commented 8 years ago

It does, explains why I cant find anything :)

What about looking for the upstream remote as a way to know where to look?

That seems to be the "standard" https://help.github.com/articles/syncing-a-fork/ way of referencing the parent. [edit] Or maybe a configuration that allows the user to set the upstream remote name that they want to use?

philschatz commented 8 years ago

11 should work. Are you still interested in testing? It does not use the upstream field in the git config because I do not know if that information is available to atom. But it does use the parent repo if this repo was forked in GitHub.

plessbd commented 8 years ago

I am willing to test it. Sorry it took so long to reply.

What do I need to do? Currently I cannot see anything related to the pull request

cbrownrt commented 8 years ago

This would be a big help, since we are using GitHub Flow, but I can't even get it to work on PRs within a repo.