Update webhook and setup
This commit is contained in:
parent
5885c8cbbe
commit
4f412af6d9
|
@ -74,14 +74,14 @@ class TransifexHandler(BaseHookHandler):
|
||||||
# Only handle potential new stuff, ignore close/.
|
# Only handle potential new stuff, ignore close/.
|
||||||
# Merge itself is handled by the regular branch push message
|
# Merge itself is handled by the regular branch push message
|
||||||
if action not in ['opened', 'synchronized', 'edited', 'reopened']:
|
if action not in ['opened', 'synchronized', 'edited', 'reopened']:
|
||||||
log.msg("Gitea Pull Request event '{}' ignored".format(action))
|
log.msg("Transifex Pull Request event '{}' ignored".format(action))
|
||||||
return []
|
return []
|
||||||
pull_request = payload['pull_request']
|
pull_request = payload['pull_request']
|
||||||
if not pull_request['mergeable']:
|
if not pull_request['mergeable']:
|
||||||
log.msg("Gitea Pull Request ignored because it is not mergeable.")
|
log.msg("Transifex Pull Request ignored because it is not mergeable.")
|
||||||
return []
|
return []
|
||||||
if pull_request['merged']:
|
if pull_request['merged']:
|
||||||
log.msg("Gitea Pull Request ignored because it is already merged.")
|
log.msg("Transifex Pull Request ignored because it is already merged.")
|
||||||
return []
|
return []
|
||||||
timestamp = dateparse(pull_request['updated_at'])
|
timestamp = dateparse(pull_request['updated_at'])
|
||||||
base = pull_request['base']
|
base = pull_request['base']
|
||||||
|
@ -189,5 +189,4 @@ class TransifexHandler(BaseHookHandler):
|
||||||
return (changes, 'transifex')
|
return (changes, 'transifex')
|
||||||
|
|
||||||
|
|
||||||
# Plugin name
|
|
||||||
transifex = TransifexHandler
|
transifex = TransifexHandler
|
||||||
|
|
25
setup.py
25
setup.py
|
@ -8,30 +8,21 @@ with open("README.md", "r") as fh:
|
||||||
|
|
||||||
VERSION = "1.7.2"
|
VERSION = "1.7.2"
|
||||||
|
|
||||||
setup(name='buildbot-gitea',
|
setup(name='buildbot-transifex',
|
||||||
version=VERSION,
|
version=VERSION,
|
||||||
description='buildbot plugin for integration with Gitea.',
|
description='buildbot plugin for integration with transifex.',
|
||||||
author='Marvin Pohl',
|
author='',
|
||||||
author_email='hello@lab132.com',
|
author_email='',
|
||||||
url='https://github.com/lab132/buildbot-gitea',
|
url='',
|
||||||
long_description=long_description,
|
long_description='Transifex webhook',
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
packages=['buildbot_gitea'],
|
packages=['buildbot_transifex'],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"buildbot>=3.0.0"
|
"buildbot>=3.0.0"
|
||||||
],
|
],
|
||||||
entry_points={
|
entry_points={
|
||||||
"buildbot.webhooks": [
|
"buildbot.webhooks": [
|
||||||
"gitea = buildbot_gitea.webhook:gitea"
|
"transifex = buildbot_transifex.webhook:transifex"
|
||||||
],
|
|
||||||
"buildbot.steps": [
|
|
||||||
"Gitea = buildbot_gitea.step_source:Gitea"
|
|
||||||
],
|
|
||||||
"buildbot.reporters": [
|
|
||||||
"GiteaStatusPush = buildbot_gitea.reporter:GiteaStatusPush"
|
|
||||||
],
|
|
||||||
"buildbot.util": [
|
|
||||||
"GiteaAuth = buildbot_gitea.auth:GiteaAuth"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
|
Loading…
Reference in New Issue
Block a user