feat: github-notifier message

This commit is contained in:
auricom
2025-01-20 22:36:55 +01:00
parent 36fc3d25db
commit f4dc1e4174

View File

@@ -96,14 +96,16 @@ def check_latest_tag(repo_name, ignore_list):
def send_pushover_notification(repo_name, tag_name): def send_pushover_notification(repo_name, tag_name):
payload = { payload = {
"token": PUSHOVER_APP_TOKEN, "token": str(PUSHOVER_APP_TOKEN).strip(),
"user": PUSHOVER_USER_KEY, "user": str(PUSHOVER_USER_KEY).strip(),
"html": "1", "html": "1",
"message": f'New stable release {tag_name} for repository <a href="https://github.com/{repo_name}">{repo_name}</a> is available.', "message": f'New stable release {tag_name} for repository <a href="https://github.com/{repo_name}/releases">{repo_name}</a> is available.',
} }
response = requests.post(PUSHOVER_API_URL, data=payload, timeout=5, headers={'User-Agent': 'Python'}) response = requests.post(PUSHOVER_API_URL, data=payload, timeout=5, headers={'User-Agent': 'Python'})
print(f"Response content: {response.text}")
response.raise_for_status() response.raise_for_status()
def main(): def main():
create_table() create_table()
conn = get_db_connection() conn = get_db_connection()