#4275 RFE: Better webhook format for integrating support into OpenShift and other apps
Opened 5 years ago by ngompa. Modified 4 years ago

I'm looking at the idea of implementing native support for Pagure's webhooks in OpenShift as Fedora continues to adopt OpenShift for applications in its infrastructure.

However, there are a couple of deficiencies with our existing webhook format:

  • We cannot tell what type of webhook it is from the header (no X-Pagure-Webhook-Event) which makes filtering events very expensive
  • We do not have some basic information about commits included in any event that includes commit info (such as author, committer, author and commit date, and commit message)

The overall issue is that our webhook format is not even specified. It's instead part of the fedmsg documentation, which is rather problematic since it means we're dependent on fedmsg formatting for webhooks.

We should extend our webhooks to provide detail similar to what GitHub offers or similar to what GitLab offers.

We don't necessarily have to have the same format, but being broadly compatible in content with GitHub is useful so that if a GitHub API shim would be desired, it could be easily done.


Metadata Update from @pingou:
- Issue tagged with: RFE

5 years ago

Metadata Update from @pingou:
- Issue set to the milestone: 5.6

5 years ago

I'm not quite sure what is really needed here. I may be nice to break this down in smaller tickets so we can improve things increasingly :)

Metadata Update from @pingou:
- Issue set to the milestone: None (was: 5.6)

5 years ago

related: I set up a generic webhook for an openshift build and notice that the webhook gets hit for any operation in pagure (this is expected as the documentation says so). This is wasteful, though, as anything other than a commit shouldn't kick off a new build in openshift.

for instance - me opening and merging this PR caused like 5 builds to happen.

Login to comment on this ticket.

Metadata