Skip to content

Add GitLab support#9

Draft
sondrebr wants to merge 3 commits intoboegel:mainfrom
sondrebr:add-gitlab-support
Draft

Add GitLab support#9
sondrebr wants to merge 3 commits intoboegel:mainfrom
sondrebr:add-gitlab-support

Conversation

@sondrebr
Copy link
Copy Markdown

Implements support for handling GitLab events.

The PyGHee class is configurable for GH vs. GL using the event_source parameter, which defaults to 'github'.
When it is configured to handle GitHub events it should function as before, meaning that this PR (hopefully) does not contain any breaking changes.

This implementation assumes that some intermediary, e.g. a custom Smee server, uses the webhook secret to sign the event and add an X-Gitlab-Signature header since GitLab does not yet support webhook signatures.

I'm open to making both major and minor changes if you have any suggestions. I personally think the if/elif/elses look a bit messy, especially in the constructor.

@sondrebr sondrebr marked this pull request as draft April 14, 2026 12:16
@sondrebr
Copy link
Copy Markdown
Author

Changing this to draft while waiting for GitLab to implement signed webhooks, which seems like might happen soon: https://gitlab.com/gitlab-org/gitlab/-/work_items/19367

Based on the issue description, the signature will be "an HMAC-SHA256 hex digest of {timestamp}.{webhook-uuid}.{payload}, prefixed with sha256=". I will likely update this PR sometime in the coming days to verify this kind of signature instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant