Coder Social home page Coder Social logo

feat: Github exporter about git-bug HOT 7 CLOSED

michaelmure avatar michaelmure commented on June 27, 2024 4
feat: Github exporter

from git-bug.

Comments (7)

MichaelMure avatar MichaelMure commented on June 27, 2024 3

The exporter just landed in master, which means you can use git-bug as an offline remote for github !

There is still a few things to take care of to have a very robust bridge (#164 #167 #175 #176 ), but most of the job is done

from git-bug.

MichaelMure avatar MichaelMure commented on June 27, 2024 1

This is @a-hilaly 's task now, as part of the Summer of Code 🎉 🎉

from git-bug.

anarcat avatar anarcat commented on June 27, 2024

this is a followup to #7 which does the opposite, of course.

from git-bug.

cfilipov avatar cfilipov commented on June 27, 2024

Looking at the GitHub API I don't see any way to set the created timestamp on an issue using either the rest api or graphql. This means that unfortunately timestamps of all issues exported to github will not match what's in git-bug. This may also be a problem for syncing, which time stamp is treated as authoritative?

from git-bug.

MichaelMure avatar MichaelMure commented on June 27, 2024

@cfilipov It won't be a problem for syncing.

The Github importer is tagging operation in git-bug with the corresponding id on Github (for example: https://github.com/MichaelMure/git-bug/blob/master/bridge/github/import.go#L134). When doing an import again, the importer will look for this tag to recognize an already imported event and import what is missing.

For the exporter it's a little trickier because you can't tag an already persisted operation, the data model is immutable. What is possible though is to create a new operation (let's call it SetMetadataOperation) that will tag retroactively another operation (the same way EditCommentOperation operate on a previous comment). When a bug is compiled into a snapshot, this new operation will append the new tag into a previously defined operation.

The Github exporter will replicate the operation stored in git-bug through the Github API and then add in git-bug a series of SetMetadataOperation to tag retroactively the operation with the corresponding Github id. When doing another export, only the operation that are not tagged will be replicated on Github.

So yes, the timestamp won't match exactly but I don't think that it will be that much of a problem, especially if the exporter is ran automatically after each edit.

from git-bug.

MichaelMure avatar MichaelMure commented on June 27, 2024

Alternatively, the exporter could also use the NoOpOperation to store arbitrary metadata in an issue timeline without doing any changes.

from git-bug.

MichaelMure avatar MichaelMure commented on June 27, 2024

@cfilipov Btw, if you want to give it a try you are more than welcome, I probably won't have time to work on it for a while as I just started a new job.

from git-bug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.