git-bug
git-bug copied to clipboard
github bridge to shared (not owned) repository panics on "comment id not found"
I have a private repository that my user has access to via invite, i.e.
https://github.com/owner/repo
while I am user "user".
git bug push / pull works as expected, since it is just using git which works.
But using git bug bridge push (I have tested the same token on another repository and verified it works with git bug bridge pull/push) I get:
❯ git bug bridge push
panic: unexpected error: comment id not found
goroutine 22 [running]:
github.com/MichaelMure/git-bug/bridge/github.(*githubExporter).exportBug(0xc0000a8a50, {0x12c5b38, 0xc0003c4200}, 0xc0003102d0, 0x0?)
/home/alon/src/git-bug/bridge/github/export.go:345 +0x2265
github.com/MichaelMure/git-bug/bridge/github.(*githubExporter).ExportAll.func1()
/home/alon/src/git-bug/bridge/github/export.go:188 +0x527
created by github.com/MichaelMure/git-bug/bridge/github.(*githubExporter).ExportAll
/home/alon/src/git-bug/bridge/github/export.go:146 +0x2a5
Using built from source (a00f1a98972239c4a57cc126e9b41e6c4c53b023)
Is this use case supported? is it even possible to support it, i.e. does github allow persona tokens of user to edit issues on a repo owned by owner?
Thanks, Alon
This is the line where it happens: https://github.com/MichaelMure/git-bug/blob/247e1a865db29a3189acfd89cde776a52a7ebaac/bridge/github/export.go#L345
This is likely a bug in git-bug introduced when Comments got an interleaved id (https://github.com/MichaelMure/git-bug/blob/master/entity/id_interleaved.go), that hold both the bug Id and the comment Id. It's quite weird that the automated test don't catch it though ..
Thanks. I verified it is still present in 0.7.1-717-gdd8134b6 (git describe --tags), stack trace unchanged. Any pointers to trying to fix it? (on the low probability I manage to find the time)
Would you mind checking if that bug is still present in the last v0.8.0 release?