From 606e2dfc8141072c55c7e94e825deebc5c86cac7 Mon Sep 17 00:00:00 2001 From: Aleksei Fedotov Date: Tue, 27 Sep 2022 18:22:02 +0200 Subject: [PATCH] Add class Artifact (#2313) Github workflow runs produce downloadable artifacts, add a class to represent them. --- github/Artifact.py | 170 ++++++++++++++++++++++++++++ github/Artifact.pyi | 29 +++++ github/WorkflowRun.py | 11 ++ tests/Artifact.py | 21 ++++ tests/ReplayData/Artifact.setUp.txt | 33 ++++++ 5 files changed, 264 insertions(+) create mode 100644 github/Artifact.py create mode 100644 github/Artifact.pyi create mode 100644 tests/Artifact.py create mode 100644 tests/ReplayData/Artifact.setUp.txt diff --git a/github/Artifact.py b/github/Artifact.py new file mode 100644 index 0000000000..018e8e5cbd --- /dev/null +++ b/github/Artifact.py @@ -0,0 +1,170 @@ +############################ Copyrights and license ############################ +# # +# Copyright 2022 Aleksei Fedotov # +# # +# This file is part of PyGithub. # +# http://pygithub.readthedocs.io/ # +# # +# PyGithub is free software: you can redistribute it and/or modify it under # +# the terms of the GNU Lesser General Public License as published by the Free # +# Software Foundation, either version 3 of the License, or (at your option) # +# any later version. # +# # +# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # +# details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with PyGithub. If not, see . # +# # +################################################################################ + +import github.GithubObject +import github.WorkflowRun + + +class Artifact(github.GithubObject.NonCompletableGithubObject): + """ + This class represents an Artifact of Github Run + """ + + def __repr__(self): + return self.get__repr__({"name": self._name.value, "id": self._id.value}) + + @property + def archive_download_url(self): + """ + :type: string + """ + return self._archive_download_url.value + + @property + def created_at(self): + """ + :type: datetime.datetime + """ + return self._created_at.value + + @property + def expired(self): + """ + :type: bool + """ + return self._expired.value + + @property + def expires_at(self): + """ + :type: datetime.datetime + """ + return self._expires_at.value + + @property + def head_sha(self): + """ + :type: string + """ + return self._head_sha.value + + @property + def id(self): + """ + :type: string + """ + return self._id.value + + @property + def name(self): + """ + :type: string + """ + return self._name.value + + @property + def node_id(self): + """ + :type: string + """ + return self._node_id.value + + @property + def size_in_bytes(self): + """ + :type: integer + """ + return self._size_in_bytes.value + + @property + def updated_at(self): + """ + :type: datetime.datetime + """ + return self._updated_at.value + + @property + def url(self): + """ + :type: string + """ + return self._url.value + + @property + def workflow_run(self): + """ + :type: :class:`` + """ + return self._workflow_run.value + + def _initAttributes(self): + self._archive_download_url = github.GithubObject.NotSet + self._created_at = github.GithubObject.NotSet + self._expired = github.GithubObject.NotSet + self._expires_at = github.GithubObject.NotSet + self._head_sha = github.GithubObject.NotSet + self._id = github.GithubObject.NotSet + self._name = github.GithubObject.NotSet + self._node_id = github.GithubObject.NotSet + self._size_in_bytes = github.GithubObject.NotSet + self._updated_at = github.GithubObject.NotSet + self._url = github.GithubObject.NotSet + self._workflow_run = github.GithubObject.NotSet + + def _useAttributes(self, attributes): + if "archive_download_url" in attributes: # pragma no branch + self._archive_download_url = self._makeStringAttribute( + attributes["archive_download_url"] + ) + if "created_at" in attributes: # pragma no branch + assert attributes["created_at"] is None or isinstance( + attributes["created_at"], (str,) + ), attributes["created_at"] + self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) + if "expired" in attributes: # pragma no branch + self._expired = self._makeBoolAttribute(attributes["expired"]) + if "expires_at" in attributes: # pragma no branch + assert attributes["expires_at"] is None or isinstance( + attributes["expires_at"], (str,) + ), attributes["expires_at"] + self._expires_at = self._makeDatetimeAttribute(attributes["expires_at"]) + if "head_sha" in attributes: # pragma no branch + self._head_sha = self._makeStringAttribute(attributes["head_sha"]) + if "id" in attributes: # pragma no branch + self._id = self._makeIntAttribute(attributes["id"]) + if "name" in attributes: # pragma no branch + self._name = self._makeStringAttribute(attributes["name"]) + if "node_id" in attributes: # pragma no branch + self._node_id = self._makeStringAttribute(attributes["node_id"]) + if "size_in_bytes" in attributes: # pragma no branch + self._size_in_bytes = self._makeIntAttribute(attributes["size_in_bytes"]) + if "updated_at" in attributes: # pragma no branch + assert attributes["updated_at"] is None or isinstance( + attributes["updated_at"], (str,) + ), attributes["updated_at"] + self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"]) + if "url" in attributes: # pragma no branch + self._url = self._makeStringAttribute(attributes["url"]) + if "workflow_run" in attributes: # pragma no branch + self._workflow_run = self._makeClassAttribute( + github.WorkflowRun.WorkflowRun, attributes["workflow_run"] + ) diff --git a/github/Artifact.pyi b/github/Artifact.pyi new file mode 100644 index 0000000000..563d2bdb66 --- /dev/null +++ b/github/Artifact.pyi @@ -0,0 +1,29 @@ +from github.WorkflowRun import WorkflowRun +from datetime import datetime +from github.GithubObject import NonCompletableGithubObject as NonCompletableGithubObject + +class Artifact(NonCompletableGithubObject): + @property + def archive_download_url(self) -> str: ... + @property + def created_at(self) -> datetime: ... + @property + def expired(self) -> bool: ... + @property + def expires_at(self) -> datetime: ... + @property + def head_sha(self) -> str: ... + @property + def id(self) -> int: ... + @property + def name(self) -> str: ... + @property + def node_id(self) -> str: ... + @property + def size_in_bytes(self) -> int: ... + @property + def updated_at(self) -> datetime: ... + @property + def url(self) -> str: ... + @property + def workflow_run(self) -> WorkflowRun: ... diff --git a/github/WorkflowRun.py b/github/WorkflowRun.py index 4c1cfad1b0..2846c9d4ce 100644 --- a/github/WorkflowRun.py +++ b/github/WorkflowRun.py @@ -1,6 +1,7 @@ ############################ Copyrights and license ############################ # # # Copyright 2020 Steve Kowalik # +# Copyright 2022 Aleksei Fedotov # # # # This file is part of PyGithub. # # http://pygithub.readthedocs.io/ # @@ -22,6 +23,7 @@ from collections import namedtuple +import github.Artifact import github.GithubObject import github.PullRequest @@ -170,6 +172,15 @@ def artifacts_url(self): self._completeIfNotSet(self._artifacts_url) return self._artifacts_url.value + def get_artifacts(self): + return github.PaginatedList.PaginatedList( + github.Artifact.Artifact, + self._requester, + self._artifacts_url.value, + None, + list_item="artifacts", + ) + @property def cancel_url(self): """ diff --git a/tests/Artifact.py b/tests/Artifact.py new file mode 100644 index 0000000000..afe13673ec --- /dev/null +++ b/tests/Artifact.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 + +from . import Framework + + +class Artifact(Framework.TestCase): + def setUp(self): + super().setUp() + self.artifact = ( + self.g.get_repo("github/vscode-codeql") + .get_workflow_run(160995070) + .get_artifacts()[0] + ) + + def testAttributes(self): + self.assertEqual(self.artifact.name, "vscode-codeql-extension") + + self.assertTrue(self.artifact.expired) + self.assertEqual( + repr(self.artifact), 'Artifact(name="vscode-codeql-extension", id=10495898)' + ) diff --git a/tests/ReplayData/Artifact.setUp.txt b/tests/ReplayData/Artifact.setUp.txt new file mode 100644 index 0000000000..2c84b08a5d --- /dev/null +++ b/tests/ReplayData/Artifact.setUp.txt @@ -0,0 +1,33 @@ +https +GET +api.github.com +None +/repos/github/vscode-codeql +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Tue, 27 Sep 2022 16:12:54 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Cache-Control', 'public, max-age=60, s-maxage=60'), ('Vary', 'Accept, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"b8996d1d847bfa31020b23f12f995dc133b73619849c219cd1868e168b90f6fa"'), ('Last-Modified', 'Sat, 24 Sep 2022 16:33:41 GMT'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '60'), ('X-RateLimit-Remaining', '32'), ('X-RateLimit-Reset', '1664298351'), ('X-RateLimit-Used', '28'), ('X-RateLimit-Resource', 'core'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '0'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'B410:113C7:642747B:65923A1:63332106')] +{"id":211169016,"node_id":"MDEwOlJlcG9zaXRvcnkyMTExNjkwMTY=","name":"vscode-codeql","full_name":"github/vscode-codeql","private":false,"owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/github/vscode-codeql","description":"An extension for Visual Studio Code that adds rich language support for CodeQL","fork":false,"url":"https://api.github.com/repos/github/vscode-codeql","forks_url":"https://api.github.com/repos/github/vscode-codeql/forks","keys_url":"https://api.github.com/repos/github/vscode-codeql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/vscode-codeql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/vscode-codeql/teams","hooks_url":"https://api.github.com/repos/github/vscode-codeql/hooks","issue_events_url":"https://api.github.com/repos/github/vscode-codeql/issues/events{/number}","events_url":"https://api.github.com/repos/github/vscode-codeql/events","assignees_url":"https://api.github.com/repos/github/vscode-codeql/assignees{/user}","branches_url":"https://api.github.com/repos/github/vscode-codeql/branches{/branch}","tags_url":"https://api.github.com/repos/github/vscode-codeql/tags","blobs_url":"https://api.github.com/repos/github/vscode-codeql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/vscode-codeql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/vscode-codeql/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/vscode-codeql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/vscode-codeql/statuses/{sha}","languages_url":"https://api.github.com/repos/github/vscode-codeql/languages","stargazers_url":"https://api.github.com/repos/github/vscode-codeql/stargazers","contributors_url":"https://api.github.com/repos/github/vscode-codeql/contributors","subscribers_url":"https://api.github.com/repos/github/vscode-codeql/subscribers","subscription_url":"https://api.github.com/repos/github/vscode-codeql/subscription","commits_url":"https://api.github.com/repos/github/vscode-codeql/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/vscode-codeql/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/vscode-codeql/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/vscode-codeql/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/vscode-codeql/contents/{+path}","compare_url":"https://api.github.com/repos/github/vscode-codeql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/vscode-codeql/merges","archive_url":"https://api.github.com/repos/github/vscode-codeql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/vscode-codeql/downloads","issues_url":"https://api.github.com/repos/github/vscode-codeql/issues{/number}","pulls_url":"https://api.github.com/repos/github/vscode-codeql/pulls{/number}","milestones_url":"https://api.github.com/repos/github/vscode-codeql/milestones{/number}","notifications_url":"https://api.github.com/repos/github/vscode-codeql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/vscode-codeql/labels{/name}","releases_url":"https://api.github.com/repos/github/vscode-codeql/releases{/id}","deployments_url":"https://api.github.com/repos/github/vscode-codeql/deployments","created_at":"2019-09-26T19:44:53Z","updated_at":"2022-09-24T16:33:41Z","pushed_at":"2022-09-27T14:01:22Z","git_url":"git://github.com/github/vscode-codeql.git","ssh_url":"git@github.com:github/vscode-codeql.git","clone_url":"https://github.com/github/vscode-codeql.git","svn_url":"https://github.com/github/vscode-codeql","homepage":"","size":10103,"stargazers_count":311,"watchers_count":311,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":165,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":135,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["codeql","vscode","vscode-extension","works-with-codespaces"],"visibility":"public","forks":165,"open_issues":135,"watchers":311,"default_branch":"main","temp_clone_token":null,"organization":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"network_count":165,"subscribers_count":28} + +https +GET +api.github.com +None +/repos/github/vscode-codeql/actions/runs/160995070 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Tue, 27 Sep 2022 16:12:54 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Cache-Control', 'public, max-age=60, s-maxage=60'), ('Vary', 'Accept, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"4e62f3e45aa64c41f5d8dda4bf9c8e155c592b4f9d70cedf888671f278775a36"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '60'), ('X-RateLimit-Remaining', '31'), ('X-RateLimit-Reset', '1664298351'), ('X-RateLimit-Used', '29'), ('X-RateLimit-Resource', 'core'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '0'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'B41A:277A:61AE664:6319050:63332106')] +{"id":160995070,"name":"Release","node_id":"MDExOldvcmtmbG93UnVuMTYwOTk1MDcw","head_branch":"v1.3.1","head_sha":"c4353981fa5a3565d075d187276eebd92b2a20fc","path":".github/workflows/release.yml","display_title":"Release","run_number":47,"event":"push","status":"completed","conclusion":"success","workflow_id":247289,"check_suite_id":887193234,"check_suite_node_id":"MDEwOkNoZWNrU3VpdGU4ODcxOTMyMzQ=","url":"https://api.github.com/repos/github/vscode-codeql/actions/runs/160995070","html_url":"https://github.com/github/vscode-codeql/actions/runs/160995070","pull_requests":[],"created_at":"2020-07-07T18:34:48Z","updated_at":"2020-07-07T18:36:58Z","actor":{"login":"jcreedcmu","id":1500822,"node_id":"MDQ6VXNlcjE1MDA4MjI=","avatar_url":"https://avatars.githubusercontent.com/u/1500822?v=4","gravatar_id":"","url":"https://api.github.com/users/jcreedcmu","html_url":"https://github.com/jcreedcmu","followers_url":"https://api.github.com/users/jcreedcmu/followers","following_url":"https://api.github.com/users/jcreedcmu/following{/other_user}","gists_url":"https://api.github.com/users/jcreedcmu/gists{/gist_id}","starred_url":"https://api.github.com/users/jcreedcmu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcreedcmu/subscriptions","organizations_url":"https://api.github.com/users/jcreedcmu/orgs","repos_url":"https://api.github.com/users/jcreedcmu/repos","events_url":"https://api.github.com/users/jcreedcmu/events{/privacy}","received_events_url":"https://api.github.com/users/jcreedcmu/received_events","type":"User","site_admin":false},"run_attempt":1,"referenced_workflows":[],"run_started_at":"2020-07-07T18:34:48Z","jobs_url":"https://api.github.com/repos/github/vscode-codeql/actions/runs/160995070/jobs","logs_url":"https://api.github.com/repos/github/vscode-codeql/actions/runs/160995070/logs","check_suite_url":"https://api.github.com/repos/github/vscode-codeql/check-suites/887193234","artifacts_url":"https://api.github.com/repos/github/vscode-codeql/actions/runs/160995070/artifacts","cancel_url":"https://api.github.com/repos/github/vscode-codeql/actions/runs/160995070/cancel","rerun_url":"https://api.github.com/repos/github/vscode-codeql/actions/runs/160995070/rerun","previous_attempt_url":null,"workflow_url":"https://api.github.com/repos/github/vscode-codeql/actions/workflows/247289","head_commit":{"id":"c4353981fa5a3565d075d187276eebd92b2a20fc","tree_id":"b5561db1b83aa7f5bd0e5126b375caaf79cc16fb","message":"update CHANGELOG for release","timestamp":"2020-07-07T18:28:53Z","author":{"name":"Jason Reed","email":"jcreedcmu@github.com"},"committer":{"name":"Jason Reed","email":"jcreedcmu@github.com"}},"repository":{"id":211169016,"node_id":"MDEwOlJlcG9zaXRvcnkyMTExNjkwMTY=","name":"vscode-codeql","full_name":"github/vscode-codeql","private":false,"owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/github/vscode-codeql","description":"An extension for Visual Studio Code that adds rich language support for CodeQL","fork":false,"url":"https://api.github.com/repos/github/vscode-codeql","forks_url":"https://api.github.com/repos/github/vscode-codeql/forks","keys_url":"https://api.github.com/repos/github/vscode-codeql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/vscode-codeql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/vscode-codeql/teams","hooks_url":"https://api.github.com/repos/github/vscode-codeql/hooks","issue_events_url":"https://api.github.com/repos/github/vscode-codeql/issues/events{/number}","events_url":"https://api.github.com/repos/github/vscode-codeql/events","assignees_url":"https://api.github.com/repos/github/vscode-codeql/assignees{/user}","branches_url":"https://api.github.com/repos/github/vscode-codeql/branches{/branch}","tags_url":"https://api.github.com/repos/github/vscode-codeql/tags","blobs_url":"https://api.github.com/repos/github/vscode-codeql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/vscode-codeql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/vscode-codeql/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/vscode-codeql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/vscode-codeql/statuses/{sha}","languages_url":"https://api.github.com/repos/github/vscode-codeql/languages","stargazers_url":"https://api.github.com/repos/github/vscode-codeql/stargazers","contributors_url":"https://api.github.com/repos/github/vscode-codeql/contributors","subscribers_url":"https://api.github.com/repos/github/vscode-codeql/subscribers","subscription_url":"https://api.github.com/repos/github/vscode-codeql/subscription","commits_url":"https://api.github.com/repos/github/vscode-codeql/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/vscode-codeql/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/vscode-codeql/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/vscode-codeql/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/vscode-codeql/contents/{+path}","compare_url":"https://api.github.com/repos/github/vscode-codeql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/vscode-codeql/merges","archive_url":"https://api.github.com/repos/github/vscode-codeql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/vscode-codeql/downloads","issues_url":"https://api.github.com/repos/github/vscode-codeql/issues{/number}","pulls_url":"https://api.github.com/repos/github/vscode-codeql/pulls{/number}","milestones_url":"https://api.github.com/repos/github/vscode-codeql/milestones{/number}","notifications_url":"https://api.github.com/repos/github/vscode-codeql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/vscode-codeql/labels{/name}","releases_url":"https://api.github.com/repos/github/vscode-codeql/releases{/id}","deployments_url":"https://api.github.com/repos/github/vscode-codeql/deployments"},"head_repository":{"id":211169016,"node_id":"MDEwOlJlcG9zaXRvcnkyMTExNjkwMTY=","name":"vscode-codeql","full_name":"github/vscode-codeql","private":false,"owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/github/vscode-codeql","description":"An extension for Visual Studio Code that adds rich language support for CodeQL","fork":false,"url":"https://api.github.com/repos/github/vscode-codeql","forks_url":"https://api.github.com/repos/github/vscode-codeql/forks","keys_url":"https://api.github.com/repos/github/vscode-codeql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/vscode-codeql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/vscode-codeql/teams","hooks_url":"https://api.github.com/repos/github/vscode-codeql/hooks","issue_events_url":"https://api.github.com/repos/github/vscode-codeql/issues/events{/number}","events_url":"https://api.github.com/repos/github/vscode-codeql/events","assignees_url":"https://api.github.com/repos/github/vscode-codeql/assignees{/user}","branches_url":"https://api.github.com/repos/github/vscode-codeql/branches{/branch}","tags_url":"https://api.github.com/repos/github/vscode-codeql/tags","blobs_url":"https://api.github.com/repos/github/vscode-codeql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/vscode-codeql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/vscode-codeql/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/vscode-codeql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/vscode-codeql/statuses/{sha}","languages_url":"https://api.github.com/repos/github/vscode-codeql/languages","stargazers_url":"https://api.github.com/repos/github/vscode-codeql/stargazers","contributors_url":"https://api.github.com/repos/github/vscode-codeql/contributors","subscribers_url":"https://api.github.com/repos/github/vscode-codeql/subscribers","subscription_url":"https://api.github.com/repos/github/vscode-codeql/subscription","commits_url":"https://api.github.com/repos/github/vscode-codeql/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/vscode-codeql/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/vscode-codeql/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/vscode-codeql/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/vscode-codeql/contents/{+path}","compare_url":"https://api.github.com/repos/github/vscode-codeql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/vscode-codeql/merges","archive_url":"https://api.github.com/repos/github/vscode-codeql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/vscode-codeql/downloads","issues_url":"https://api.github.com/repos/github/vscode-codeql/issues{/number}","pulls_url":"https://api.github.com/repos/github/vscode-codeql/pulls{/number}","milestones_url":"https://api.github.com/repos/github/vscode-codeql/milestones{/number}","notifications_url":"https://api.github.com/repos/github/vscode-codeql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/vscode-codeql/labels{/name}","releases_url":"https://api.github.com/repos/github/vscode-codeql/releases{/id}","deployments_url":"https://api.github.com/repos/github/vscode-codeql/deployments"}} + +https +GET +api.github.com +None +/repos/github/vscode-codeql/actions/runs/160995070/artifacts +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Tue, 27 Sep 2022 16:12:54 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Cache-Control', 'public, max-age=60, s-maxage=60'), ('Vary', 'Accept, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"384dd95df518dd09f3403cdb0efea6f07b615808530fa59263a9f3f6a39e0436"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '60'), ('X-RateLimit-Remaining', '30'), ('X-RateLimit-Reset', '1664298351'), ('X-RateLimit-Used', '30'), ('X-RateLimit-Resource', 'core'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '0'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', '978C:0D46:61080A5:627CC46:63332106')] +{"total_count":1,"artifacts":[{"id":10495898,"node_id":"MDg6QXJ0aWZhY3QxMDQ5NTg5OA==","name":"vscode-codeql-extension","size_in_bytes":5555905,"url":"https://api.github.com/repos/github/vscode-codeql/actions/artifacts/10495898","archive_download_url":"https://api.github.com/repos/github/vscode-codeql/actions/artifacts/10495898/zip","expired":true,"created_at":"2020-07-07T18:36:58Z","updated_at":"2020-07-07T18:36:58Z","expires_at":"2020-10-05T18:36:58Z","workflow_run":{"id":160995070,"repository_id":211169016,"head_repository_id":211169016,"head_branch":"v1.3.1","head_sha":"c4353981fa5a3565d075d187276eebd92b2a20fc"}}]} +