diff --git a/.github/policies/auto-merge-sync-pr.yml b/.github/policies/auto-merge-sync-pr.yml deleted file mode 100644 index 86200653..00000000 --- a/.github/policies/auto-merge-sync-pr.yml +++ /dev/null @@ -1,51 +0,0 @@ -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 - - or: - - 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 - - or: - - isActivitySender: - user: microsoft-github-policy-service[bot] - then: - - enableAutoMerge: - mergeMethod: Merge - - approvePullRequest: - comment: "Approved; this PR will merge when all status checks pass." - - - description: Don't auto-merge PRs with 'auto-merge' label removed - if: - - payloadType: Pull_Request - - labelRemoved: - label: ':octocat: auto-merge' - then: - - disableAutoMerge \ No newline at end of file diff --git a/.github/policies/auto-label-pr.yml b/.github/policies/handle-automatic-pr.yml similarity index 85% rename from .github/policies/auto-label-pr.yml rename to .github/policies/handle-automatic-pr.yml index f2429ca7..d56b3b99 100644 --- a/.github/policies/auto-label-pr.yml +++ b/.github/policies/handle-automatic-pr.yml @@ -8,7 +8,7 @@ where: configuration: resourceManagementConfiguration: eventResponderTasks: - - description: Label publish PRs from the microsoft-github-policy-service bot + - description: Sync API documentation to staging environment. triggerOnOwnActions: true if: - payloadType: Pull_Request @@ -26,7 +26,7 @@ configuration: mergeMethod: Squash - approvePullRequest: comment: ':shipit:' - - description: Label publish PRs from the microsoft-github-policy-service bot + - description: Sync staging environment to production. triggerOnOwnActions: true if: - payloadType: Pull_Request @@ -41,6 +41,6 @@ configuration: - addLabel: label: ':octocat: auto-merge' - enableAutoMerge: - mergeMethod: Squash + mergeMethod: Merge - approvePullRequest: comment: ':shipit:' \ No newline at end of file diff --git a/.github/policies/scheduled-prod-sync.yml b/.github/policies/scheduled-prod-sync.yml index d01d1ffb..97cbeb3d 100644 --- a/.github/policies/scheduled-prod-sync.yml +++ b/.github/policies/scheduled-prod-sync.yml @@ -6,18 +6,36 @@ where: configuration: resourceManagementConfiguration: scheduledSearches: - - description: Push to main (scheduled sync) + - description: Push to live branch (scheduled 11AM PT publish) frequencies: - daily: - time: 1:00 + time: 18:00 + filters: [] + actions: + - createPullRequest: + 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. + - description: Push to live branch (scheduled 6PM PT publish) + frequencies: - daily: - time: 9:00 + time: 2:00 + filters: [] + actions: + - createPullRequest: + 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. + - description: Push to live branch (scheduled 2AM PT publish) + frequencies: - daily: - time: 17:00 + time: 10:00 filters: [] actions: - createPullRequest: head: main base: live title: Merge main into live - body: Please don't squash-merge this PR. \ No newline at end of file + body: Automated merge of the main branch into live, syncing documentation content to the production environment. \ No newline at end of file diff --git a/.github/policies/scheduled-sync.yml b/.github/policies/scheduled-stage-sync.yml similarity index 67% rename from .github/policies/scheduled-sync.yml rename to .github/policies/scheduled-stage-sync.yml index 0d0856a7..0843cadb 100644 --- a/.github/policies/scheduled-sync.yml +++ b/.github/policies/scheduled-stage-sync.yml @@ -16,18 +16,7 @@ configuration: head: smoke-test base: main title: Merge smoke-test into main - body: Please don't squash-merge this PR. - - description: Push to main branch (scheduled 3:18PM PT publish - used as test) - frequencies: - - daily: - time: 22:18 - filters: [] - actions: - - createPullRequest: - head: smoke-test - base: main - title: Merge smoke-test into main - body: Please don't squash-merge this PR. + body: Automated merge of the smoke-test branch into main, syncing API documentation content to the staging environment. - description: Push to main branch (scheduled 5PM PT publish) frequencies: - daily: @@ -38,7 +27,7 @@ configuration: head: smoke-test base: main title: Merge smoke-test into main - body: Please don't squash-merge this PR. + body: Automated merge of the smoke-test branch into main, syncing API documentation content to the staging environment. - description: Push to main branch (scheduled 1AM PT publish) frequencies: - daily: @@ -49,4 +38,4 @@ configuration: head: smoke-test base: main title: Merge smoke-test into main - body: Please don't squash-merge this PR. \ No newline at end of file + body: Automated merge of the smoke-test branch into main, syncing API documentation content to the staging environment. \ No newline at end of file