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:
parent
82e9bc962c
commit
3f5583dae7
1 changed files with 1 additions and 7 deletions
|
|
@ -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}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue