Sponsorship auto-generate v0.1.36
This commit is contained in:
2
.github/workflows/update_sponsors.yml
vendored
2
.github/workflows/update_sponsors.yml
vendored
@@ -2,7 +2,7 @@ name: Update Sponsors
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '15 10 * * *' # Set your preferred schedule (UTC)
|
- cron: '33 10 * * *' # Set your preferred schedule (UTC)
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-readme:
|
update-readme:
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ import requests
|
|||||||
import base64
|
import base64
|
||||||
|
|
||||||
def fetch_sponsors():
|
def fetch_sponsors():
|
||||||
|
|
||||||
|
global headers
|
||||||
|
|
||||||
graphql_url = "https://api.github.com/graphql"
|
graphql_url = "https://api.github.com/graphql"
|
||||||
headers = {
|
headers = {
|
||||||
"Authorization": f"Bearer {os.environ.get('GH_TOKEN')}",
|
"Authorization": f"Bearer {os.environ.get('GH_TOKEN')}",
|
||||||
@@ -89,6 +92,7 @@ def generate_sponsors_table(current_sponsors, past_sponsors):
|
|||||||
|
|
||||||
def update_readme(sponsors_table):
|
def update_readme(sponsors_table):
|
||||||
|
|
||||||
|
global headers
|
||||||
repo_owner = "jokob-sk"
|
repo_owner = "jokob-sk"
|
||||||
repo_name = "Pi.Alert"
|
repo_name = "Pi.Alert"
|
||||||
readme_path = "README.md"
|
readme_path = "README.md"
|
||||||
|
|||||||
Reference in New Issue
Block a user