1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 05:09:12 +00:00

remove excess output

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2026-03-13 22:40:15 +00:00
parent 82e9bc962c
commit 3f5583dae7
No known key found for this signature in database

View file

@ -63,8 +63,6 @@ result:
"changed": false,
"failed": false,
"result": {
"info": 200,
"response": "Secrets listed",
"secrets": [
{
"created_at": "2026-01-11T23:19:00Z",
@ -92,7 +90,7 @@ def list_secrets(
headers: dict[str, str],
organization: str,
repository: str,
) -> dict[str, int]:
) -> dict[str, list]:
url = (
f"{api_url}/repos/{organization}/{repository}/actions/secrets"
if repository
@ -105,14 +103,10 @@ def list_secrets(
body = resp.read()
return {
"secrets": json.loads(body).get("secrets", []),
"info": info["status"],
"response": "Secrets listed",
}
elif info["status"] == HTTPStatus.NOT_FOUND:
return {
"secrets": [],
"info": info["status"],
"response": "No secrets found",
}
else:
module.fail_json(msg=f"Failed to list secrets: {info}")