From 97485eb48db4c3ee4540ef665d5642ba6169027e Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Mon, 2 Jan 2023 20:30:09 +0530 Subject: [PATCH] Update webhook and setup --- buildbot_transifex/webhook.py | 9 ++++----- setup.py | 25 ++++++++----------------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/buildbot_transifex/webhook.py b/buildbot_transifex/webhook.py index f2c4864..817a41f 100644 --- a/buildbot_transifex/webhook.py +++ b/buildbot_transifex/webhook.py @@ -34,7 +34,7 @@ class TransifexHandler(BaseHookHandler): repository = payload['repository'] repo_url = repository['ssh_url'] - project = repository['full_name'] + project = repository['buildbot-transifex'] commits = payload['commits'] if isinstance(self.options, dict) and self.options.get('onlyIncludePushCommit', False): @@ -74,14 +74,14 @@ class TransifexHandler(BaseHookHandler): # Only handle potential new stuff, ignore close/. # Merge itself is handled by the regular branch push message 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 [] pull_request = payload['pull_request'] 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 [] 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 [] timestamp = dateparse(pull_request['updated_at']) base = pull_request['base'] @@ -189,5 +189,4 @@ class TransifexHandler(BaseHookHandler): return (changes, 'transifex') -# Plugin name transifex = TransifexHandler diff --git a/setup.py b/setup.py index 7f030f6..a58ee29 100644 --- a/setup.py +++ b/setup.py @@ -8,30 +8,21 @@ with open("README.md", "r") as fh: VERSION = "1.7.2" -setup(name='buildbot-gitea', +setup(name='buildbot-transifex', version=VERSION, - description='buildbot plugin for integration with Gitea.', - author='Marvin Pohl', - author_email='hello@lab132.com', - url='https://github.com/lab132/buildbot-gitea', - long_description=long_description, + description='buildbot plugin for integration with transifex.', + author='', + author_email='', + url='', + long_description='Transifex webhook', long_description_content_type="text/markdown", - packages=['buildbot_gitea'], + packages=['buildbot_transifex'], install_requires=[ "buildbot>=3.0.0" ], entry_points={ "buildbot.webhooks": [ - "gitea = buildbot_gitea.webhook:gitea" - ], - "buildbot.steps": [ - "Gitea = buildbot_gitea.step_source:Gitea" - ], - "buildbot.reporters": [ - "GiteaStatusPush = buildbot_gitea.reporter:GiteaStatusPush" - ], - "buildbot.util": [ - "GiteaAuth = buildbot_gitea.auth:GiteaAuth" + "transifex = buildbot_transifex.webhook:transifex" ] }, classifiers=[