Monorepo for Tangled tangled.org
856
fork

Configure Feed

Select the types of activity you want to include in your feed.

proposal: webhook support for git events #6

open opened by dvjn.dev

what?#

this proposal adds support for webhooks to notify clients of git events. this can include events such as:

  • branch / tag:
    • pushed
    • deleted
  • pull:
    • created
    • resubmitted
    • merged
    • closed
  • pull_comment:
    • created
  • issue:
    • created
    • closed
  • issue_comment:
    • created

why?#

i badly want to implement a ci system to move my projects to tangled.

that aside, this will allow for implementing clients that react to these events for usecases like:

  • ci pipelines
  • auto-deployments
  • bots for labelling, review, automerge, auto-close, etc.

how?#

  • creating webhook:: a webhook section in repo settings page to add the url and events. these will be saved in the knotserver database.
  • triggering webhook:: when a git event occurs, knotserver will trigger the webhooks saved in the database directly. for other events like pull creation, pull comment, etc, the appview will send an api call to the knotserver to trigger the webhook.

why trigger webhooks from the knotserver?

knotserver seems like the right place to trigger these webhooks from, since only it has access to the git events like branch creation, push, etc. also logically, knotserver seems like the right place to trigger the webhook, since it is the one hosting the git repo and it is expected to deal with the git events.


i think we should start with the core git events like branch push, tag push, etc. which would be the most impactful and useful for clients like ci servers.

let me know if this is something we would like to implement. i'd be happy to write up a more concrete spec and pr for this.

[deleted by author]

+1 Enabling CI capabilities would also make me more comfortable moving things to tangled

Aren't Tangled events published as ATProto events? There could be a service that would listen on ATProto stream and then apply required actions whenever matching event is encountered.

[deleted by author]

Ahh, ok. TIL

Indeed it would be handy to have actions/web hooks on these as well.

[deleted by author]
[deleted by author]
[deleted by author]
[deleted by author]

@nelind.dk While in a perfect world I'd agree, but hopefully there's going to be many users here on Tangled who have no interest in building for ATProto (aiming for a wider scope of devs who just happen to have an ATProto account). The Jetstream/Firehose will be a new concept to them, and they'll be very confused why they can't just find a thing that pushes out events they can capture — especially from a thing where it's easy to lag behind unless optimized properly — and likely be put off by Tangled.

[deleted by author]
[deleted by author]
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 9
AT URI
at://did:plc:holrda2u4swwau3v2fna2wib/sh.tangled.repo.issue/3lowaq74gkn22