mirror of
https://github.com/YunoHost/tartiflette.git
synced 2024-09-03 20:06:08 +02:00
Yolo fixes
This commit is contained in:
parent
d57d638bfb
commit
c5addbd8ea
1 changed files with 15 additions and 9 deletions
|
@ -92,7 +92,9 @@ def add_comment_about_unmaintained_state(repo, issue):
|
||||||
comment = { "body": UNMAINTAINED_WARNING }
|
comment = { "body": UNMAINTAINED_WARNING }
|
||||||
with requests.Session() as s:
|
with requests.Session() as s:
|
||||||
s.headers.update({"Authorization": "token {}".format(GITHUB_TOKEN)})
|
s.headers.update({"Authorization": "token {}".format(GITHUB_TOKEN)})
|
||||||
s.post(api_url, json.dumps(comment))
|
r = s.post(api_url, json.dumps(comment))
|
||||||
|
|
||||||
|
return "Added comment %s" % json.loads(r.text)["html_url"]
|
||||||
|
|
||||||
|
|
||||||
def get_status_and_todo(repo):
|
def get_status_and_todo(repo):
|
||||||
|
@ -170,7 +172,9 @@ def run_todolist(todolist):
|
||||||
|
|
||||||
done = []
|
done = []
|
||||||
|
|
||||||
for app, todo in todolist:
|
for app, todo in todolist.items():
|
||||||
|
if todo is None:
|
||||||
|
continue
|
||||||
print("Running todo action for app %s" % app)
|
print("Running todo action for app %s" % app)
|
||||||
try:
|
try:
|
||||||
answer = todo(app)
|
answer = todo(app)
|
||||||
|
@ -179,6 +183,9 @@ def run_todolist(todolist):
|
||||||
continue
|
continue
|
||||||
done.append(answer)
|
done.append(answer)
|
||||||
|
|
||||||
|
for d in done:
|
||||||
|
print(d)
|
||||||
|
|
||||||
|
|
||||||
def update_community_list(status, workdir):
|
def update_community_list(status, workdir):
|
||||||
|
|
||||||
|
@ -263,19 +270,18 @@ def create_pull_request(repo, watdo, pr_infos):
|
||||||
|
|
||||||
with requests.Session() as s:
|
with requests.Session() as s:
|
||||||
s.headers.update({"Authorization": "token {token}".format(token=GITHUB_TOKEN)})
|
s.headers.update({"Authorization": "token {token}".format(token=GITHUB_TOKEN)})
|
||||||
s.post(api_url, json.dumps(PR))
|
r = s.post(api_url, json.dumps(PR))
|
||||||
|
|
||||||
|
if r.status_code != 200:
|
||||||
|
print(r.text)
|
||||||
|
else:
|
||||||
|
json.loads(r.text)["html_url"]
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
monitored, maintained, todolist = analyze_apps()
|
monitored, maintained, todolist = analyze_apps()
|
||||||
|
|
||||||
for app, action in todolist.items():
|
|
||||||
print("===")
|
|
||||||
print(app)
|
|
||||||
print(maintained[app])
|
|
||||||
#print(todolist[app])
|
|
||||||
|
|
||||||
run_todolist(todolist)
|
run_todolist(todolist)
|
||||||
|
|
||||||
create_pull_request("YunoHost/apps",
|
create_pull_request("YunoHost/apps",
|
||||||
|
|
Loading…
Add table
Reference in a new issue