mirror of
https://github.com/BioArchLinux/bioarchlinux-tools.git
synced 2025-03-09 22:53:31 +00:00
rm issue related
This commit is contained in:
parent
3fce56a6a9
commit
446d25eb8b
2 changed files with 11 additions and 9 deletions
2
sh
Executable file
2
sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
python -m webhooks.main
|
|
@ -12,7 +12,7 @@ from agithub import GitHub
|
||||||
|
|
||||||
import lilac2.packages
|
import lilac2.packages
|
||||||
|
|
||||||
from . import issue
|
#from . import issue
|
||||||
from . import config
|
from . import config
|
||||||
from . import git
|
from . import git
|
||||||
|
|
||||||
|
@ -62,14 +62,14 @@ class IssueHandler:
|
||||||
asyncio.ensure_future(on_push())
|
asyncio.ensure_future(on_push())
|
||||||
return
|
return
|
||||||
|
|
||||||
if event_type != 'issues':
|
# if event_type != 'issues':
|
||||||
return
|
# return
|
||||||
|
|
||||||
if data['action'] not in ['opened', 'edited']:
|
if data['action'] not in ['opened', 'edited']:
|
||||||
return
|
return
|
||||||
|
|
||||||
asyncio.ensure_future(issue.process_issue(
|
# asyncio.ensure_future(issue.process_issue(
|
||||||
self.gh, data['issue'], data['action'] == 'edited'))
|
# self.gh, data['issue'], data['action'] == 'edited'))
|
||||||
|
|
||||||
async def on_push() -> None:
|
async def on_push() -> None:
|
||||||
await git.pull_repo(config.REPODIR, config.REPO_NAME)
|
await git.pull_repo(config.REPODIR, config.REPO_NAME)
|
||||||
|
@ -82,9 +82,9 @@ def update_pkgname_map_sync():
|
||||||
with open(config.REPODIR / 'pkgname_map.json', 'w') as f:
|
with open(config.REPODIR / 'pkgname_map.json', 'w') as f:
|
||||||
json.dump(m, f)
|
json.dump(m, f)
|
||||||
|
|
||||||
def setup_app(app, secret, token):
|
#def setup_app(app, secret, token):
|
||||||
handler = IssueHandler(secret, token)
|
# handler = IssueHandler(secret, token)
|
||||||
app.router.add_post('/lilac/issue', handler.post)
|
# app.router.add_post('/lilac/issue', handler.post)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import argparse
|
import argparse
|
||||||
|
@ -106,7 +106,7 @@ def main():
|
||||||
enable_pretty_logging(args.loglevel.upper())
|
enable_pretty_logging(args.loglevel.upper())
|
||||||
|
|
||||||
app = web.Application()
|
app = web.Application()
|
||||||
setup_app(app, os.environ['SECRET'], os.environ['GITHUB_TOKEN'])
|
# setup_app(app, os.environ['SECRET'], os.environ['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'])
|
||||||
|
|
||||||
web.run_app(app, host=args.ip, port=args.port)
|
web.run_app(app, host=args.ip, port=args.port)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue