get status from github api

This commit is contained in:
Bryan Gerlach
2026-03-10 23:58:13 -05:00
parent d186b7dd02
commit 8adecbfc1d
3 changed files with 25 additions and 3 deletions

View File

@@ -348,8 +348,6 @@ def check_for_file(request):
headers = {"Authorization": f"Bearer {_settings.GHBEARER}"}
api_url = f"https://api.github.com/repos/{_settings.GHUSER}/{_settings.REPONAME}/actions/runs/{gh_run.github_run_id}"
github_log_url = f"https://github.com/{_settings.GHUSER}/{_settings.REPONAME}/actions/runs/{gh_run.github_run_id}"
timeout_limit = gh_run.created_at + timedelta(hours=2)
try:
gh_response = requests.get(api_url, headers=headers)
@@ -396,6 +394,13 @@ def get_png(request):
return response
def create_github_run(myuuid):
new_github_run = GithubRun(
uuid=myuuid,
status="Starting generator...please wait"
)
new_github_run.save()
def update_github_run(request):
data = json.loads(request.body)
myuuid = data.get('uuid')