Skip to main content
Version: Next

Task 03: Configure Project Settings

Runbook GitHub GitLab Azure DevOps

DOCUMENT CATEGORY: Runbook Step SCOPE: Source control project configuration PURPOSE: Configure repository settings, branch protection, and merge/pull request approvals

Status: Active Applies To: All Azure Local deployments Last Updated: 2026-03-19


Objective

Configure required settings for the source control project. Most settings are replicated from the template, but must be verified. Select your platform below for platform-specific instructions.


Prerequisites

  • Source control project created (Task 02)
  • Admin / Maintainer role in the project

Procedure

Branch Protection

Protect the main branch to prevent direct pushes and require reviews before merging.

  1. Navigate to SettingsBranches
  2. Click Add branch protection rule
  3. Set Branch name pattern to main
  4. Enable the following:
SettingValue
Require a pull request before merging
Require approvals✅ (see Approval Rules below)
Dismiss stale pull request approvals when new commits are pushed
Require status checks to pass before merging
Require conversation resolution before merging
Do not allow bypassing the above settings
Restrict who can push to matching branches✅ (No direct pushes)
Allow force pushes❌ Disabled
Allow deletions❌ Disabled
  1. Click Save changes

References: GitHub — Branch protection rules

Push Rules / Security Settings

GitHub handles push security via branch protection (configured above) and repository settings:

  1. Navigate to SettingsCode security and analysis
  2. Enable:
    • Secret scanning — detect committed secrets
    • Push protection — block pushes containing secrets
  3. Navigate to SettingsGeneralPull Requests
    • ✅ Allow squash merging (set default commit message)
    • ❌ Disable merge commits and rebase merging (optional — enforce squash)

Merge / Pull Request Approvals

Configure required approvals in SettingsBranches → branch protection rule for main:

Project TypeRequired ApprovalsReviewers
Sandbox/Lab0
Core repos3@AzureLocal/cicd team
Deployment repos2@AzureLocal/pcie team
All others2@AzureLocal/cicd team

Optionally, add a CODEOWNERS file to the repository root to auto-assign reviewers:

CODEOWNERS
# Default reviewers for all files
* @AzureLocal/cicd

References: GitHub — CODEOWNERS


Verification

  • main branch protected — no direct pushes allowed
  • Push rules / security scanning configured
  • Merge/PR approval rules added with correct reviewer counts
  • Squash merge enforced (or preferred merge strategy set)

Next Steps

Create Environments


References