-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #530 from MicrosoftDocs/localden/simpleevent
Sync changes
- Loading branch information
Showing
3 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
id: | ||
name: GitOps.PullRequestIssueManagement | ||
description: GitOps.PullRequestIssueManagement primitive | ||
owner: | ||
resource: repository | ||
disabled: false | ||
where: | ||
configuration: | ||
resourceManagementConfiguration: | ||
eventResponderTasks: | ||
- description: Label community PRs | ||
if: | ||
- payloadType: Pull_Request | ||
- isAction: | ||
action: Opened | ||
- and: | ||
- not: | ||
activitySenderHasPermission: | ||
permission: Admin | ||
- not: | ||
activitySenderHasPermission: | ||
permission: Write | ||
- not: | ||
isActivitySender: | ||
user: github-actions[bot] | ||
- not: | ||
isActivitySender: | ||
user: github-actions | ||
- not: | ||
isActivitySender: | ||
user: azure-sdk | ||
- not: | ||
isActivitySender: | ||
user: dependabot | ||
- not: | ||
isActivitySender: | ||
user: microsoft-github-policy-service[bot] | ||
then: | ||
- addLabel: | ||
label: community-contribution | ||
|
||
- description: Label ref docs sync PRs from the microsoft-github-policy-service bot | ||
triggerOnOwnActions: true | ||
if: | ||
- payloadType: Pull_Request | ||
- isAction: | ||
action: Opened | ||
- isActivitySender: | ||
user: microsoft-github-policy-service[bot] | ||
- titleContains: | ||
pattern: Merge smoke-test into main | ||
isRegex: False | ||
then: | ||
- addLabel: | ||
label: ":octocat: auto-merge" | ||
|
||
- description: Label prod sync PRs from the microsoft-github-policy-service bot | ||
triggerOnOwnActions: true | ||
if: | ||
- payloadType: Pull_Request | ||
- isAction: | ||
action: Opened | ||
- isActivitySender: | ||
user: microsoft-github-policy-service[bot] | ||
- titleContains: | ||
pattern: Merge main into live | ||
isRegex: False | ||
then: | ||
- addLabel: | ||
label: ":octocat: auto-merge" | ||
|
||
- description: Label PRs from dependabot/dependabot[bot] | ||
if: | ||
- payloadType: Pull_Request | ||
- or: | ||
- isActivitySender: | ||
user: dependabot | ||
- isActivitySender: | ||
user: dependabot[bot] | ||
then: | ||
- addLabel: | ||
label: ":octocat: auto-merge" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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 | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: GitOps.PullRequestIssueManagement - Scheduled PRs | ||
description: Creates pull requests on a schedule | ||
resource: repository | ||
|
||
where: | ||
configuration: | ||
resourceManagementConfiguration: | ||
scheduledSearches: | ||
- description: Push to main (scheduled sync) | ||
frequencies: | ||
- daily: | ||
time: 1:00 | ||
- daily: | ||
time: 9:00 | ||
- daily: | ||
time: 17:00 | ||
filters: [] | ||
actions: | ||
- createPullRequest: | ||
head: main | ||
base: live | ||
title: Merge main into live | ||
body: Please don't squash-merge this PR. |