Skip to content

Commit

Permalink
only auto-merge when author is dotnet-policy-service
Browse files Browse the repository at this point in the history
  • Loading branch information
gewarren committed May 28, 2024
1 parent d181afd commit 1076fbc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/policies/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,29 @@ configuration:
then:
- enableAutoMerge:
mergeMethod: Squash
- description: Auto-merge PRs to live with title "Merge main into live"
- description: Auto-merge PRs to live labeled with auto-merge
triggerOnOwnActions: true
if:
- payloadType: Pull_Request
- isAction:
action: Opened
- titleContains:
pattern: Merge main into live
isRegex: False
- labelAdded:
label: ':octocat: auto-merge'
- targetsBranch:
branch: live
then:
- enableAutoMerge:
mergeMethod: Merge
- description: Auto-merge PRs to live labeled with auto-merge
- description: Auto-merge PRs to live with title "Merge main into live"
triggerOnOwnActions: true
if:
- payloadType: Pull_Request
- labelAdded:
label: ':octocat: auto-merge'
- isAction:
action: Opened
- isActivitySender:
user: dotnet-policy-service
issueAuthor: False
- titleContains:
pattern: Merge main into live
isRegex: False
- targetsBranch:
branch: live
then:
Expand All @@ -51,3 +54,4 @@ configuration:
label: ':octocat: auto-merge'
then:
- disableAutoMerge

15 changes: 15 additions & 0 deletions .github/policies/label-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ configuration:
then:
- addLabel:
label: community-contribution
- description: Label main to live PRs
triggerOnOwnActions: true
if:
- payloadType: Pull_Request
- isAction:
action: Opened
- isActivitySender:
user: dotnet-policy-service
issueAuthor: False
- titleContains:
pattern: Merge main into live
isRegex: False
then:
- addLabel:
label: ':octocat: auto-merge'
- description: Label PRs from the Azure SDK bot
if:
- payloadType: Pull_Request
Expand Down

0 comments on commit 1076fbc

Please sign in to comment.