Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add organizational secrets API #384

Merged
merged 1 commit into from
Jun 3, 2023

Conversation

pigeonhands
Copy link
Contributor

Adds apis for creating and deleting organizational secrets.

let org = client.orgs("owner");
let secrets = org.secrets();

let pub_key = secrets.get_public_key().await?;

secrets.create_or_update_secret("GH_TOKEN", &CreateOrganizationSecret{
     key_id: pub_key.key_id,
    encrypted_value: String::from("some-b64-string"),
    visibility: Visibility::Private,
    selected_repository_ids: None,
}).await;

let secret_info = secrets.get_secret("GH_TOKEN").await?;

secrets.delete_secret("GH_TOKEN").await?

src/api/orgs/secrets.rs Outdated Show resolved Hide resolved
@pigeonhands pigeonhands force-pushed the feature/org-secrets branch 2 times, most recently from 4e25236 to 61cd8b5 Compare May 30, 2023 23:27
@maflcko
Copy link
Contributor

maflcko commented May 31, 2023

You may have to run cargo fmt?

@pigeonhands pigeonhands force-pushed the feature/org-secrets branch from 61cd8b5 to 31bed2a Compare May 31, 2023 23:04
@pigeonhands
Copy link
Contributor Author

You may have to run cargo fmt?

Done

@XAMPPRocky
Copy link
Owner

Thank you for your PR!

@XAMPPRocky XAMPPRocky merged commit c45dbf2 into XAMPPRocky:main Jun 3, 2023
@github-actions github-actions bot mentioned this pull request Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants