How do you manage GitHub organisation settings as code?
IntermediateProductionGovernance, migration, automation and cost
Answer
With the Terraform GitHub provider or Probot settings: repos, teams, rulesets, branch protection and environments are declared in a repo, reviewed by PR and applied by a pipeline. Drift is detected with scheduled terraform plan. Manual changes become visible instead of silently accumulating.
resource "github_repository" "app" {
name = "app"
visibility = "private"
delete_branch_on_merge = true
}
More on Governance, migration, automation and cost
How do you migrate 200 repos from Bitbucket or GitLab to GitHub with minimal disruption?IntermediateWhat does a migration from SVN (or a legacy monolith repo) to Git need beyond the conversion?AdvancedWhat standard files should every repo have?BeginnerWhat is InnerSource and how does Git workflow support it?IntermediateWhen do you use DCO versus CLA?BeginnerWhat is your repo lifecycle policy?Beginner