Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ configuration:
- isPullRequest
- isOpen
- hasLabel:
label: 'Type: Dependency Update :arrow_up_small:'
label: 'build-ops'
- noActivitySince:
days: 1
actions:
Expand All @@ -201,7 +201,7 @@ configuration:
- isPullRequest
- isOpen
- hasLabel:
label: 'Type: Dependency Update :arrow_up_small:'
label: 'build-ops'
- noActivitySince:
days: 3
actions:
Expand Down Expand Up @@ -286,6 +286,26 @@ configuration:
- approvePullRequest:
comment: Auto-approving dependency update.
description: '[Infrastructure PRs] Add area-infrastructure label to dependency update Pull Requests'
- if:
- payloadType: Pull_Request
- isAction:
action: Opened
- isActivitySender:
user: dotnet-maestro[bot]
issueAuthor: False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity, what does issueAuthor mean in this case? wouldn't dotnet-maestro be the author of the PR if this is an opened action?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs aren't super clear, but my understanding is that you use that when you want to trigger on an action taken by the author of the issue/PR, rather than on one specific user (see line 389).

- targetsBranch:
branch: main
- or:
- titleContains:
pattern: Update dependencies
isRegex: False
- titleContains:
pattern: Source code updates
isRegex: False
then:
- addLabel:
label: 'build-ops'
description: '[Infrastructure PRs] Add build-ops label to dependency update Pull Requests against main'
- if:
- payloadType: Pull_Request
- isAction:
Expand All @@ -303,6 +323,8 @@ configuration:
label: area-infrastructure
- addLabel:
label: 'Type: Merge Forward :fast_forward:'
- addLabel:
label: 'build-ops'
- approvePullRequest:
comment: Auto-approving branch merge.
description: '[Infrastructure PRs] Add area-infrastructure label to auto-merge Pull Requests'
Expand Down Expand Up @@ -534,16 +556,16 @@ configuration:
- isAction:
action: Opened
- targetsBranch:
branch: release/2.1
branch: release/2.3
then:
- addMilestone:
milestone: 2.1.x
milestone: 2.3.x
- addReply:
reply: >-
Hi @${issueAuthor}. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the [servicing process](https://aka.ms/aspnet/servicing) document.

Otherwise, please add `tell-mode` label.
description: Add release/2.1 targeting PRs to the servicing project
description: Add release/2.3 targeting PRs to the servicing project
- if:
- payloadType: Pull_Request
- labelAdded:
Expand Down Expand Up @@ -690,6 +712,8 @@ configuration:
label: area-infrastructure
- addLabel:
label: 'Type: Dependency Update :arrow_up_small:'
- addLabel:
label: 'build-ops'
- approvePullRequest:
comment: Auto-approving SDK update.
- enableAutoMerge:
Expand All @@ -709,6 +733,8 @@ configuration:
label: area-infrastructure
- addLabel:
label: 'Type: Dependency Update :arrow_up_small:'
- addLabel:
label: 'build-ops'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see several uses like right above this one for the Type: Dependency Update... labels. Do we still need them or is it okay to just use build-ops label going forward? And if so, can we remove the old labels?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like having the different types of labels to differentiate between the different types of automated PRs. Also the split isn't uniform (e.g. build-ops looks at a set of auto-merge & dependency PRs, but they don't look at all auto-merge & dependency PRs - they don't look at servicing)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough, just wanted to check in case they weren't needed any longer.

- approvePullRequest:
comment: Auto-approving dependabot update.
- enableAutoMerge:
Expand Down