Pushing to a bridge does not push comments added via git-bug.

Labels: kind/bug

Timeline

Bryan Richardson (activeshadow) opened

To Reproduce

  1. Pull from bug tracker (in my case, self-hosted GitLab) using bridge
  2. Adopt an identity created when pulling via bridge
  3. Comment on one of the existing issues locally using git-bug
  4. Push to bug tracker using bridge

Expected

Comment added to issue locally using git-bug should be present on issue in bug tracker (based on this).

Actual

Comment not present on issue in bug tracker, but present when inspecting the issue locally using git-bug.

I've only tested with the GitLab bridge (and a self-hosted version of GitLab at that), so I'm not sure if the same thing happens with the other available bridges (or with the main gitlab.com).

Michael Muré (MichaelMure) added label kind/bug

Bryan Richardson (activeshadow) commented

@MichaelMure thank you for the quick turn-around! I'm assuming my issue here was due to the use of a self-hosted GitLab instance. Would this also affect issue labels? When I pulled from GitLab none of the labels were pulled, and when I labeled issues locally and pushed the labels didn't show up in GitLab.

Michael Muré (MichaelMure) commented

That might be another problem. Could you try the fix-gitlab branch and see if that fix it as well ?

Thanks for dealing with the bleeding edge, that's very helpful.

Bryan Richardson (activeshadow) commented

@MichaelMure OK so comments made locally are now being pushed to my self-hosted GitLab. Thank you!

It also looks like labels are being synced now... kinda. I say kinda because pulling labels from issues in GitLab seems to be hit or miss. Some issues locally will show labels added in GitLab, some won't. As an example, I had added some labels locally to issues that had labels in GitLab when they didn't get pulled initially (ie. before using the fix-gitlab branch). When i pushed to GitLab using the fix-gitlab branch, the local labels overwrote the remote labels completely, so I went and added the original labels back in GitLab. I then pulled from GitLab and only some of the original labels I added back got pulled. For other issues in GitLab that have labels already, they're not getting pulled down.

Also, I think the GitLab bridge is pulling deleted comments. I had a few comments locally that got pushed when I tried the fix-gitlab branch that I then deleted in GitLab since I had added them there too when they weren't pushed previously. I then pulled from GitLab and the deleted comments were pulled, meaning I now have two identical comments locally. This likely constitutes a separate issue.

Michael Muré (MichaelMure) closed the bug

Michael Muré (MichaelMure) opened the bug

Michael Muré (MichaelMure) commented

Are you able to reproduce the label issue with a clean local repository (that is, one where you never ran the broken code before) ?

Also, I think the GitLab bridge is pulling deleted comments.

git-bug doesn't have the notion of deleted comment at all. When you import, git-bug read the gitlab history, replicate the comment creation and just ignore the deletion. This is a normal behavior as of now.

Bryan Richardson (activeshadow) commented

Are you able to reproduce the label issue with a clean local repository (that is, one where you never ran the broken code before)?

I'll find some time to test the fix-gitlab branch against a clean local repo ASAP and get back to you on this.

git-bug doesn't have the notion of deleted comment at all. When you import, git-bug read the gitlab history, replicate the comment creation and just ignore the deletion. This is a normal behavior as of now.

Good to know, thank you!

Michael Muré (MichaelMure) closed the bug