Hi,

That sounds like a neat idea. And Allura has a good amount of import & export behavior already so you'd have a good starting point to work from.

For importers, you can start by looking at ForgeImporters/setup.py where it has a [allura.importers] section that points at several types of importers. Those reference python classes like GitHubTrackerImporter, and more could be added. They all inherit ToolImporter and will get some behavior for free, like showing up on every projects' Admin > Import page.

For exporters, there is a Admin > Export page for every project, but it isn't as flexible to support additional export formats currently. That page is set up by this function:
    @expose('jinja:allura.ext.admin:templates/export.html')
    def export(self, tools=None, with_attachments=False):

And then backend work is done by `class BulkExport` and the `def bulk_export` functions across the codebase.

If you want realtime mirroring, that sounds more challenging, but could be possible by expanding upon Allura's REST APIs https://forge-allura.apache.org/docs/getting_started/administration.html#public-api

Other parts of our docs cover installation and some general concepts of the code & systems, so might be helpful. https://forge-allura.apache.org/docs/index.html

Happy to answer any more questions you might have


On 3/5/24 12:56 AM, Loïc Dachary wrote:
Hi,

I would be grateful if someone had a few pointers regarding the import / export operations in Allura. I'm working on data portability between forges, in the context of the F3 project[0], and I'd like to write a driver for Allura. It would allow for bi-directional mirroring from/to other forges. Not just the repository but also issues[1].

Cheers

[0] https://f3.forgefriends.org
[1] https://forge-allura.apache.org/p/allura/wiki/Features/


--
Dave Brondsema : d...@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Reply via email to