Skip to content

Instantly share code, notes, and snippets.

@oliverlabs
Created August 9, 2023 11:42
Show Gist options
  • Save oliverlabs/c9ce46a01a673bdc055cd220090c9dc4 to your computer and use it in GitHub Desktop.
Save oliverlabs/c9ce46a01a673bdc055cd220090c9dc4 to your computer and use it in GitHub Desktop.
Check user permissions for a GitHub repository using GitHub CLI
# This command requires gh cli to be installed
OWNERORG="test"
REPOSITORY="test"
GHUSERNAME="test"
gh api repos/$OWNERORG/$REPOSITORY/collaborators/$USERNAME/permission | jq '.permission' -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment