Skip to content

Commit

Permalink
Merge pull request #39862 from dotnet/main
Browse files Browse the repository at this point in the history
  • Loading branch information
BillWagner authored Mar 8, 2024
2 parents e47782f + 938ecf1 commit 068b3b5
Show file tree
Hide file tree
Showing 14 changed files with 267 additions and 219 deletions.
37 changes: 37 additions & 0 deletions .github/policies/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- if:
- payloadType: Pull_Request
- labelAdded:
label: ':octocat: auto-merge'
- targetsBranch:
branch: main
then:
- enableAutoMerge:
mergeMethod: Squash
description: Auto-squash-merge PRs to main labeled with auto-merge
- if:
- payloadType: Pull_Request
- labelAdded:
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: ':octocat: auto-merge'
then:
- disableAutoMerge
description: Don't auto-merge PRs with auto-merge label removed
54 changes: 54 additions & 0 deletions .github/policies/label-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: Label doc-bug issues with okr-health (scheduled search)
frequencies:
- hourly:
hour: 3
filters:
- isIssue
- isOpen
- hasLabel:
label: doc-bug
- isNotLabeledWith:
label: okr-health
actions:
- addLabel:
label: okr-health
eventResponderTasks:
- if:
- payloadType: Pull_Request
then:
- inPrLabel:
label: in-pr
description: Add in-pr label to issues
- if:
- payloadType: Pull_Request
then:
- labelSync:
pattern: okr-
- labelSync:
pattern: ':checkered_flag: Release'
description: Synchronize OKR and release labels from PRs to closing issues
- if:
- payloadType: Issues
- or:
- hasLabel:
label: doc-bug
- titleContains:
pattern: freshness
isRegex: False
- titleContains:
pattern: out( |-)of( |-)date
isRegex: True
then:
- addLabel:
label: okr-health
description: Label issues with okr-health (event-based)
77 changes: 77 additions & 0 deletions .github/policies/label-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- if:
- payloadType: Pull_Request
- isAction:
action: Opened
- and:
- not:
activitySenderHasPermission:
permission: Admin
- not:
activitySenderHasPermission:
permission: Write
- not:
isActivitySender:
user: github-actions[bot]
issueAuthor: False
- not:
isActivitySender:
user: github-actions
issueAuthor: False
- not:
isActivitySender:
user: azure-sdk
issueAuthor: False
- not:
isActivitySender:
user: dependabot
issueAuthor: False
then:
- addLabel:
label: community-contribution
description: Label community PRs
- if:
- payloadType: Pull_Request
- isActivitySender:
user: azure-sdk
issueAuthor: False
then:
- approvePullRequest:
comment: "Approved, we'll :shipit: when all status checks pass."
- addLabel:
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
- or:
- titleContains:
pattern: build warning
isRegex: False
- bodyContains:
pattern: build warning
isRegex: False
- titleContains:
pattern: freshness
isRegex: False
then:
- addLabel:
label: okr-health
description: Label PRs with okr-health
174 changes: 0 additions & 174 deletions .github/policies/resourceManagement.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/policies/scheduled-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: Push to live branch (scheduled publish)
frequencies:
- daily:
time: 08:0
filters: []
actions:
- createPullRequest:
head: main
base: live
title: Merge main into live
body: Please don't squash-merge this PR.
7 changes: 4 additions & 3 deletions .github/workflows/profanity-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ on:
pull_request:
types: [opened, edited, reopened]

permissions:
issues: write
pull-requests: write

jobs:
apply-filter:
name: Apply profanity filter
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- name: Profanity filter
Expand Down
Loading

0 comments on commit 068b3b5

Please sign in to comment.