From b89483e1cb25f3c7b9990ff81ccc9c55643d20cd Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Tue, 5 Jul 2022 16:45:38 -0400 Subject: [PATCH 1/2] Add completed - cancelled code. --- .../actions_status.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/GitHub_Actions_Status_Tower_Light/actions_status.py b/GitHub_Actions_Status_Tower_Light/actions_status.py index bc3f835ef..d766a9209 100644 --- a/GitHub_Actions_Status_Tower_Light/actions_status.py +++ b/GitHub_Actions_Status_Tower_Light/actions_status.py @@ -11,7 +11,7 @@ import requests # Customisations for this program # Update with the URL from any repo running Actions to get the status. Defaults to CircuitPython. -REPO_WORKFLOW_URL = "https://api.github.com/repos/adafruit/circuitpython/actions/workflows/build.yml/runs" # pylint: disable=line-too-long +REPO_WORKFLOW_URL = "https://api.github.com/repos/kattni/circuitpython/actions/workflows/build.yml/runs" # pylint: disable=line-too-long # The rate at which the program will query GitHub for an updated status. You can increase or # decrease the delay time to fit the duration and frequency of Actions runs on your repo. # Defaults to 3 minutes. @@ -141,6 +141,18 @@ try: print("Sending serial command 'RED_OFF'.") send_command(mSerial, RED_OFF) + if conclusion == "cancelled": + print("Actions run status: Completed - cancelled.") + if ENABLE_USB_LIGHT_MESSAGES: + send_command(mSerial, YELLOW_OFF) + print("Sending serial command 'RED_BLINK'.") + send_command(mSerial, RED_BLINK) + buzzer_on_completion() + time.sleep(COMPLETION_LIGHT_TIME - COMPLETION_BUZZER_TIME) + if ENABLE_USB_LIGHT_MESSAGES: + print("Sending serial command 'RED_OFF'.") + send_command(mSerial, RED_OFF) + else: print("Already followed the current run.") time.sleep(POLL_DELAY) From 9e4f56a45a5dc57ff98ab863cb34a0ec3e4063d7 Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Tue, 5 Jul 2022 16:47:24 -0400 Subject: [PATCH 2/2] Revert workflow URL. --- GitHub_Actions_Status_Tower_Light/actions_status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GitHub_Actions_Status_Tower_Light/actions_status.py b/GitHub_Actions_Status_Tower_Light/actions_status.py index d766a9209..ed32c0076 100644 --- a/GitHub_Actions_Status_Tower_Light/actions_status.py +++ b/GitHub_Actions_Status_Tower_Light/actions_status.py @@ -11,7 +11,7 @@ import requests # Customisations for this program # Update with the URL from any repo running Actions to get the status. Defaults to CircuitPython. -REPO_WORKFLOW_URL = "https://api.github.com/repos/kattni/circuitpython/actions/workflows/build.yml/runs" # pylint: disable=line-too-long +REPO_WORKFLOW_URL = "https://api.github.com/repos/adafruit/circuitpython/actions/workflows/build.yml/runs" # pylint: disable=line-too-long # The rate at which the program will query GitHub for an updated status. You can increase or # decrease the delay time to fit the duration and frequency of Actions runs on your repo. # Defaults to 3 minutes.