terrakube icon indicating copy to clipboard operation
terrakube copied to clipboard

Forgejo/Gitea VCS support

Open bencurio opened this issue 1 year ago • 6 comments

Feature description 💡

It might be worth considering supporting the Forgejo / Gitea VCS. The API is very similar to GitHub, which is what the project creators are aiming for.

OpenID configuration: https://code.forgejo.org/.well-known/openid-configuration OpenAPI Spec: https://code.forgejo.org/api/swagger

bencurio avatar Jan 21 '24 09:01 bencurio

As an alternative for now you could connect to those repositories using SSH

https://docs.terrakube.io/user-guide/vcs-providers/ssh

alfespa17 avatar Jan 21 '24 14:01 alfespa17

Thank you, I found it in the meantime :-)

bencurio avatar Jan 21 '24 14:01 bencurio

is there a way to get the webhook information in the ui or api? I use gitea and the webhook/api should be the exact same as github so I was hoping to be able to manually add the hooks

NegativeFeedback avatar Apr 02 '24 19:04 NegativeFeedback

is there a way to get the webhook information in the ui or api? I use gitea and the webhook/api should be the exact same as github so I was hoping to be able to manually add the hooks

Not sure if I understand correctly, do you want to add manually the webhook?

alfespa17 avatar Apr 02 '24 19:04 alfespa17

yes, I can fake it through github to get a payload url and copy that over to gitea but I cant find a way to get the secret. sorry if that was confusing!

NegativeFeedback avatar Apr 02 '24 19:04 NegativeFeedback

The secret to

yes, I can fake it through github to get a payload url and copy that over to gitea but I cant find a way to get the secret. sorry if that was confusing!

Not sure if this help, but you put the github secret when you create the VCS connection like the following for github enterprise:

image

Internally the webhook information is created in this part of the code.

https://github.com/AzBuilder/terrakube/blob/5fcf7610d9d4db3f4efafa40df30c5d64a7c59c1/api/src/main/java/org/terrakube/api/plugin/vcs/provider/github/GitHubWebhookService.java#L92

And there is one internal table called "webhook" with the information

https://github.com/AzBuilder/terrakube/blob/main/api/src/main/java/org/terrakube/api/rs/webhook/Webhook.java

I hope this can help.

alfespa17 avatar Apr 02 '24 20:04 alfespa17