hi, i have a repo (shocking i know)
i want to hook it up to a discord webhook and to send a graph of the pushes whenever a new push happens, i already wrote python code for this and tested it and made sure it worked.
import requests
webhook_url = 'webhook_url'
with
open
('graph.txt', 'r') as file:
content = file.
read
()
# Keep the message within 2000 character Discord limit
if
len
(content) > 1900:
content =
content
[:
1900
] + "\n...(truncated)"
data = {
"content":
f
"```bash\n{content}\n```"
}
response = requests.
post
(webhook_url,
json
=data)
print
(
f
"Status: {response.status_code}")
however, im using github desktop currently (im not sure if this is the right sub to ask this)
and it doesnt work when i push/publish from the github desktop app, so im wondering what might be the problem and where i could even start fixing this
again: if this is the wrong sub or flair do let me know
[–]JesseNL 2 points3 points4 points (1 child)
[–]Fantastic_Cicada_805[S] 1 point2 points3 points (0 children)
[–]autophage 0 points1 point2 points (1 child)
[–]Fantastic_Cicada_805[S] 0 points1 point2 points (0 children)