Merge pull request #2360 from Infisical/daniel/redirect-node-docs

feat(integrations): Add visibility support to Github Integration
This commit is contained in:
Daniel Hougaard
2024-09-04 10:32:13 +04:00
committed by GitHub
14 changed files with 466 additions and 253 deletions
@@ -1625,7 +1625,11 @@ const syncSecretsGitHub = async ({
await octokit.request("PUT /orgs/{org}/actions/secrets/{secret_name}", {
org: integration.owner as string,
secret_name: key,
visibility: "all",
visibility: metadata.githubVisibility ?? "all",
...(metadata.githubVisibility === "selected" && {
// we need to map the githubVisibilityRepoIds to numbers
selected_repository_ids: metadata.githubVisibilityRepoIds?.map(Number) ?? []
}),
encrypted_value: encryptedSecret,
key_id: repoPublicKey.key_id
});