diff --git a/github/Repository.py b/github/Repository.py index dbb09484..797f928d 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -3011,6 +3011,7 @@ class Repository(github.GithubObject.CompletableGithubObject): self._requester, self.url + "/actions/workflows", None, + list_item="workflows", ) def get_workflow(self, id_or_name): diff --git a/tests/ReplayData/Repository.testGetWorkflows.txt b/tests/ReplayData/Repository.testGetWorkflows.txt index 8ad3cbc1..3c9cfc91 100644 --- a/tests/ReplayData/Repository.testGetWorkflows.txt +++ b/tests/ReplayData/Repository.testGetWorkflows.txt @@ -18,5 +18,5 @@ None None 200 [('Date', 'Thu, 30 Apr 2020 14:23:31 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4983'), ('X-RateLimit-Reset', '1588260036'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"fc1eaa3814dd3ef6fdb3da89e056c63b"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, 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', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'EA22:67AD:694D5:7A1D2:5EAADF63')] -[{"id":1026390,"node_id":"MDg6V29ya2Zsb3cxMDI2Mzkw","name":"check","path":".github/workflows/check.yml","state":"active","created_at":"2020-04-15T10:48:32.000+10:00","updated_at":"2020-04-15T10:48:32.000+10:00","url":"https://api.github.com/repos/PyGithub/PyGithub/actions/workflows/1026390","html_url":"https://github.com/PyGithub/PyGithub/blob/master/.github/workflows/check.yml","badge_url":"https://github.com/PyGithub/PyGithub/workflows/check/badge.svg"},{"id":1122712,"node_id":"MDg6V29ya2Zsb3cxMTIyNzEy","name":"Publish to PyPI","path":".github/workflows/python-publish.yml","state":"active","created_at":"2020-04-26T18:51:02.000+10:00","updated_at":"2020-04-26T18:51:02.000+10:00","url":"https://api.github.com/repos/PyGithub/PyGithub/actions/workflows/1122712","html_url":"https://github.com/PyGithub/PyGithub/blob/master/.github/workflows/python-publish.yml","badge_url":"https://github.com/PyGithub/PyGithub/workflows/Publish%20to%20PyPI/badge.svg"}] +{"total_count":2,"workflows":[{"id":1026390,"node_id":"MDg6V29ya2Zsb3cxMDI2Mzkw","name":"check","path":".github/workflows/check.yml","state":"active","created_at":"2020-04-15T10:48:32.000+10:00","updated_at":"2020-04-15T10:48:32.000+10:00","url":"https://api.github.com/repos/PyGithub/PyGithub/actions/workflows/1026390","html_url":"https://github.com/PyGithub/PyGithub/blob/master/.github/workflows/check.yml","badge_url":"https://github.com/PyGithub/PyGithub/workflows/check/badge.svg"},{"id":1122712,"node_id":"MDg6V29ya2Zsb3cxMTIyNzEy","name":"Publish to PyPI","path":".github/workflows/python-publish.yml","state":"active","created_at":"2020-04-26T18:51:02.000+10:00","updated_at":"2020-04-26T18:51:02.000+10:00","url":"https://api.github.com/repos/PyGithub/PyGithub/actions/workflows/1122712","html_url":"https://github.com/PyGithub/PyGithub/blob/master/.github/workflows/python-publish.yml","badge_url":"https://github.com/PyGithub/PyGithub/workflows/Publish%20to%20PyPI/badge.svg"}]}