MichaelMure / git-bug

Distributed, offline-first bug tracker embedded in git, with bridges

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Bridge uses everybody else's avatar but not the local user's

markusbkk opened this issue · comments

Just started using git-bug. Really loving it, thus far.
However, there's one little issue I've noticed.

When I configured the GitHub bridge and thus created a new user, it didn't ask me for an avatar URL nor did it take the one from my GitHub.

Now whenever I browse the local WebUI, all my co-workers have their avatars set but my own account appears as just a gray circle.
I can't find a way to manually set an avatar URL either.

Small thing but I feel it's a bug or TODO.

That's a good point.
In that scenario, the initial identity creation happen there, at the end of the bridge configuration process. We could add a prompt for the avatar URL, but frankly it would be just clunky and barely solve anything.

What's really missing is that the bridge is not updating the identities. It's definitely doable but nobody has done it yet.

Another piece missing is a CLI command to update identities details.

If you'd like to give it a shot, I could give you some hints.

That's a good point. In that scenario, the initial identity creation happen there, at the end of the bridge configuration process. We could add a prompt for the avatar URL, but frankly it would be just clunky and barely solve anything.

What's really missing is that the bridge is not updating the identities. It's definitely doable but nobody has done it yet.

Another piece missing is a CLI command to update identities details.

If you'd like to give it a shot, I could give you some hints.

I dunno if I'll have the time any time soon (I'm currently working on my own OS, a web framework for my day job, an alternative to man pages, and a Go based implementation of OpenBSD's/SerenityOS' pledge(2)) but I can certainly give it a try. Especially if you can give hints.

Unrelated, but my git-fu is escaping me. Is there any way to commit .git/git-bug? Not even necessarily as part of a main code repository (I know there might be issues with that. Especially with the bridge configuration) but merely as a backup, so it can be hosted elsewhere in archival form.

Especially if you can give hints.

For the bridge, it's simple conceptually, but can become tricky depending on the final API to use. Github for example:

  • in github/import.go there is ImportAll(), the main loop, going over the events of importMediator (~300LOC). This component make the queries to browse the remote updates. It needs to be updated to also retrieve identity updates.
  • from the main loop, events are dispatched to a series of handler that will ensure that the change is replicated locally. Again, this need to be updated to also cover the identities updates. Here, "the change is replicated" means ensuring that there is a corresponding operation in git-bug for that change. This corresponding operation is tagged in its metadata with IDs from github, so that in the next run it's easy to check if this operation already exist.
  • eventually, the bridge importer should trigger cache/RepoCache.Mutate() to modify the identity. Looking at the code, this function should be complemented with a version that accept metadata, as this is for now missing.
  • when everything is said and done, don't forget to proudly update https://github.com/MichaelMure/git-bug#importer-implementations

Unrelated, but my git-fu is escaping me. Is there any way to commit .git/git-bug? Not even necessarily as part of a main code repository (I know there might be issues with that. Especially with the bridge configuration) but merely as a backup, so it can be hosted elsewhere in archival form.

There is no point in doing that. Everything there is cached data (for fast access, indexing..), built from the raw operation data. You can delete it and it we be rebuilt from zero. For the actual bug/identity data, you can just push/pull.
There is also:

  • some values in the git config (notably, the bridge config but no credentials)
  • the bridge credentials, stored in a file somewhere in your OS user data.