Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85805009
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/lilybuild/lilybuild/forgejo.py b/lilybuild/lilybuild/forgejo.py
index d53060c..dab9f3b 100644
--- a/lilybuild/lilybuild/forgejo.py
+++ b/lilybuild/lilybuild/forgejo.py
@@ -1,24 +1,24 @@
from twisted.internet import defer
from buildbot.www.hooks.github import GitHubEventHandler
PARENT_FIRST = 'PARENT_FIRST'
CHILD_FIRST = 'CHILD_FIRST'
# Forgejo webhooks return the commits in child-first order
# https://codeberg.org/forgejo/forgejo/issues/7737
# This helper class intercepts the payload and reverse the
# order of the commits.
class ForgejoEventHandler(GitHubEventHandler):
- def __init__(self, commits_order=CHILD_FIRST, **kwargs):
+ def __init__(self, secret, strict, commits_order=CHILD_FIRST, **kwargs):
self.commits_order = commits_order
- super().__init__(**kwargs)
+ super().__init__(secret, strict, **kwargs)
@defer.inlineCallbacks
def _get_payload(self, request):
payload = yield super()._get_payload(request)
if 'commits' in payload and self.commits_order == CHILD_FIRST:
payload['commits'].reverse()
return payload
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Oct 10, 9:07 PM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1785457
Default Alt Text
(1 KB)
Attached To
Mode
rB lilybuild
Attached
Detach File
Event Timeline
Log In to Comment