from octomachinery.app.routing.decorators import process_webhook_payload from octomachinery.app.runtime.context import RUNTIME_CONTEXT from octomachinery.app.server.runner import run as run_app @process_event_actions('issues', {'opened'}) @process_webhook_payload async def on_issue_opened( *, action, issue, repository, sender, installation, assignee=None, changes=None, ): """Whenever an issue is opened, greet the author and say thanks.""" github_api = RUNTIME_CONTEXT.app_installation_client comments_api_url = issue['comments_url'] # await github_api.post(url, data={"body": message}) # url = f"/repos/mariatta/strange-relationship/issues/{issue_number}/comments" if __name__ == "__main__": run_app( name='PyCon-Bot-by-webknjaz', version='1.0.0', url='https://github.com/apps/pyyyyyycoooon-booooot111', )
from octomachinery.app.server.runner import run as run_app from octomachinery.routing import process_event_actions from octomachinery.routing.decorators import process_webhook_payload from octomachinery.runtime.context import RUNTIME_CONTEXT @process_event_actions('issues', {'opened'}) @process_webhook_payload async def on_issue_opened(*, issue, **_kw): """Whenever an issue is opened, greet the author and say thanks.""" github_api = RUNTIME_CONTEXT.app_installation_client comments_api_url = issue['comments_url'] author = issue['user']['login'] message = ( f'Thanks for the report @{author}! ' "I will look into it ASAP! (I'm a bot 🤖)." ) await github_api.post(comments_api_url, data={'body': message}) if __name__ == '__main__': run_app( name='pyconby-2020-manmolecular-bot', version='1.0.0', url='https://github.com/apps/pyconby-2020-manmolecular-bot', )
f"New information wrt GitHub security advisory {security_advisory['ghsa_id']} '{security_advisory['summary']}'", ) ecosystem_name = security_advisory["vulnerabilities"]["package"]["ecosystem"] references_url = security_advisory["references"]["url"] notify_channel( "plain", f"🙀 🔐 GitHub issued some information on security advisory {security_advisory['ghsa_id']}, " f"it is related to {ecosystem_name} ecosystem: " f"{security_advisory['description']}" f" see also: {references_url}", f"{security_advisory['ghsa_id']}", "thoth-station", ) if __name__ == "__main__": _LOGGER.setLevel(logging.DEBUG) _LOGGER.debug("Debug mode turned on") try: run_app( # pylint: disable=expression-not-assigned name="Sefkhet-Abwy", version=get_version_from_scm_tag(root="../..", relative_to=__file__), url="https://github.com/apps/Sefkhet-Abwy", ) except socket.gaierror as gai: # TODO add a error/exception metric inc here, and in general a metric exporter _LOGGER.exception(gai)
def main(): run_app(name='grcbountybot', version='0.0.1', url='https://github.com/div72/grcbountybot')
@process_event_actions('issues', {'opened'}) @process_webhook_payload async def on_issue_opened( *, action, issue, repository, sender, installation, assignee=None, changes=None, ): """Whenever an issue is opened, greet the author and say thanks.""" github_api = RUNTIME_CONTEXT.app_installation_client comments_api_url = issue["comments_url"] author = issue["user"]["login"] message = (f"Thanks for the report @{author}! " "I will look into it ASAP! (I'm a bot 🤖).") await github_api.post(comments_api_url, data={"body": message}) if __name__ == "__main__": run_app( name='first-rootenberg-bot', version='1.0.0', url='https://github.com/settings/apps/first-rootenberg-bot', )
"/173/400428874_e087aa720d_b.jpg)", } if not is_wip_pr else { "title": "🤖 This PR is Work-in-progress: " "It is incomplete", "text": "Debug info:\n" f"is_wip_pr={is_wip_pr!s}\n" f"pr_title={pr_title!s}\n" f"wip_markers={wip_markers!r}", "summary": "🚧 Please do not merge this PR " "as it is still under construction." "\n\n" "![Under constuction tape](" "https://cdn.pixabay.com" "/photo/2012/04/14/14/59" "/border-34209_960_720.png)\n" "![Homer's on the job](" "https://farm3.staticflickr.com" "/2150/2101058680_64fa63971e.jpg)", }, }, ) if __name__ == "__main__": run_app( name="pycon-2020-github-bot", version="1.0.0", url="https://github.com/apps/octomachinery", )
from octomachinery.app.server.runner import run as run_app if __name__ == "__main__": run_app( name='PyCon-Bot-by-webknjaz', version='1.0.0', url='https://github.com/', )
"""Patchback robot runner.""" from octomachinery.app.server.runner import run as run_app from octomachinery.utils.versiontools import get_version_from_scm_tag from . import event_handlers # noqa: F401; pylint: disable=unused-import __name__ == '__main__' and run_app( # pylint: disable=expression-not-assigned name='Patchback-Bot', version=get_version_from_scm_tag(root='..', relative_to=__file__), url='https://github.com/apps/patchback', )
from octomachinery.app.server.runner import run as run_app from octomachinery.routing import process_event_actions from octomachinery.routing.decorators import process_webhook_payload from octomachinery.runtime.context import RUNTIME_CONTEXT @process_event_actions('issues', {'opened'}) @process_webhook_payload async def on_issue_opened(*, issue, **_kw): """Whenever an issue is opened, greet the author and say thanks.""" github_api = RUNTIME_CONTEXT.app_installation_client comments_api_url = issue['comments_url'] author = issue['user']['login'] message = ( f'Thanks for the report @{author}! ' "I will look into it ASAP! (I'm a bot 🤖)." ) await github_api.post(comments_api_url, data={'body': message}) if __name__ == '__main__': run_app( name='pycon-2020-by-j0shu4b0y-github', version='1.0.0', url='https://github.com/apps/pycon-by-2020-j0shu4b0y-github-bot', )
@process_event_actions('issues', {'opened'}) @process_webhook_payload async def on_issue_opened( *, action, issue, repository, sender, installation, assignee=None, changes=None, ): """Whenever an issue is opened, greet the author and say thanks.""" github_api = RUNTIME_CONTEXT.app_installation_client comments_api_url = issue["comments_url"] author = issue["user"]["login"] message = (f"Thanks for the report @{author}! " "I will look into it ASAP! (I'm a bot 🤖).") await github_api.post(comments_api_url, data={"body": message}) if __name__ == "__main__": run_app( name='IT-KPI-Bot-by-webknjaz', version='1.0.0', url='https://github.com/apps/itkpi-bot-maxymvlasov', )
from octomachinery.app.server.runner import run as run_app if __name__ == "__main__": run_app( name='stone-bot', version='1.0.0', url='https://github.com/apps/stone-bot', )
from octomachinery.app.runtime.context import RUNTIME_CONTEXT @process_event_actions('issues', {'opened'}) @process_webhook_payload async def on_issue_opened( *, action, issue, repository, sender, installation, assignee=None, changes=None, ): """Whenever an issue is opened, greet the author and say thanks.""" github_api = RUNTIME_CONTEXT.app_installation_client comments_api_url = issue["comments_url"] author = issue["user"]["login"] message = (f"Thanks for the report @{author}! " "I will look into it ASAP! (I'm a bot 🤖).") await github_api.post(comments_api_url, data={"body": message}) if __name__ == "__main__": run_app( name='txzlApp', version='1.0.0', url='https://github.com/apps/txzlApp', )
from octomachinery.app.server.runner import run as run_app from octomachinery.routing import process_event_actions from octomachinery.routing.decorators import process_webhook_payload from octomachinery.runtime.context import RUNTIME_CONTEXT @process_event_actions('issues', {'opened'}) @process_webhook_payload async def on_issue_opened(*, issue, **_kw): """Whenever an issue is opened, greet the author and say thanks.""" github_api = RUNTIME_CONTEXT.app_installation_client comments_api_url = issue['comments_url'] author = issue['user']['login'] message = ( f'Thanks for the report @{author}! ' "I will look into it ASAP! (I'm a bot 🤖)." ) await github_api.post(comments_api_url, data={'body': message}) if __name__ == '__main__': run_app( name='test-app-mishuta', version='1.0.0', url='https://github.com/apps/test-app-mishuta', )
@process_event_actions('issues', {'opened'}) @process_webhook_payload async def on_issue_opened( *, action, issue, repository, sender, installation, assignee=None, changes=None, ): """Whenever an issue is opened, greet the author and say thanks.""" github_api = RUNTIME_CONTEXT.app_installation_client comments_api_url = issue["comments_url"] author = issue["user"]["login"] message = (f"Thanks for the report @{author}! " "I will look into it ASAP! (I'm a bot 🤖).") await github_api.post(comments_api_url, data={"body": message}) if __name__ == "__main__": run_app( name='IT-KPI-Bot-by-dimasmemas', version='1.0.0', url='https://github-bot-dimas-memas.herokuapp.com/', )
"external_id": analysis_id, "output": { "title": "Thoth's Advise", "text": text, "summary": (f"Thoth's adviser finished with conclusion: '{conclusion}'\n\n" f"Justification:\n{justification}\n\n" f"{report_message}"), }, }, ) except gidgethub.BadRequest as exc: _LOGGER.error(exc) _LOGGER.info( f"on_thamos_workflow_finished: finished with `thamos advise`, updated %s", check_run_id) if __name__ == "__main__": _LOGGER.setLevel(logging.DEBUG) _LOGGER.debug("Debug mode turned on") run_app( # pylint: disable=expression-not-assigned name="Qeb-Hwt GitHub App", version=qeb_hwt_version, url="https://github.com/apps/qeb-hwt", )
'title': '🤖 This PR is Work-in-progress: ' 'It is incomplete', 'text': 'Debug info: ' f'is_wip_pr={is_wip_pr!s} ' f'pr_title={pr_title!s} ' f'wip_markers={wip_markers!r}', 'summary': '🚧 Please do not merge this PR ' 'as it is still under construction.' '\n\n' '<center>' '![Under constuction tape](' 'https://cdn.pixabay.com' '/photo/2012/04/14/14/59' '/border-34209_960_720.png)' "![Homer's on the job](" 'https://farm3.staticflickr.com' '/2150/2101058680_64fa63971e.jpg)' '</center>', }, }, ) if __name__ == '__main__': run_app(name='Comment-Reactor-PyconSK-by-iref', version='1.0.0', url='https://github.com/apps/comment-reactor-pyconsk-iref')
"Processing ping for App ID %s " "with Hook ID %s " "sharing Zen: %s", app_id, hook_id, zen) _LOGGER.info("GitHub App from context in ping handler: %s", RUNTIME_CONTEXT.github_app) @process_event("integration_installation", action="created") @process_webhook_payload async def on_install( action, # pylint: disable=unused-argument installation, sender, # pylint: disable=unused-argument repositories=None, # pylint: disable=unused-argument ): """React to GitHub App integration installation webhook event.""" _LOGGER.info("installed event install id %s", installation["id"]) _LOGGER.info("installation=%s", RUNTIME_CONTEXT.app_installation) if __name__ == "__main__": _LOGGER.setLevel(logging.DEBUG) _LOGGER.debug("Debug mode turned on") run_app( # pylint: disable=expression-not-assigned name="Qeb-Hwt", version=get_version_from_scm_tag(root="./", relative_to=__file__), url="https://github.com/apps/qeb-hwt", )
} if not is_wip_pr else { 'title': '🤖 This PR is Work-in-progress: ' 'It is incomplete', 'text': 'Debug info:\n' f'is_wip_pr={is_wip_pr!s}\n' f'pr_title={pr_title!s}\n' f'wip_markers={wip_markers!r}', 'summary': '🚧 Please do not merge this PR ' 'as it is still under construction.' '\n\n' '![Under constuction tape](' 'https://cdn.pixabay.com' '/photo/2012/04/14/14/59' '/border-34209_960_720.png)\n' "![Homer's on the job](" 'https://farm3.staticflickr.com' '/2150/2101058680_64fa63971e.jpg)', }, }, ) if __name__ == '__main__': run_app( name='PyCon-Bot-by-gloriasky', version='1.0.0', url='https://github.com/settings/apps/pycon-github-bot', )