diff --git a/hack/set-bp-yaml-checks.sh b/hack/set-bp-yaml-checks.sh new file mode 100755 index 0000000..e26748b --- /dev/null +++ b/hack/set-bp-yaml-checks.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +set -o errexit +set -o nounset +set -o pipefail + +# NOTE must be in format from ./hack/list-checks.sh +INPUT="$(< /dev/stdin yq e)" +# NOTE only manages the fields +# .branch-protection.orgs.ORG.repos.REPO.branches.DEFAULT +# - .protect +# - .required_status_checks.contexts +OUTPUT="${1:-}" + +if [ -z "$OUTPUT" ]; then + cat <