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

No pull requests listed with hub 2.3.0-pre8 #44

Closed
tarsius opened this issue Oct 12, 2016 · 6 comments
Closed

No pull requests listed with hub 2.3.0-pre8 #44

tarsius opened this issue Oct 12, 2016 · 6 comments
Labels
hub related to the CLI tool `hub`; no longer used waiting waiting on more information; see CONTRIBUTING.md

Comments

@tarsius
Copy link
Contributor

tarsius commented Oct 12, 2016

For me "Issues and Pull Requests" does not list any of the latter. I'm using hub 2.3.0-pre8, haven't tried with 2.2 yet (but wanted to use magithub for the first time to create an issue now ;-). hub issue also doesn't list any pull requests.

@vermiculus
Copy link
Owner

vermiculus commented Oct 12, 2016

Hmm… you're right. It looks like 2.3 just doesn't return pull requests for hub issue like it used to 😠

I'll see what I can do to mitigate this. Related #43


It looks like this was taken out intentionally and there are no plans to include it in hub issue – a separate command will apparently be written (mislav/hub#1232).

There's nothing I can do until it's supported again in hub; I'm sorry ☹️ At least with #43, it's no longer called "Issues and Pull Requests".

@tarsius
Copy link
Contributor Author

tarsius commented Oct 12, 2016

I went back to 2.2.9 and that works.

@mislav
Copy link

mislav commented Oct 12, 2016

@vermiculus To reflect our web UI, I decided that hub issue should only list issues and that there should be a separate command for listing pull requests. This command will come soon and will definitely be included in the stable release.

How is magithub using hub issue? Will it be inconvenient that there are separate commands for listing issues/PRs?

@vermiculus
Copy link
Owner

Magithub basically just parses the output of various hub commands as best it can and inserts them into the magit-status buffer.

Specifically for hub issue, in 2.2.x I was able to parse each line of output with a simple regex (<num>]<title>(<url>)) and detect pull requests by the URL. These issues were then processed into objects and inserted into the buffer as actionable sections.

In 2.3.x (or 3.x, which makes more sense to me), I'm able to use the new --format option (which is awesome, by the way!) to make it more foolproof (yet overall a little more complicated) to parse. They're eventually parsed into the same objects and inserted into the buffer the same way.

The only true inconvenience I can foresee (that can't be really solved with any amount of code on my end) is the extra network lag for pulling issues and then pull requests – I imagine it would take the same amount of time for both commands (since right now hub just filters them out or information already received). This would be mitigated (for all users of hub) by the caching functionality described in mislav/hub#1232, but I know from personal experience that caching is, in general, a hard problem.

@mislav
Copy link

mislav commented Oct 12, 2016

I'm able to use the new --format option (which is awesome, by the way!) to make it more foolproof (yet overall a little more complicated) to parse.

That's exactly why the --format option was introduced.

the extra network lag for pulling issues and then pull requests

Do you always need to fetch both lists at the same time? Maybe hub issue could have a flag to not filter out PRs.

@vermiculus
Copy link
Owner

Do you always need to fetch both lists at the same time?

The answer is… probably. I don't think Magithub will ever reach a level of sophistication where those individual sections can all be turned on/off (though this is happening for CI status, so maybe I'm already wrong). The fewer network calls I have to make, the better: emacs is 'by default' a single-threaded application (see #37) so I don't want to lock folks up too bad.

@vermiculus vermiculus added hub related to the CLI tool `hub`; no longer used waiting waiting on more information; see CONTRIBUTING.md labels Oct 14, 2016
vermiculus added a commit to vermiculus/hub that referenced this issue Feb 15, 2017
This change adds a long-form flag `--show-pulls` to `hub issue` that
directs hub to include pull requests in the issue listing.  The
default value is false; the default behavior does not change.

Temporary fix until a better abstraction for pull requests can be
designed.

Related: mislav#1303
Related: vermiculus/magithub#44
vermiculus added a commit that referenced this issue May 14, 2017
Hub-independence

Fixes #6, #15, #18, #19, #44, #58, and #75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hub related to the CLI tool `hub`; no longer used waiting waiting on more information; see CONTRIBUTING.md
Projects
None yet
Development

No branches or pull requests

3 participants