Set up or align GitHub repo settings, branch/ruleset policy, templates, Actions hardening, Environments, release workflows, and deploy workflows for continuously publishable or deployable repositories.
97
100%
Does it follow best practices?
Impact
96%
1.35xAverage score across 7 eval scenarios
Passed
No known issues
Use this reference when the task touches GitHub repository settings, merge policy, branch protections, rulesets, tag policy, Actions permissions, repository metadata, or Environments.
Check the live repo before making severity calls or writing instructions:
Prefer gh or the GitHub UI/API for live settings. Checked-in workflow files are evidence, not proof of repo settings.
Default posture:
Do not change merge methods just to satisfy taste. Tie the change to release notes, review ergonomics, auditability, or maintainer policy.
Preserve existing protections unless the user asks for a policy change.
Baseline checks:
main should block force pushes and branch deletion.main remain allowed.merge_group for required checks.GITHUB_TOKEN writeback is acceptable for low-risk repos. When branch push restrictions are required, use a narrowly scoped GitHub App release actor that branch rules or rulesets explicitly allow.main, automated push-back release jobs will fail unless the actor is exempted or the release tool opens PRs.Branch protection with only conversation resolution is often a better fit than a full PR-required ruleset when maintainers intentionally keep direct pushes available.
Prefer signed-commit enforcement on protected/default branches. Use an organization ruleset for repo families when available; otherwise use repo-level rulesets or branch protection. Before enabling it, check release bump commits, deploy writebacks, merge automation, bot actors, and direct-push flows. Every protected-branch writer must sign commits or move to pull requests.
If enforcement is unavailable because of visibility, plan, or permissions,
record a settings gap or blocker. Public repos can usually use signed-commit
protection on GitHub's free surface; private/internal repos and organization
rulesets may be plan-gated. Treat ruleset 403 responses such as Upgrade to GitHub Pro or make this repository public to enable this feature as unconfirmed
policy state, not proof that no ruleset exists.
Protect release tags when releases or deploys depend on tags.
v* tag creation and mutation to trusted release automation or release admins.v1 as mutable release pointers and document that explicitly.Use least privilege at both repository and workflow levels:
Use GitHub Environments as secret and policy boundaries:
release for package/library/CLI/marketplace publishing secrets.staging, production, or provider-specific environment names for running app deploys.release Environment for secret scoping, but GitHub will create deployment records for jobs that declare an Environment. There is no supported deployment: false workflow key.Environment branch/tag policies constrain the workflow run ref. They do not prove a later manually checked-out ref is safe.