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

[PR #7375/eb4f8d43 backport][stable-6] Fix pagination issue in community.general.github_deploy_key (#7407)

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>
(cherry picked from commit eb4f8d4301)

Co-authored-by: Padraic Calpin <padraic.calpin93@gmail.com>
This commit is contained in:
patchback[bot] 2023-10-18 21:15:12 +02:00 committed by GitHub
parent 94bb204e29
commit d9ed00fb12
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())
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
url = links.get('next')