Skip to content

Commit 3218455

Browse files
committed
fix: import missing SMSLAB branch protection rules
Branch protection rules for `SMSLAB` were missing. The branch protection import assumes default unless specified otherwise. Since SMSLab uses `smslab/[y,z,2]*` and not the repositories default branch it was failing to import as the rule was non-existent.
1 parent f569bf1 commit 3218455

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

terraform/github/import_resources.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ def main() -> None:
235235
branch_protection_resource = BranchProtection(team_id.name.lower(
236236
), {f"{name}:stackhpc/2024.1": name for name in team_repositories}, parsed_args.dry_run, "_caracal")
237237
branch_protection_resource.refresh_resource()
238+
elif team_id == TeamID.SMSLAB:
239+
branch_protection_resource = BranchProtection(team_id.name.lower(
240+
), {f"{name}:smslab/[y,z,2]*": name for name in team_repositories}, parsed_args.dry_run)
241+
branch_protection_resource.refresh_resource()
238242
else:
239243
branch_protection_resource = BranchProtection(team_id.name.lower(
240244
), {f"{name}:{default_branches[name]}": name for name in team_repositories}, parsed_args.dry_run)

0 commit comments

Comments
 (0)