mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-21 20:59:10 +00:00
parent
f642dac900
commit
c8fe1e571f
2 changed files with 7 additions and 7 deletions
|
|
@ -100,8 +100,8 @@ result:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import typing as t
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.urls import fetch_url
|
from ansible.module_utils.urls import fetch_url
|
||||||
|
|
@ -180,7 +180,7 @@ def upsert_secret(
|
||||||
key: str,
|
key: str,
|
||||||
encrypted_value: str,
|
encrypted_value: str,
|
||||||
key_id: str,
|
key_id: str,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, t.Any]:
|
||||||
"""Create or update a GitHub Actions secret."""
|
"""Create or update a GitHub Actions secret."""
|
||||||
url = (
|
url = (
|
||||||
f"{api_url}/repos/{organization}/{repository}/actions/secrets/{key}"
|
f"{api_url}/repos/{organization}/{repository}/actions/secrets/{key}"
|
||||||
|
|
@ -236,7 +236,7 @@ def delete_secret(
|
||||||
organization: str,
|
organization: str,
|
||||||
repository: str,
|
repository: str,
|
||||||
key: str,
|
key: str,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, t.Any]:
|
||||||
"""Delete a GitHub Actions secret."""
|
"""Delete a GitHub Actions secret."""
|
||||||
url = (
|
url = (
|
||||||
f"{api_url}/repos/{organization}/{repository}/actions/secrets/{key}"
|
f"{api_url}/repos/{organization}/{repository}/actions/secrets/{key}"
|
||||||
|
|
@ -323,7 +323,7 @@ def main() -> None:
|
||||||
params=module.params,
|
params=module.params,
|
||||||
)
|
)
|
||||||
|
|
||||||
result: dict[str, Any] = {}
|
result: dict[str, t.Any] = {}
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
"Accept": "application/vnd.github+json",
|
"Accept": "application/vnd.github+json",
|
||||||
|
|
|
||||||
|
|
@ -368,7 +368,7 @@ end_state:
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import traceback
|
import traceback
|
||||||
from typing import Any
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
|
|
@ -763,8 +763,8 @@ def delete_tmp_swap_flow_if_exists(
|
||||||
kc.delete_authentication_flow_by_id(id=existing_tmp["id"], realm=realm)
|
kc.delete_authentication_flow_by_id(id=existing_tmp["id"], realm=realm)
|
||||||
|
|
||||||
|
|
||||||
def create_authentication_execution_spec_options(depth: int) -> dict[str, Any]:
|
def create_authentication_execution_spec_options(depth: int) -> dict[str, t.Any]:
|
||||||
options: dict[str, Any] = dict(
|
options: dict[str, t.Any] = dict(
|
||||||
providerId=dict(type="str", required=depth == 0),
|
providerId=dict(type="str", required=depth == 0),
|
||||||
requirement=dict(type="str", required=True, choices=["REQUIRED", "ALTERNATIVE", "DISABLED", "CONDITIONAL"]),
|
requirement=dict(type="str", required=True, choices=["REQUIRED", "ALTERNATIVE", "DISABLED", "CONDITIONAL"]),
|
||||||
authenticationConfig=dict(
|
authenticationConfig=dict(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue