Skip to content

Commit 771e880

Browse files
committed
Policy fix
1 parent 435e148 commit 771e880

File tree

4 files changed

+65
-21
lines changed

4 files changed

+65
-21
lines changed

.github/policies/auto-merge.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
id:
2+
name: GitOps.PullRequestIssueManagement
3+
description: GitOps.PullRequestIssueManagement primitive
4+
owner:
5+
resource: repository
6+
disabled: false
7+
where:
8+
configuration:
9+
resourceManagementConfiguration:
10+
eventResponderTasks:
11+
- description: Approve and auto-squash-merge bot PRs to main labeled 'auto-merge'
12+
triggerOnOwnActions: true
13+
if:
14+
- payloadType: Pull_Request
15+
- labelAdded:
16+
label: ':octocat: auto-merge'
17+
- targetsBranch:
18+
branch: main
19+
- isActivitySender:
20+
user: microsoft-github-policy-service[bot]
21+
then:
22+
- enableAutoMerge:
23+
mergeMethod: Squash
24+
- approvePullRequest:
25+
comment: "Approved; this PR will merge when all status checks pass."
26+
27+
- description: Auto-merge policy service bot PRs to live labeled 'auto-merge'
28+
triggerOnOwnActions: true
29+
if:
30+
- payloadType: Pull_Request
31+
- labelAdded:
32+
label: ':octocat: auto-merge'
33+
- targetsBranch:
34+
branch: live
35+
- isActivitySender:
36+
user: microsoft-github-policy-service[bot]
37+
then:
38+
- enableAutoMerge:
39+
mergeMethod: Merge
40+
41+
- description: Don't auto-merge PRs with 'auto-merge' label removed
42+
if:
43+
- payloadType: Pull_Request
44+
- labelRemoved:
45+
label: ':octocat: auto-merge'
46+
then:
47+
- disableAutoMerge

.github/policies/scheduled-prod-sync.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ configuration:
1616
head: main
1717
base: live
1818
title: Merge main into live
19-
body: Automated merge of the main branch into live, syncing documentation content to the production environment.
20-
- description: Push to live branch (scheduled 6PM PT publish)
19+
body: Automated merge of the main branch into live.
20+
21+
- description: Push to live branch (scheduled 7PM PT publish)
2122
frequencies:
2223
- daily:
2324
time: 2:00
@@ -27,8 +28,9 @@ configuration:
2728
head: main
2829
base: live
2930
title: Merge main into live
30-
body: Automated merge of the main branch into live, syncing documentation content to the production environment.
31-
- description: Push to live branch (scheduled 2AM PT publish)
31+
body: Automated merge of the main branch into live.
32+
33+
- description: Push to live branch (scheduled 3AM PT publish)
3234
frequencies:
3335
- daily:
3436
time: 10:00
@@ -38,4 +40,4 @@ configuration:
3840
head: main
3941
base: live
4042
title: Merge main into live
41-
body: Automated merge of the main branch into live, syncing documentation content to the production environment.
43+
body: Automated merge of the main branch into live.

.github/policies/scheduled-stage-sync.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ configuration:
1616
head: smoke-test
1717
base: main
1818
title: Merge smoke-test into main
19-
body: Automated merge of the smoke-test branch into main, syncing API documentation content to the staging environment.
20-
- description: Push to main branch (scheduled 5PM PT publish)
19+
body: Automated merge of the smoke-test branch into main.
20+
21+
- description: Push to main branch (scheduled 6PM PT publish)
2122
frequencies:
2223
- daily:
2324
time: 1:00
@@ -27,8 +28,9 @@ configuration:
2728
head: smoke-test
2829
base: main
2930
title: Merge smoke-test into main
30-
body: Automated merge of the smoke-test branch into main, syncing API documentation content to the staging environment.
31-
- description: Push to main branch (scheduled 1AM PT publish)
31+
body: Automated merge of the smoke-test branch into main.
32+
33+
- description: Push to main branch (scheduled 2AM PT publish)
3234
frequencies:
3335
- daily:
3436
time: 9:00
@@ -38,4 +40,4 @@ configuration:
3840
head: smoke-test
3941
base: main
4042
title: Merge smoke-test into main
41-
body: Automated merge of the smoke-test branch into main, syncing API documentation content to the staging environment.
43+
body: Automated merge of the smoke-test branch into main.
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ where:
88
configuration:
99
resourceManagementConfiguration:
1010
eventResponderTasks:
11-
- description: Sync API documentation to staging environment.
11+
- description: Sync API docs to staging
1212
triggerOnOwnActions: true
1313
if:
1414
- payloadType: Pull_Request
@@ -22,11 +22,8 @@ configuration:
2222
then:
2323
- addLabel:
2424
label: ':octocat: auto-merge'
25-
- enableAutoMerge:
26-
mergeMethod: Squash
27-
- approvePullRequest:
28-
comment: ':shipit:'
29-
- description: Sync staging environment to production.
25+
26+
- description: Sync staging to production
3027
triggerOnOwnActions: true
3128
if:
3229
- payloadType: Pull_Request
@@ -39,8 +36,4 @@ configuration:
3936
isRegex: False
4037
then:
4138
- addLabel:
42-
label: ':octocat: auto-merge'
43-
- enableAutoMerge:
44-
mergeMethod: Merge
45-
- approvePullRequest:
46-
comment: ':shipit:'
39+
label: ':octocat: auto-merge'

0 commit comments

Comments
 (0)