Skip to content

Commit fcd1060

Browse files
Update .github/workflows/manage-gist.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1d9cc7a commit fcd1060

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/manage-gist.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,19 @@ jobs:
9595
}
9696
}
9797
response = requests.patch(url, headers=headers, json=data)
98-
return response.status_code == 200
98+
if response.status_code != 200:
99+
# Log detailed error information to help diagnose failures
100+
try:
101+
error_detail = response.json()
102+
except ValueError:
103+
error_detail = response.text
104+
print(
105+
f"Error: Failed to update gist {gist_id}. "
106+
f"Status: {response.status_code}, Response: {error_detail}",
107+
file=sys.stderr,
108+
)
109+
return False
110+
return True
99111
100112
def post_comment(repo, issue_number, message, token):
101113
"""Post a comment to the issue"""

0 commit comments

Comments
 (0)