Skip to content

GitHub

GH CLI

Usage

bash
# set visibility to private
gh repo edit $REPO --visibility private --accept-visibility-change-consequences

# add topic
gh repo edit $REPO --add-topic $TOPIC

# set secrets
gh secret set -f .env

alias

bash
# delete repo alias
gh alias set repo-delete 'api -X DELETE "repos/$1"'

# transfer repo ownership alias
gh alias set transfer 'api repos/$1/transfer -f new_owner=$2'

Github Actions

Cookbook

Ignore dependabot PRs

yaml
jobs:
  pre-commit:
    if: github.actor != 'dependabot[bot]'