A user can be blocked from an organization in Github using a custom action in a Torii workflow.
Requirements
- The token used to authenticate the call must have the admin:org scope in order to make any blocking calls for an organization.
Custom Action Configuration
Method: PUT
URL: https://api.github.com/orgs/{GITHUB_ORG}/blocks/{GITHUB_USERNAME}
Query Parameters
Not required.
Headers
Header | Value |
---|---|
Authorization | Bearer [SecretsVault.GithubAPIToken] |
Accept | application/vnd.github+json |
Store your Github API token in Torii using our Secrets Vault.
Body
Not required.