Skip to content

Commit

Permalink
feat: Add support for GitHub rulesets.
Browse files Browse the repository at this point in the history
These allow us to block branch creation in the upstream. This could be
accidental where a repo maintainer pushes to `TokTok/$repo` instead of
their fork.

This is in addition to branch protection rules that apply only to
`master`. No branch protection is applied to other branches, but only 2
bots are currently allowed to create branches other than `master`.
  • Loading branch information
iphydf committed Dec 28, 2024
1 parent 6befee4 commit 7b31a5a
Show file tree
Hide file tree
Showing 7 changed files with 193 additions and 47 deletions.
10 changes: 5 additions & 5 deletions admin/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
sh_test(
name = "settings_test",
name = "repos_test",
size = "small",
srcs = ["@perl"],
args = [
"$(location settings_test.pl)",
"$(location repos_test.pl)",
"$(location //:.gitmodules)",
"$(location settings.yaml)",
"$(location repos.yaml)",
],
data = [
"settings.yaml",
"settings_test.pl",
"repos.yaml",
"repos_test.pl",
"//:.gitmodules",
],
)
2 changes: 1 addition & 1 deletion admin/push
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

set -eux

bazel run //hs-github-tools/tools:hub-settings -- "$SCRIPT_DIR/settings.yaml" "$@"
bazel run //hs-github-tools/tools:hub-settings -- "$SCRIPT_DIR/repos.yaml" "$@"
Loading

0 comments on commit 7b31a5a

Please sign in to comment.