Created
October 20, 2023 15:14
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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