Repository navigation
Improve GitHub bridge - #760
rng-dynamics wants to merge 2 commits into
Conversation
|
Hmmm, I'm not sure this fully makes sense. A bridge should probably not write it's own file. I understand you are doing that to keep track of the import progress? There is already a restart mechanism, although just storing the timestamp of the last successfully imported issue: https://github.com/MichaelMure/git-bug/blob/1939949fcdd5d540fd20ead79b9c5d27e85e8f9d/bridge/core/bridge.go#L378-L382 Would it be reasonable to piggyback on this mechanism or to extend it if a more granular progress tracking is necessary? Thank you for working on that. |
I used the file to keep track of the progress and then restart the import from where it has left off.
Sure, the bridge should not write its own file. The solution with the file should be viewed as a proof of concept. The GitHub API is more fragile these days. It's seems to me that we should have a good story to restart/continue an import, or to import only specific issues.
nixpkgs has about 24000 issues. Tracking the issue numbers would mean to just write the failed issue numbers somewhere (into the local config). I am not sure if that makes sense. The list could be quite long. Is the local config supposed to be also edited by humans? What do you think about having a command line argument for importing particular issues? Then I could imagine having a simple message at the end of the import. Imagine something like the following. $ git-bug bridge pull ... new issue: e0612737cebde57cb49b3f596ce045235a260258f70037d0f9860759ceba3e04 changed label: 682fcc468648af894d56930f714d36124db5ad5348e250ddb6ad42ce1b5b7bd0 import error: couldn't import issues 1254,174098,47786,50032 imported 24645 issues and 6644 identities with default bridge $ git-bug bridge pull --issues 1254,174098,47786,50032 ... new issue: 3719580985bde516469b3f596ce045235a260258f70037d0f451451435b00002 import error: couldn't import issues 47786 imported 3 issues and 1 identities with default bridge |
The local config is not supposed to be edited by humans. I was thinking, in addition (or even replacement) of Would that make sense?
Yeah, importing a subset of issue is definitely something useful. The tricky part is to figure out a way to make that generic for all bridges. In #241, there was a discussion about reusing git-bug's query language as such a bridge neutral way to define a selection. Each bridge would then apply the parsed query into their own filtering, either directly when querying the remote tracker or filtering before actually importing. That said, this is a bit different than importing specific issue number, but we could extend the query language to support that, it kinda make sense. |
|
To be clear about the last part, it could also make sense to have two different ways to configure the import: one for specific issues, one with a query. I'm just thinking out loud. |
|
for the nixpkgs repo (#749) i only get 4966 of (9150 + 32277 = 41427) issues = 12% |
this looks very much like a limitation of the github API also the github webinterface for NixOS/nixpkgs says
so we can use the github API to fetch the first 5000 items possible workaround: https://github.com/settings/admin
but this requires cooperation from the repo admins
so the fix: fetch-github-repo-data.sh |
|
it seems clear to me that one way that said, i'm going to close this for now to help keep the active board clean. if you wish to work on this tree in the future, you can always check it out like so: |
👍 on this. Are there any plans for such work to commense? FWIW, my initial use for git-bug years ago was to prepare a "thorough" list + stats of contributors to datalad (and then heudiconv) for JOSS publication submission. Now also to facilitate access/review of issues by "corporate friends" (if you see @yarikoptic-gitmate -- must be one of those) without interrogating github API, and potentially as a bridge later for transfer or sync between github and forgejo(+aneksajo) instances. But some projects indeed have lots of "history" behind. Would it be best to start off this PR rebased on master or ... ? |
Fix #749. The errors in #749 are seemingly arbitrary errors by github. I think we cannot really avoid them.
On this branch the bridge tries to import the issues one by one and keeps track of the progress in a file. Errors don't terminate the import and the import can be restarted. The details are up to discussion, but for now git-bug writes a text file
git-bug-importwith one issue-number per line.