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:
parent
1ced59fd9d
commit
37cf10b9a9
@ -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
|
||||
},
|
||||
}
|
||||
|
21
BuildBotLib/customgithubhandler.py
Normal file
21
BuildBotLib/customgithubhandler.py
Normal file
@ -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)
|
Loading…
x
Reference in New Issue
Block a user