4
0
mirror of https://github.com/QuasarApp/QuasarAppCI.git synced 2025-05-11 20:59:36 +00:00

move git url to ssh

This commit is contained in:
Andrei Yankovich 2021-09-09 10:56:07 +03:00
parent 1ced59fd9d
commit 37cf10b9a9
3 changed files with 25 additions and 1 deletions

@ -23,6 +23,7 @@
"git/gitBin.sh",
"qifRepogen.py",
"docs.py",
"stepfactory.py"
"stepfactory.py",
"customgithubhandler.py"
]
}

@ -2,6 +2,7 @@
from BuildBotLib.buildBotModule import BuildBotModule
from BuildBotLib.secretManager import SecretManager
from pathlib import Path
from BuildBotLib.customgithubhandler import CustomGitHubHandler
class BuildBotChangeSource(BuildBotModule):
@ -14,5 +15,6 @@ class BuildBotChangeSource(BuildBotModule):
'github':
{
'secret': secret.getValue('WebHook'),
'class': CustomGitHubHandler
},
}

@ -0,0 +1,21 @@
# This Python file uses the following encoding: utf-8
# if __name__ == "__main__":
# pass
from buildbot.www.hooks.github import GitHubEventHandler
class CustomGitHubHandler(GitHubEventHandler):
def handle_push(self, payload, event):
# This field is unused:
payload['repository']['html_url'] = payload['repository']['ssh_url']
return super().handle_push(payload, event)
@defer.inlineCallbacks
def handle_pull_request(self, payload, event):
payload['repository']['html_url'] = payload['repository']['ssh_url']
return super().handle_pull_request(payload, event)