-
-
Notifications
You must be signed in to change notification settings - Fork 271
feat: Github import #7
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
Comments
The same timeline is also available through the "normal" API v3: https://developer.github.com/v3/issues/timeline/ That said, 2+ years after its introduction, it's still marked as preview.
|
A bot/plugin would be nice that could sync tickets across git-bug and github. |
It would be useful to be able to sync tickets from an arbitrary bug tracker by plugging into the backend of git-bug. Something like this would be very useful to me, save for the fact I do not use GitHub.com at work. |
Yes, it should be designed in a generic way so we could support any bugtracker. Github is just the obvious first target. |
This would be an absolutely killer feature for me, as it could mean the ability to work on GitHub bugs completely offline, if syncs were two-way and incremental. ;) Obviously, an inflatable raptor would be nice too, but this could be a good first step. Thanks, in any case, for this awesome project, nice to see new blood in that area. |
|
yeah, i was also thinking that the |
I made some decent progress here:
|
On a side note, for a proper support for github, #52 needs to be implemented as well .. |
So this is .. done ? I would love to have some real world testing, any volunteer ? |
Some things I purposely leave for the future:
|
how about gitlab support now? ;) |
You could order the issues by last updated, then pull 10 issues at a time until you get back to the date you last checked @MichaelMure. |
@anarcat contribution more than welcome ;) I have a limited amount of manpower that will drastically reduce in the following weeks. If you want to give it a try, implement these interfaces. For reference, the github importer is around 750 lines or code, mainly due to the verbosity of the graphql code. |
@j-f1 interesting idea. A tricky thing though is the logical clocks. It's better to insert the new operations in the chronological order to have them ordered properly. Admittedly, I'm not doing that very well currently anyway ... |
@MichaelMure awesome, glad to see there's an interface and openness to the idea! |
So I gave this a shot. A few comments...
Thanks for the feature though! Can't wait to try it out. :) |
Awesome feedback, thanks!
Yeah, that's annoying. I've been pondering on renaming the binary to something like
Good point. I thought it would be intuitive once more bridge are added (the prompt would be
It's not stored. Agree on that, more explanation is needed.
I'll give a try with this repo. Hopefully I can hit the same bug. |
For logging in, how about redirecting users to https://github.com/settings/tokens/new?scopes=user,repo&description=git-bug%20token? You can alter the description and scopes as needed, but that would eliminate the need to log in on the terminal. Alternatively, you could create an OAuth app and authenticate with that. |
A question of taste I guess. I feel like it would be a bigger UX hurdle and prone to errors. The way I see it is that git-bug is a free software, meaning anyone can check that the auth informations are handled properly. It's here if anyone want to have a look. Having the token creation handled by git-bug also means that it can be automated if needed. It could be added as an alternative configure method though.
As far as I know, I can't. A Github Oauth app require an Authorization callback URL. That works for a website, not so much for a terminal app. Too bad, I heard the authorization policy is less crappy ... |
You could start a server on |
for the record, i loved that i didn't have to fire up a web browser to login. that part is awesome. just reassure me it's doing the right thing with my password. as for the second point: just make "enter" choose a sane default value (e.g. "github") and i'll be happy. and WRT git-rev: wow! didn't know about that newsletter, great! and there are way more git-bug-like packages than i thought!!! thanks :) |
Just because that link is a little buried in @MichaelMure's comment, here's the direct URL for the curious (like me!): https://git.github.io/rev_news/2018/09/19/edition-43/ |
@j-f1 the Authorization callback URL is unique, defined on github in the Oauth app configuration. Also the local server would most likely be unreachable from the internet. |
@anarcat I tried with your repo, and indeed it fails. I think that what happen is that github introduced the comment history earlier this year but these issues are older. Github simply doesn't have the data anymore. I'll have to change my code to ignore comment edition in these cases. |
@MichaelMure you can pass a custom redirect URL, as long as it starts with the configured URL. |
@j-f1 that means that a user would have to entrust their credential to a webservice somewhere, that is, unauditable code. Having that directly in git-bug make more sense imho. |
By the way, the resulting token is stored in the repo git config. Does someone see a reason why it would be a bad idea ? |
Alright, I changed the first prompt and added more explanation, it should be less prone to error now. |
@anarcat I fixed the code for the older issue/comment edition (not pushed yet). I discovered a new little surprise in your repository: you have an issue (linkchecker/linkchecker#60) opened by a now deleted user. In this case, Github just give a null user. |
oh wow, and here i thought that @ghost guy was super productive! ;) TIL! |
@anarcat It's working for your repo now (i.e. not crashing anymore). Could you check if you see something weird ? |
On 2018-10-06 03:02:39, Michael Muré wrote:
@anarcat It's working for your repo now (i.e. not crashing anymore). Could you check if you see something weird ?
will do, but it will take a few days.
|
Closing the issue, it's working :-) |
In a similar fashion as
git-bug
, Github expose in its graphql API both compiled data of an issue and a timeline of events.We can use this timeline to import issue into
git-bug
. However, there is some mismatch that need to be resolved. Notably, ingit-bug
, a person is:Where for Github, an actor is:
The text was updated successfully, but these errors were encountered: