Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/policies/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- description: Approve and auto-squash-merge bot PRs to main labeled 'auto-merge'
triggerOnOwnActions: true
if:
- payloadType: Pull_Request
- labelAdded:
label: ':octocat: auto-merge'
- targetsBranch:
branch: main
- isActivitySender:
user: microsoft-github-policy-service[bot]
then:
- enableAutoMerge:
mergeMethod: Squash
- approvePullRequest:
comment: "Approved; this PR will merge when all status checks pass."

- description: Auto-merge policy service bot PRs to live labeled 'auto-merge'
triggerOnOwnActions: true
if:
- payloadType: Pull_Request
- labelAdded:
label: ':octocat: auto-merge'
- targetsBranch:
branch: live
- isActivitySender:
user: microsoft-github-policy-service[bot]
then:
- enableAutoMerge:
mergeMethod: Merge

- description: Don't auto-merge PRs with 'auto-merge' label removed
if:
- payloadType: Pull_Request
- labelRemoved:
label: ':octocat: auto-merge'
then:
- disableAutoMerge
8 changes: 5 additions & 3 deletions .github/policies/scheduled-prod-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ configuration:
head: main
base: live
title: Merge main into live
body: Automated merge of the main branch into live, syncing documentation content to the production environment.
body: Automated merge of the main branch into live.

- description: Push to live branch (scheduled 7PM PT publish)
frequencies:
- daily:
Expand All @@ -27,7 +28,8 @@ configuration:
head: main
base: live
title: Merge main into live
body: Automated merge of the main branch into live, syncing documentation content to the production environment.
body: Automated merge of the main branch into live.

- description: Push to live branch (scheduled 3AM PT publish)
frequencies:
- daily:
Expand All @@ -38,4 +40,4 @@ configuration:
head: main
base: live
title: Merge main into live
body: Automated merge of the main branch into live, syncing documentation content to the production environment.
body: Automated merge of the main branch into live.
8 changes: 5 additions & 3 deletions .github/policies/scheduled-stage-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ configuration:
head: smoke-test
base: main
title: Merge smoke-test into main
body: Automated merge of the smoke-test branch into main, syncing API documentation content to the staging environment.
body: Automated merge of the smoke-test branch into main.

- description: Push to main branch (scheduled 6PM PT publish)
frequencies:
- daily:
Expand All @@ -27,7 +28,8 @@ configuration:
head: smoke-test
base: main
title: Merge smoke-test into main
body: Automated merge of the smoke-test branch into main, syncing API documentation content to the staging environment.
body: Automated merge of the smoke-test branch into main.

- description: Push to main branch (scheduled 2AM PT publish)
frequencies:
- daily:
Expand All @@ -38,4 +40,4 @@ configuration:
head: smoke-test
base: main
title: Merge smoke-test into main
body: Automated merge of the smoke-test branch into main, syncing API documentation content to the staging environment.
body: Automated merge of the smoke-test branch into main.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- description: Sync API documentation to staging environment.
- description: Sync API docs to staging
triggerOnOwnActions: true
if:
- payloadType: Pull_Request
Expand All @@ -22,11 +22,8 @@ configuration:
then:
- addLabel:
label: ':octocat: auto-merge'
- enableAutoMerge:
mergeMethod: Squash
- approvePullRequest:
comment: ':shipit:'
- description: Sync staging environment to production.

- description: Sync staging to production
triggerOnOwnActions: true
if:
- payloadType: Pull_Request
Expand All @@ -39,8 +36,4 @@ configuration:
isRegex: False
then:
- addLabel:
label: ':octocat: auto-merge'
- enableAutoMerge:
mergeMethod: Merge
- approvePullRequest:
comment: ':shipit:'
label: ':octocat: auto-merge'
Loading