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

[RFC] Support workflow with forks #66

Open
chshersh opened this issue Mar 22, 2019 · 3 comments
Open

[RFC] Support workflow with forks #66

chshersh opened this issue Mar 22, 2019 · 3 comments
Labels
CLI command-line interface enhancement New feature or request GitHub GitHub API question Further information is requested

Comments

@chshersh
Copy link
Contributor

hit is very convenient when working with repos you own. But sometimes I still need to work with forks. I wonder, whether it's possible to make hit work with forks without sacrificing current UI.

My typical workflow with forks include:

  1. Fork repo on GitHub.
  2. Clone my fork (already can be achieved by hit clone command).
  3. Do my work (all hit command work here)
  4. Show all remotes (can be hit remotes command)
  5. Add remote of the original repo (can be hit add-remote <owner>/<repo>)
  6. Rebase on the branch from the remote repo (probably can patch hit fresh command so it understands hit fresh <remote>/<repo>).
  7. Push and open PR.

What do you think?

@chshersh chshersh added enhancement New feature or request question Further information is requested GitHub GitHub API CLI command-line interface labels Mar 22, 2019
@krisis
Copy link

krisis commented Oct 15, 2019

@chshersh It would be awesome to have this feature in hit.
I have a question regarding how listing of issues would work in the presence of forks. Usually the upstream repository is where the issues are maintained, so hit issue should be listing issues from the upstream repository, right?

@chshersh
Copy link
Contributor Author

@krisis We haven't designed this feature entirely yet. But I tend to agree that listing of all issues should be from the upstream repository by default. And since we're using github library, we can get the information about whether the library is a fork or not:

Note, that even if forked projects can have their own issues as well (like the following library):

But I guess a more typical workflow with forked libraries is when you're not a maintainer, but rather a contributor. And you want to list all issues from the original repo, not from the fork.

@krisis
Copy link

krisis commented Oct 23, 2019

@chshersh, I agree with the points you make above. I hadn't thought through the different combinations of forks vs owned repositories and maintainer vs contributor when I made the comment earlier.

This is how I imagine the workflow for a contributor working on forked project to be,

  1. Fork your favorite project on github.com
    e.g, kowainik/hit-on to krisis/hit-on

  2. Clone the repo

hit clone hit-on

This should,

  • Clone the repo from your fork (if available), else fail the command
  • Set origin and upstream accordingly like e.g, upstream would be kowainik/hit-on and origin would be krisis/hit-on
  1. List the issues (upstream) that you can pick and work on
hit issue 
  1. If the contributor wishes to track personal development milestones using issues in their fork
    We could make it possible using a boolean flag like,
hit issue --local

Is this close to how you are thinking about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI command-line interface enhancement New feature or request GitHub GitHub API question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants