diff --git a/.github/actions/add_pr_to_smackore_board/action.yml b/.github/actions/add_pr_to_smackore_board/action.yml index e093f3d92..a1c63ea6b 100644 --- a/.github/actions/add_pr_to_smackore_board/action.yml +++ b/.github/actions/add_pr_to_smackore_board/action.yml @@ -21,9 +21,6 @@ runs: run: | # currently this may cause github action crash, more info here: https://github.com/membraneframework/membrane_core/issues/749 - # this debug varible is set only for troubleshooting, remove this later - export GH_DEBUG=api - export PROJECT_NUMBER=19 export PROJECT_ID=PVT_kwDOAYE_z84AWEIB export STATUS_FIELD_ID=PVTSSF_lADOAYE_z84AWEIBzgOGd1k diff --git a/scripts/python/get_author_origin.py b/scripts/python/get_author_origin.py index 7a6e7804a..7d237b560 100644 --- a/scripts/python/get_author_origin.py +++ b/scripts/python/get_author_origin.py @@ -15,6 +15,5 @@ print("COMMUNITY") except: - print("An exception occurred, provided JSON:") - print(membrane_team) - print("provided PR_AUTHOR:", pr_author) \ No newline at end of file + print("An exception occurred in get_author_origin.py, provided JSON: ", membrane_team) + print("Provided PR_AUTHOR: ", pr_author) \ No newline at end of file diff --git a/scripts/python/get_ticket_id.py b/scripts/python/get_ticket_id.py index d0eb92104..416f6fdb1 100644 --- a/scripts/python/get_ticket_id.py +++ b/scripts/python/get_ticket_id.py @@ -1,13 +1,20 @@ import sys, json; full_json = json.load(sys.stdin) + pr_url = sys.argv[1] -try: - project_items = full_json["items"] - [id] = [item["id"] for item in project_items if ("url" in item["content"] and item["content"]["url"] == pr_url)] - print(id) -except: - print("An exception occurred, provided JSON:") - print(full_json) - print("provided PR_URL:", pr_url) \ No newline at end of file +project_items = full_json["items"] + +item_id = None +for item in project_items: + if "content" in item and "url" in item["content"]: + if item["content"]["url"] == pr_url: + item_id = item["id"] + break + +if item_id == None: + print("Error occurred in get_ticket.py: item_id == None, provided JSON[project_items]: ", project_items) + sys.exit(1) +else: + print(item_id) \ No newline at end of file