From 3468dbbf7963e9f9c43e777dd1b69497e5d92064 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Wed, 19 May 2021 05:48:01 +1000 Subject: [PATCH 1/3] Minor change to pr/issue note --- app/meticulous/_submit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/meticulous/_submit.py b/app/meticulous/_submit.py index 5e94fb2..0466924 100644 --- a/app/meticulous/_submit.py +++ b/app/meticulous/_submit.py @@ -32,7 +32,7 @@ def get_note(kind, pr_url=None): f"https://github.com/timgates42/meticulous" f"/blob/master/docs/NOTE.md" ) - if pr_url is None: + if kind != 'issue' or pr_url is None: return header api = get_api() user_org = api.get_user().login @@ -42,7 +42,8 @@ def get_note(kind, pr_url=None): To avoid wasting CI processing resources a branch with the fix has been prepared but a pull request has not yet been created. A pull request fixing the issue can be prepared from the link below, feel free to create it or -request @{user_org} create the PR. +request @{user_org} create the PR. Alternatively if the fix is undesired please +close the issue with a small comment about the reasoning. {pr_url} From 6e6e163be8922630fa0856845141c3e763da1308 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Wed, 19 May 2021 05:51:36 +1000 Subject: [PATCH 2/3] Fix for running controller --- app/meticulous/_multiworker.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/meticulous/_multiworker.py b/app/meticulous/_multiworker.py index 9a87f77..aec918f 100644 --- a/app/meticulous/_multiworker.py +++ b/app/meticulous/_multiworker.py @@ -313,7 +313,8 @@ def multiworker_core(interaction, target): controller = Controller( handlers=handlers, input_queue=input_queue, threadpool=threadpool, target=target ) - for task in workload: - controller.add(task) - result = controller.run(interaction) - set_json_value(key, result) + with controller: + for task in workload: + controller.add(task) + result = controller.run(interaction) + set_json_value(key, result) From 83f03c7e2c611b9e86b248bf3ae46ba6f279e9f3 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Wed, 19 May 2021 05:51:54 +1000 Subject: [PATCH 3/3] black --- app/meticulous/_submit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/meticulous/_submit.py b/app/meticulous/_submit.py index 0466924..435ce70 100644 --- a/app/meticulous/_submit.py +++ b/app/meticulous/_submit.py @@ -32,7 +32,7 @@ def get_note(kind, pr_url=None): f"https://github.com/timgates42/meticulous" f"/blob/master/docs/NOTE.md" ) - if kind != 'issue' or pr_url is None: + if kind != "issue" or pr_url is None: return header api = get_api() user_org = api.get_user().login