snarfed / bridgy

📣 Connects your web site to social media. Likes, retweets, mentions, cross-posting, and more...
https://brid.gy
Creative Commons Zero v1.0 Universal
705 stars 52 forks source link

Bridgy Publish feature request: Support posting to GitLab sites #1397

Open tantek opened 1 year ago

tantek commented 1 year ago

It would be great if there was a way to post issues & comments for GitLab repos, on a personal site, and have Bridgy Publish syndicate them to the actual GitLab repos. e.g. feature requests to Pleroma:

Such as:

(Originally published at: https://tantek.com/2023/019/b1/bridgy-publish-support-gitlab)

snarfed commented 1 year ago

Definitely! New silo instructions, for posterity: https://bridgy.readthedocs.io/#adding-a-new-silo

snarfed commented 1 year ago

APIs for issues and comments look pretty complete.

jpcaruana commented 1 year ago

If someone wanted to give this a try, would you recommand or caution against using the python client library https://python-gitlab.readthedocs.io/ ?

snarfed commented 1 year ago

Hmm! I don't know. For conventional REST APIs that use OAuth 2 and accept and return JSON, those are simple enough that I'm now generally trying to avoid libraries and just use eg requests and requests-oauthlib directly. I don't feel strongly though, I'm ok with a lib if there's a good reason!

First step would be to add GitLab to oauth-dropins, which I'd definitely recommend doing with eg requests-oauthlib, not a GitLab-specific library. Instructions here.

I'm also curious if there's any parity between the GitHub and GitLab APIs? eg I noticed that GitLab has both REST and GraphQL APIs, like GitHub. Not important though.

jpcaruana commented 1 year ago

I'm now generally trying to avoid libraries and just use eg requests and requests-oauthlib directly.

I aggree with you.

I noticed that GitLab has both REST and GraphQL APIs, like GitHub

Gitlab REST API is pretty simple to use. The only issue I can see here is: would we take into account self-hosted Gitlab instances?

snarfed commented 1 year ago

The only issue I can see here is: would we take into account self-hosted Gitlab instances?

Maybe eventually, but I wouldn't worry about it for our first pass.