Configuration Guides¶
The guides start from a need, e.g. protecting a release branch or limiting the permissions of workflows, and explain how to address it with otterdog: which properties to use, what the consequences of each choice are and which trade-offs to consider. They complement the Reference, which documents every supported property. To add, rename or remove a resource, see Adding, renaming and removing resources, and when something goes wrong, see Troubleshooting.
Fundamentals¶
-
Understand where a value comes from, and why a
planshows a change. -
Reusing configuration with Jsonnet
Share settings between many repositories without copying them.
Protecting code¶
-
Protect the default branch or the release branches.
-
Apply the same protection to many repositories.
-
Rulesets or branch protection rules
Choose between the two mechanisms.
-
Replace branch protection rules with rulesets without losing protection.
-
Prevent release tags from being moved or deleted.
Security and automation¶
-
Limit the permissions of workflows, control which actions can run, and who and what can run the workflows.
-
Enable secret scanning, Dependabot, code scanning and vulnerability reporting, or apply code security configurations.
-
Provide credentials to workflows without exposing them.
-
Protect deployments and publishing with approvals and branch restrictions.
-
Connect external services securely.
Organization and access¶
-
Organization settings and member privileges
Decide what members can do, require sign-offs, classify repositories.
-
Grant access to repositories through teams.
Repositories¶
-
Choose the merge methods, enable auto-merge or a merge queue.
-
Repository features and metadata
Enable issues, discussions or a wiki, and describe repositories.
-
Configure websites, mirrors, templates, forks or archived repositories.
How to read the guides¶
Try every example in the Playground
The link below an example opens it in the Playground of the otterdog dashboard, which also lists all the examples of these guides: change it, see the resulting configuration and check it, without installing anything.
-
Complete and minimal examples
Each example is a complete organization configuration that only contains the properties relevant to the topic, all the others are inherited from the default configuration. The
importstatement at the top of the configuration file is omitted. -
The example default configuration
The values that an example inherits come from the example default configuration. The default configuration of your organization may define other values. The Playground can evaluate an example with either of them.
-
GitHub plans matter
Some features of GitHub are only available for some plans or repository visibilities, otterdog cannot enable what GitHub does not provide. The guides mention the availability and link to the GitHub documentation, which remains the authoritative source.
-
Recommendations and policies
The guides tell general recommendations apart from the choices that depend on the policy of your organization, see below.
Recommendation
A practice that is recommended in general, usually based on the GitHub documentation.
Organization policy
A choice that depends on the requirements, the size or the governance of your organization.
Administrators who maintain the default configuration for several organizations will find related information in Organization-wide policies.