From 312e83ecb9e9163803195771dc15fee5b9f676d1 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:40:40 -0800 Subject: [PATCH] Enable auto-merge of publish PRs (#39563) --- .github/policies/resourceManagement.yml | 31 +++++++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml index 0ea2b449d8cb7..5fe3ce20a4b40 100644 --- a/.github/policies/resourceManagement.yml +++ b/.github/policies/resourceManagement.yml @@ -93,23 +93,44 @@ configuration: - approvePullRequest: comment: "Approved, we'll :shipit: when all status checks pass." - addLabel: - label: azure-sdk-shipit + label: ':octocat: auto-merge' description: Label PRs from the Azure SDK bot + - if: + - payloadType: Pull_Request + - isActivitySender: + user: dotnet-policy-service + issueAuthor: False + then: + - addLabel: + label: ':octocat: auto-merge' + description: Label PRs from Dotnet Policy Service - if: - payloadType: Pull_Request - hasLabel: - label: azure-sdk-shipit + label: ':octocat: auto-merge' + - targetsBranch: + branch: main then: - enableAutoMerge: mergeMethod: Squash - description: Auto-merge Azure SDK PRs with green builds + description: Auto-squash-merge PRs to main labeled with auto-merge + - if: + - payloadType: Pull_Request + - hasLabel: + label: ':octocat: auto-merge' + - targetsBranch: + branch: live + then: + - enableAutoMerge: + mergeMethod: Merge + description: Auto-merge PRs to live labeled with auto-merge - if: - payloadType: Pull_Request - labelRemoved: - label: azure-sdk-shipit + label: ':octocat: auto-merge' then: - disableAutoMerge - description: Auto-merge Azure SDK PRs with green builds + description: Don't auto-merge PRs with auto-merge label removed - if: - payloadType: Pull_Request then: