mirror of
https://github.com/jellyfin/jellyfin-triage-scripts.git
synced 2024-11-27 08:00:26 +00:00
34 lines
799 B
Python
34 lines
799 B
Python
import github
|
|
import datetime
|
|
import os
|
|
|
|
from checkissue import checkissue
|
|
|
|
# Read token
|
|
TOKEN = os.getenv("GH_TOKEN")
|
|
auth = github.Auth.Token(TOKEN)
|
|
gh = github.Github(auth=auth)
|
|
|
|
# Get input
|
|
ISSUE = int(os.getenv("ISSUE"))
|
|
REPO = os.getenv("GH_REPO")
|
|
print(REPO)
|
|
|
|
# with open('strings.json', 'r', encoding='utf8') as stringsfile:
|
|
# strings = json.load(stringsfile)
|
|
|
|
# with open('template_titles.json', 'r', encoding='utf8') as templatetitlesfile:
|
|
# template_titles = json.load(templatetitlesfile)
|
|
|
|
# Load environmernt headings
|
|
# with open('environment_titles.json', 'r', encoding='utf8') as envtitlesfile:
|
|
# env_titles = json.load(envtitlesfile)
|
|
|
|
repo = gh.get_repo(REPO)
|
|
issue = repo.get_issue(ISSUE)
|
|
|
|
res = checkissue(issue)
|
|
print(res)
|
|
|
|
if res:
|
|
issue.create_comment(res) |