You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @github/ce-cli, This is a more granular task list than what is listed in Neha's demo planning doc.
If you want to share what you are working on put it on the list and put your name next to it. If you are looking for what to do next, find something that isn't claimed and is on this list!
[prototype] gh pr create (fleshing out with args and better edge case handling) @vilmibm
Choice 1 works, but I am having trouble figuring out what each step does and why. But maybe pairing with @mislav could help me understand
Choice 2's pattern seems easier to understand, but maybe it's missing some edge cases?
Choice 3 is the very simple, but I feel like I must be something about Git and GitHub which makes this solution impractical.
Another choice I have to make is, when you checkout the branch should we use the branch name org-name:branch-name or should we use the pr number pr/4. Desktop use the pr/4 pattern, my initial leaning is towards the org-name:branch-name direction, but using the pr/number pattern gives all PR branches a nice clean namespace.
If we didn't want to allow for easy git push back to the PR, the pr checkout command would be trivial to implement. It would literally come down to this:
git pull without arguments won't do the Right Thing™
git push without arguments won't do the Right Thing.
Solving (1) is not that hard, but for solving (2) with default git behavior (git config push.default == "simple"), you would have to ensure that the checked out branch has the same name as the head branch, and that correct tracking configuration is set up. See mislav/hub#1495 (comment) for background.
We do currently handle all these cases in the prototype branch. Since the code I've ported from hub was likely confusing, and because I won't have time to pair with you today, I've sprinkled comments to clarify things: 9817924. Hope it helps!
I'm calling the pr create improvements for this week "done" without a merge; given all the changes in master i'd rather cleanly port pr create over next week and then do the reset of prototype to master.
For some reason I thought my PR was essentially un-mergable but it was fine, so i've marked it ready for review
I decided to punt on gh status after talking to @billygriffin about it.
I think the original idea behind gh status was something that could wrap git status and also tell you about things in the world of Pull Requests you might care about. I couldn't think of a way to make gh status useful given the functionality that's ended up in gh pr... and also didn't want to do any git wrapping.
Until we have an idea of how to make gh status useful without wrapping git or being redundant with gh pr... I'd rather see us work on other stuff.
One thing that might make things easier is if we add remotes if the PR is a fork. But I couldn't get a good understanding of the downsides to this idea.
Activity
probablycorey commentedon Oct 18, 2019
Today I wrestled with
gh pr checkoutand I've got some questions for @mislav and @vilmibm. There are a few options:Choice 1 works, but I am having trouble figuring out what each step does and why. But maybe pairing with @mislav could help me understand
Choice 2's pattern seems easier to understand, but maybe it's missing some edge cases?
Choice 3 is the very simple, but I feel like I must be something about Git and GitHub which makes this solution impractical.
Another choice I have to make is, when you checkout the branch should we use the branch name
org-name:branch-nameor should we use the pr numberpr/4. Desktop use thepr/4pattern, my initial leaning is towards theorg-name:branch-namedirection, but using thepr/numberpattern gives all PR branches a nice clean namespace.mislav commentedon Oct 18, 2019
If we didn't want to allow for easy
git pushback to the PR, thepr checkoutcommand would be trivial to implement. It would literally come down to this:This works, but in this new branch:
git pullwithout arguments won't do the Right Thing™git pushwithout arguments won't do the Right Thing.Solving (1) is not that hard, but for solving (2) with default git behavior (
git config push.default== "simple"), you would have to ensure that the checked out branch has the same name as the head branch, and that correct tracking configuration is set up. See mislav/hub#1495 (comment) for background.We do currently handle all these cases in the
prototypebranch. Since the code I've ported from hub was likely confusing, and because I won't have time to pair with you today, I've sprinkled comments to clarify things: 9817924. Hope it helps!probablycorey commentedon Oct 18, 2019
Thanks @mislav!
vilmibm commentedon Oct 18, 2019
I'm calling the pr create improvements for this week "done" without a merge; given all the changes in master i'd rather cleanly port pr create over next week and then do the reset ofprototypetomaster.For some reason I thought my PR was essentially un-mergable but it was fine, so i've marked it ready for review
vilmibm commentedon Oct 18, 2019
I decided to punt on
gh statusafter talking to @billygriffin about it.I think the original idea behind
gh statuswas something that could wrapgit statusand also tell you about things in the world of Pull Requests you might care about. I couldn't think of a way to makegh statususeful given the functionality that's ended up ingh pr...and also didn't want to do anygitwrapping.Until we have an idea of how to make
gh statususeful without wrappinggitor being redundant withgh pr...I'd rather see us work on other stuff.vilmibm commentedon Oct 18, 2019
demo: https://github.com/github/ce-cli/issues/15
probablycorey commentedon Oct 20, 2019
gh pr checkoutdidn't make it into master this week :( This is where I got https://github.com/github/gh-cli/compare/pr-checkout?expand=1 in case people want to draw inspiration from it next week. My goal was to understand what was happening in this code in more detail mislav/hub#1495 (comment). Like @mislav said above, getting it to work with pull is not bad, but getting push to work as well is tricky and more work because everything I read said you need to make sure the local branch name is exactly the same as the remote branch name.One thing that might make things easier is if we add remotes if the PR is a fork. But I couldn't get a good understanding of the downsides to this idea.
Merge pull request #16 from github/jg/ignore-pf-errs