Skip to content

Commit b89483e

Browse files
committed
Add completed - cancelled code.
1 parent 12dd64d commit b89483e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

GitHub_Actions_Status_Tower_Light/actions_status.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Customisations for this program
1313
# Update with the URL from any repo running Actions to get the status. Defaults to CircuitPython.
14-
REPO_WORKFLOW_URL = "https://api.github.com/repos/adafruit/circuitpython/actions/workflows/build.yml/runs" # pylint: disable=line-too-long
14+
REPO_WORKFLOW_URL = "https://api.github.com/repos/kattni/circuitpython/actions/workflows/build.yml/runs" # pylint: disable=line-too-long
1515
# The rate at which the program will query GitHub for an updated status. You can increase or
1616
# decrease the delay time to fit the duration and frequency of Actions runs on your repo.
1717
# Defaults to 3 minutes.
@@ -141,6 +141,18 @@ def buzzer_on_completion():
141141
print("Sending serial command 'RED_OFF'.")
142142
send_command(mSerial, RED_OFF)
143143

144+
if conclusion == "cancelled":
145+
print("Actions run status: Completed - cancelled.")
146+
if ENABLE_USB_LIGHT_MESSAGES:
147+
send_command(mSerial, YELLOW_OFF)
148+
print("Sending serial command 'RED_BLINK'.")
149+
send_command(mSerial, RED_BLINK)
150+
buzzer_on_completion()
151+
time.sleep(COMPLETION_LIGHT_TIME - COMPLETION_BUZZER_TIME)
152+
if ENABLE_USB_LIGHT_MESSAGES:
153+
print("Sending serial command 'RED_OFF'.")
154+
send_command(mSerial, RED_OFF)
155+
144156
else:
145157
print("Already followed the current run.")
146158
time.sleep(POLL_DELAY)

0 commit comments

Comments
 (0)