forked from PyGithub/PyGithub
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add listing of artifacts in the repository (PyGithub#2313)
Implement calls for listing Github Actions artifacts linked to a repository. The test runs on an external repository because PyGithub doesn't have any artifacts in its CI.
- Loading branch information
Aleksei Fedotov
committed
Sep 28, 2022
1 parent
fc4e77f
commit b07bdf3
Showing
7 changed files
with
106 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
tests/ReplayData/Artifact.testGetArtifactsFromWorkflow.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
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', 'Wed, 28 Sep 2022 11:31:33 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', '47'), ('X-RateLimit-Reset', '1664368108'), ('X-RateLimit-Used', '13'), ('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', 'AB22:78D3:20371B2:20B2648:63343095')] | ||
{"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', 'Wed, 28 Sep 2022 11:31:33 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', '46'), ('X-RateLimit-Reset', '1664368108'), ('X-RateLimit-Used', '14'), ('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', 'AB2A:11933:1E407FD:1EBB285:63343095')] | ||
{"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"}}]} | ||
|
Oops, something went wrong.