Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.

Conversation

@jonathanchu
Copy link

What's this PR do?

The GitHub API create Key method also takes in a read_only parameter to set keys to read-only. This PR adds the field to the schema so it can be properly passed through.

https://developer.github.com/v3/repos/keys/#create

Previously, this would create new keys with "read/write" access, which GitHub sets by default. Now, this matches their API parameters and allows the keys to be set as read-only. If the read_only field is omitted, it will default to "read/write".

Usage:

key_params = {
    'title': 'Title of your key',
    'key': <public_key>,
    'read-only': True,
}

This allows the keys to be set as "read-only", otherwise the default will
always be set to "read/write".
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant