There's a setting to indicate if GitHub Actions is enabled on all, selected, or none workflows. The bash extension used this to help indicate which repos to target:
enabled_repos=$(gh api "/orgs/$org_name/actions/permissions" --jq ".enabled_repositories")
case "$enabled_repos" in
all)
echo "- GitHub Actions enabled on All Repos"
print_org_repos "$org_name" "All Repos" "repos"
;;
selected)
echo "- GitHub Actions enabled on Selected Repos"
print_org_repos "$org_name" "Selected Repos" "actions/permissions/repositories"
;;
none)
echo "- GitHub Actions is not enabled on any repositories"
;;
*)
echo "- GitHub Actions is enabled on $enabled_repos?"
esac
}
Might as well reproduce that logic somewhat, although again may be necessary to consider the code structure since we're mapping from orgs to repos before processing.
There's a setting to indicate if GitHub Actions is enabled on all, selected, or none workflows. The bash extension used this to help indicate which repos to target:
Might as well reproduce that logic somewhat, although again may be necessary to consider the code structure since we're mapping from orgs to repos before processing.