Forgejo compatible webhook #3
Labels
No labels
bug
duplicate
enhancement
help wanted
infeasible
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
renovate-bot
renovate-security
security
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 22 hours 20 minutes
Due date
realaravinth
22 hours 20 minutes
No due date set.
Dependencies
No dependencies set.
Reference: LibrePages/librepages#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It would be nice to have an API endpoint such as
/api/v1/gitea
that accepts a Gitea webhook payload. Such a webhook could be set system wide by a Gitea instance to keep librepages informed of any new repository or branch created as well as any new push to all repositories.Librepages could then decide to checkout such a repository or branch based on configurable rules such as "the name of the branch is pages", "the name of the repo is pages".
A secret can be added to quickly discard unauthorized POST to the API.
Great idea! I'm working on a Gitea integration service (bootstrapped a couple of weeks ago, nothing interesting to publish yet). I think this webhook can be added to it.
I would like to keep the main service as generic as possible and provide integrations as separate services.
Logging time spent between 22-12-2022 to 255-12-2022
Summary
User can create new webhooks, a webhook can be associated to multiple repositories in the same forge instance. Webhook requests are processed to effect relevant changes within the system
Diff:
b93373e96b...0c6199494b
Summary
Diff:
d919bad570
Unit test webhook endpoint with signature verification.
@dachary: I've implemented a basic webhook integration where users can install webhooks to their repositories (or admins can set default webhooks from the admin panel). However, auto-enabling repositories for publication is not implemented as, I feel, it could lead to a lot of wastage.
This webhook integration removes the need for the user to notify LibrePages from the CI. A push event from the webhook on the deployed branch will update the deployment.
Workflow
Gitea compatible webhookto Forgejo compatible webhookSounds good. I did a cosmetic change for the title 😄
I followed suite with #17 :)
Feel free to reopen this issue if you think this needs more work.
Current implementation archives the bare minimum but to offer more would complicate the UX and the codebase. A LibrePages instance will serve multiple Forgejo (and other forge) instances. Supporting tighter integration without forgefed will require heavy involvement from LibrePages and forge instance admins.
I explored this matter with #16 and abandoned efforts due to the reasons mentioned here.