From 16efaf8b79a8924f02a8e7500bc7d81d1253007d Mon Sep 17 00:00:00 2001 From: Devendar Reddy Adulla Date: Wed, 27 Sep 2023 13:43:26 -0700 Subject: [PATCH] Onboard ResourceManagement and replace FabricBot service (#3866) --- .github/fabricbot.json | 46 ------------------------- .github/policies/resourceManagement.yml | 20 +++++++++++ 2 files changed, 20 insertions(+), 46 deletions(-) delete mode 100644 .github/fabricbot.json create mode 100644 .github/policies/resourceManagement.yml diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index 6e5cd205..00000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": "dotnet-maestro[bot]" - } - }, - { - "name": "isAction", - "parameters": { - "action": "opened" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "Auto-approve maestro PRs", - "actions": [ - { - "name": "approvePullRequest", - "parameters": { - "comment": "Approved by FabricService." - } - } - ] - } - } - ], - "userGroups": [] -} \ No newline at end of file diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 00000000..076c7ff4 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,20 @@ +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive + +resource: repository + +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - if: + - payloadType: Pull_Request + - isActivitySender: + user: dotnet-maestro[bot] + issueAuthor: False + - isAction: + action: Opened + then: + - approvePullRequest: + comment: Approved by FabricService. + description: Auto-approve maestro PRs +