Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jemc/b8fccf9e1cbad3654027588293dd64b4 to your computer and use it in GitHub Desktop.
Save jemc/b8fccf9e1cbad3654027588293dd64b4 to your computer and use it in GitHub Desktop.
Use GitHub CLI to enable all workflows that were disabled due to repository inactivity - either for all repos in a given org that you manage, or (by default) your personal repos.
function gh-enable-all-inactivity-disabled-workflows
set org $argv[1]
gh repo list $org | cut -f 1 | xargs -I REPO sh -c 'gh workflow list --all -R REPO | grep disabled_inactivity | cut -f 3 | xargs -I WORKFLOW sh -xc "gh workflow enable WORKFLOW -R REPO"'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment