Skip to content

Commit

Permalink
modifications done on actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Figeral committed Apr 1, 2024
1 parent a893aae commit 95ab1b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/source/index.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import requests
import os
import time


def send_mgs():
token = os.environ['TELEGRAM_BOT_TOKEN']
user_id = os.environ['USER_ID']
repository = os.environ['GITHUB_REPOSITORY']
author = os.environ['GITHUB_EVENT_AUTHOR']

date = time.ctime()
baseUrl = "https://api.telegram.org"
url = f"{baseUrl}/bot{token}/sendMessage"
link = f"github.com/{repository}"

msg = f"A Pushed 🚀 made by {author} \n feel free to edit it at {link}"
msg = f"A Pushed 🚀 made by {author}✨ made on {date} \n \n feel free to edit it at {link}"
payload = dict(chat_id=user_id, text=msg)
requests.post(url=url, params=payload)

Expand Down

0 comments on commit 95ab1b7

Please sign in to comment.