1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix pagination issue in community.general.github_deploy_key (#7375)

* Fix pagination issue in community.general.github_deploy_key

* Add changelog fragment

* Update changelogs/fragments/7375-fix-github-deploy-key-pagination.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Padraic Calpin 2023-10-18 19:52:51 +01:00 committed by GitHub
parent cdb19ab8c1
commit eb4f8d4301
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
---
bugfixes:
- "github_deploy_key - fix pagination behaviour causing a crash when only a single page of deploy keys exist (https://github.com/ansible-collections/community.general/pull/7375)."

View file

@ -227,7 +227,7 @@ class GithubDeployKey(object):
yield self.module.from_json(resp.read()) yield self.module.from_json(resp.read())
links = {} links = {}
for x, y in findall(r'<([^>]+)>;\s*rel="(\w+)"', info["link"]): for x, y in findall(r'<([^>]+)>;\s*rel="(\w+)"', info.get("link", '')):
links[y] = x links[y] = x
url = links.get('next') url = links.get('next')