Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting the GitBucket News Feed elsewhere, on any new change? #3254

Open
sdbbs opened this issue Mar 17, 2023 · 1 comment
Open

Exporting the GitBucket News Feed elsewhere, on any new change? #3254

sdbbs opened this issue Mar 17, 2023 · 1 comment
Labels

Comments

@sdbbs
Copy link

sdbbs commented Mar 17, 2023

I have an installation of GitBucket on a NAS. I would like to export the News Feed - and only the News Feed - somehow, so it is accessible to an external public server.

It would have been really nice if I'd be able to export the News Feed as a single, self-contained, static .html file with all of the CSS built-in, so I get more-less the same design as on the original GitBucket instance - as an illustration, here is a screenshot of isgb.otago.ac.nz/infosci (since I cannot find a public demo of GitBucket anymore):

image

However, there is also an Atom feed (the orange button in the upper right corner of the screenshot), available at the gitbucket.url/activities.atom endpoint - and this would be much easier to export as a standalone file. However, as far as I can see, the activities.atom content is dynamically generated - so in any case I'd have to initiate a download from the endpoint, in order to export/save it as a file.

Also, let me note, that News Feed notifies pushes of commits by any user to any branch, as well as creation/deletion of branches (and probably other things, such as modifying issues).

So, I would basically like a new version of the activities.atom XML file exported, every time there is a relevant change (commits, or changes of branches) pushed to the GitBucket; either:

  • By sending the contents of the (newly updated) activities.atom endpoint to a public server via, say, HTTPS POST request;
  • Or, by saving the contents of the (newly updated) activites.atom endpoint as an XML file somewhere on the local filesystem where the GitBucket instance is hosted (here, the NAS).

Are there any options that would allow me to do this?

I looked through https://gitbucket-plugins.github.io/ and:

  • gitbucket-desktopnotify-plugin is apparently just JavaScript that instructs the browser to show a Desktop Notification (so you probably have to have GitBucket open in a web browser for this to work). I guess this would "trigger" every time there is some change that News Feed otherwise shows - which is great; and it could probably be modified so that instead of sending a "notification", it obtains the content of the activites.atom and sends that as a HTTPS POST request to a target public server. However, you'd have to have a browser open on GitBucket 24/7 to have this work, which makes the whole thing quite brittle - I'd rather have that GitBucket does this on "server level" in the background
  • There is Email Notifications plugin, which could be probably modified to send a POST request (or save a file), instead of sending an email - and it should also work "in the background" (on "server level") which is great; however, it seems to only trigger on modifications of issues and comments - but, the priority for me, is to show changes in repos and branches, and pushes of new commits

So, do I have any options to achieve this kind of export in GitBucket currently - and if so, what options do I have?

@takezoe
Copy link
Member

takezoe commented Mar 18, 2023

Rather, using Web Hook may be better if you only need new events. Though it doesn't send contents of Atom feed, it can send notifications to other servers when changes happen on GitBucket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants