Skip to content

Commit

Permalink
SOFA-dev-meeting: post as a file (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugtalbot committed Nov 7, 2024
1 parent 6fdd9aa commit 457b8e4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions SOFA-dev-meeting/SOFA-dev-meeting-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
discord_token = os.environ['DISCORD_WEBHOOK_URL']

def postOnDiscord():
response = requests.post(discord_token, files={"file": open("SOFA-dev-meeting.md", "rb")})
files = {'upload_file': open('SOFA-dev-meeting.md','rb')}
response = requests.post(discord_token, files)
print("Status: "+str(response.status_code)+"\nReason: "+str(response.reason)+"\nText: "+str(response.text))
return

Expand All @@ -22,17 +23,17 @@ def main(argv):
today = date.today()
dateToday = today.strftime("%d/%m/%Y")

message="# "+str(dateToday)+"\n### News\n- \n\n### Technical discussions"
message="# "+str(dateToday)+"\n### News\n- \n\n### Technical discussions\n"

output = list_topics_to_be_discussed("sofa")
message = message + output
message = message + output + "\n"

message = message + "### PR review"
message = message + "### PR review\n"
for arg in argv[1:]:
output = list_to_review_pr(arg)
message = message + output +"\n"

message = message + "### PR merged within the week"
message = message + "### PR merged within the week\n"
for arg in argv[1:]:
output = list_merged_pr(arg)
message = message + output +"\n"
Expand Down

0 comments on commit 457b8e4

Please sign in to comment.