-
Notifications
You must be signed in to change notification settings - Fork 341
Use policies from testfx to align #15085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,43 @@ | ||
id: | ||
name: GitOps.BreakingChangeManagement | ||
description: GitOps.BreakingChangeManagement primitive | ||
owner: | ||
resource: repository | ||
disabled: false | ||
where: | ||
configuration: | ||
resourceManagementConfiguration: | ||
eventResponderTasks: | ||
- if: | ||
- payloadType: Issues | ||
- labelAdded: | ||
label: breaking-change | ||
then: | ||
- addReply: | ||
reply: >- | ||
Refer to the [.NET SDK breaking change guidelines](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/breaking-change-guidelines.md#required-process-for-all-net-sdk-breaking-changes) | ||
description: Add breaking change doc instructions to issue | ||
- if: | ||
- payloadType: Pull_Request | ||
- labelAdded: | ||
label: breaking-change | ||
then: | ||
- addLabel: | ||
label: needs-breaking-change-doc-created | ||
nohwnd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- addReply: | ||
reply: >- | ||
Added `needs-breaking-change-doc-created` label because this PR has the `breaking-change` label. | ||
|
||
|
||
When you commit this breaking change: | ||
|
||
|
||
1. [ ] Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the [breaking change documentation template](https://aka.ms/dotnet/docs/new-breaking-change-issue), then remove this `needs-breaking-change-doc-created` label. | ||
|
||
2. [ ] Ask a committer to mail the `.NET SDK Breaking Change Notification` email list. | ||
|
||
|
||
You can refer to the [.NET SDK breaking change guidelines](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/breaking-change-guidelines.md) | ||
description: Add breaking change instructions to PR. | ||
onFailure: | ||
onSuccess: |
This file contains hidden or 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,36 @@ | ||
id: | ||
nohwnd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name: LabelManagement.IssueClosed | ||
description: Handlers when an issue gets closed | ||
owner: | ||
resource: repository | ||
disabled: false | ||
where: | ||
configuration: | ||
resourceManagementConfiguration: | ||
eventResponderTasks: | ||
- description: Remove labels when an issue is closed | ||
if: | ||
- payloadType: Issues | ||
- isAction: | ||
action: Closed | ||
then: | ||
- removeLabel: | ||
label: 'Needs: Triage :mag:' | ||
- removeLabel: | ||
label: 'Needs: Attention :wave:' | ||
- removeLabel: | ||
label: 'Needs: Author Feedback' | ||
- removeLabel: | ||
label: Help-Wanted | ||
- description: Remove labels when a pull request is closed | ||
if: | ||
- payloadType: Pull_Request | ||
- isAction: | ||
action: Closed | ||
then: | ||
- removeLabel: | ||
label: 'Needs: Attention :wave:' | ||
- removeLabel: | ||
label: 'Needs: Author Feedback' | ||
onFailure: | ||
onSuccess: |
This file contains hidden or 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,27 @@ | ||
id: | ||
name: LabelManagement.IssueOpened | ||
description: Handlers when an issue is first opened | ||
owner: | ||
resource: repository | ||
disabled: false | ||
where: | ||
configuration: | ||
resourceManagementConfiguration: | ||
eventResponderTasks: | ||
- description: Add needs triage to new issues | ||
if: | ||
- payloadType: Issues | ||
- isAction: | ||
action: Opened | ||
- and: | ||
- not: | ||
activitySenderHasPermission: | ||
permission: Admin | ||
- not: | ||
activitySenderHasPermission: | ||
permission: Write | ||
then: | ||
- addLabel: | ||
label: 'Needs: Triage :mag:' | ||
onFailure: | ||
onSuccess: |
This file contains hidden or 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,144 @@ | ||
id: | ||
name: LabelManagement.IssueUpdated | ||
description: Handlers when an issue is updated but not closed | ||
owner: | ||
resource: repository | ||
disabled: false | ||
where: | ||
configuration: | ||
resourceManagementConfiguration: | ||
eventResponderTasks: | ||
- description: >- | ||
Remove "State: No Recent Activity" when a pull request or issue is updated | ||
if: | ||
- or: | ||
- payloadType: Pull_Request | ||
- payloadType: Pull_Request_Review | ||
- payloadType: Pull_Request_Review_Comment | ||
- payloadType: Issue_Comment | ||
- payloadType: Issues | ||
- not: | ||
isAction: | ||
action: Closed | ||
- hasLabel: | ||
label: "State: No Recent Activity" | ||
then: | ||
- removeLabel: | ||
label: "State: No Recent Activity" | ||
# The policy service should not trigger itself here, or else the label would be removed immediately after being added | ||
triggerOnOwnActions: False | ||
- description: Clean email replies on every comment | ||
if: | ||
- payloadType: Issue_Comment | ||
then: | ||
- cleanEmailReply | ||
- description: Remove "Help-Wanted" label when an issue goes into PR | ||
if: | ||
- payloadType: Issues | ||
- labelAdded: | ||
label: In-PR | ||
- hasLabel: | ||
label: Help-Wanted | ||
then: | ||
- removeLabel: | ||
label: Help-Wanted | ||
- description: >- | ||
If an author responds to an issue which needs author feedback | ||
* Remove the "Needs: Author Feedback" Label | ||
* Add the "Needs: Attention :wave:" Label | ||
if: | ||
- or: | ||
- payloadType: Pull_Request_Review | ||
- payloadType: Pull_Request_Review_Comment | ||
- payloadType: Issue_Comment | ||
- isActivitySender: | ||
issueAuthor: True | ||
- hasLabel: | ||
label: "Needs: Author Feedback" | ||
- not: | ||
isAction: | ||
action: Synchronize | ||
then: | ||
- removeLabel: | ||
label: "Needs: Author Feedback" | ||
- addLabel: | ||
label: "Needs: Attention :wave:" | ||
- description: >- | ||
If team members respond to an issue which needs attention | ||
* Remove the "Needs: Attention :wave:" Label | ||
if: | ||
- or: | ||
- payloadType: Pull_Request_Review | ||
- payloadType: Pull_Request_Review_Comment | ||
- payloadType: Issue_Comment | ||
- isActivitySender: | ||
issueAuthor: True | ||
- hasLabel: | ||
label: "Needs: Attention :wave:" | ||
- not: | ||
isAction: | ||
action: Synchronize | ||
- or: | ||
- activitySenderHasAssociation: | ||
association: Member | ||
- activitySenderHasAssociation: | ||
association: Owner | ||
- activitySenderHasAssociation: | ||
association: Collaborator | ||
then: | ||
- removeLabel: | ||
label: "Needs: Attention :wave:" | ||
- description: >- | ||
If team members respond to an issue which needs triage | ||
* Remove the "Needs: Triage :mag:" Label | ||
if: | ||
- or: | ||
- payloadType: Pull_Request_Review | ||
- payloadType: Pull_Request_Review_Comment | ||
- payloadType: Issue_Comment | ||
- isActivitySender: | ||
issueAuthor: True | ||
- hasLabel: | ||
label: "Needs: Triage :mag:" | ||
- not: | ||
isAction: | ||
action: Synchronize | ||
- or: | ||
- activitySenderHasAssociation: | ||
association: Member | ||
- activitySenderHasAssociation: | ||
association: Owner | ||
- activitySenderHasAssociation: | ||
association: Collaborator | ||
then: | ||
- removeLabel: | ||
label: "Needs: Triage :mag:" | ||
- description: >- | ||
When changes are requested on a pull request | ||
* Disable automerge | ||
* Assign to the author | ||
* Label with "Needs: Author Feedback" | ||
if: | ||
- payloadType: Pull_Request_Review | ||
- isAction: | ||
action: Submitted | ||
- isReviewState: | ||
reviewState: Changes_requested | ||
then: | ||
- disableAutoMerge | ||
- assignTo: | ||
author: True | ||
- addLabel: | ||
label: "Needs: Author Feedback" | ||
- description: Sync labels from issues on all pull request events | ||
if: | ||
- payloadType: Pull_Request | ||
then: | ||
- labelSync: | ||
pattern: "Area:" | ||
- labelSync: | ||
pattern: "Type:" | ||
- inPrLabel: | ||
label: In-PR | ||
onFailure: | ||
onSuccess: |
This file contains hidden or 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,102 @@ | ||
id: ScheduledSearch.AutoClose | ||
name: GitOps.PullRequestIssueManagement | ||
description: Housekeeping of issues that should be closed | ||
owner: | ||
resource: repository | ||
disabled: false | ||
where: | ||
configuration: | ||
resourceManagementConfiguration: | ||
scheduledSearches: | ||
- description: >- | ||
Search for PR where - | ||
* Pull Request is Open | ||
* Pull request has the label "State: No Recent Activity" | ||
* Pull request has the label "Needs: Author Feedback" | ||
* Has not had activity in the last 7 days | ||
|
||
Then - | ||
* Close the PR | ||
frequencies: | ||
- hourly: | ||
hour: 6 | ||
filters: | ||
- isPullRequest | ||
- isOpen | ||
- hasLabel: | ||
label: "State: No Recent Activity" | ||
- hasLabel: | ||
label: "Needs: Author Feedback" | ||
- noActivitySince: | ||
days: 7 | ||
actions: | ||
- closeIssue | ||
- description: >- | ||
Search for Issues where - | ||
* Issue is Open | ||
* Issue has the label "State: No Recent Activity" | ||
* Issue has the label "Needs: Author Feedback" | ||
* Has not had activity in the last 7 days | ||
|
||
Then - | ||
* Close the Issue | ||
frequencies: | ||
- hourly: | ||
hour: 6 | ||
filters: | ||
- isIssue | ||
- isOpen | ||
- hasLabel: | ||
label: "State: No Recent Activity" | ||
- hasLabel: | ||
label: "Needs: Author Feedback" | ||
- noActivitySince: | ||
days: 7 | ||
actions: | ||
- closeIssue | ||
- description: >- | ||
Search for Issues where - | ||
* Issue is Open | ||
* Issue has the label "State: Won't Fix" | ||
* Has not had activity in the last 1 day | ||
|
||
Then - | ||
* Close the Issue | ||
frequencies: | ||
- hourly: | ||
hour: 6 | ||
filters: | ||
- isIssue | ||
- isOpen | ||
- hasLabel: | ||
label: "State: Won't Fix" | ||
- noActivitySince: | ||
days: 1 | ||
actions: | ||
- addReply: | ||
reply: This issue has been marked as won't fix and has not had any activity for **1 day**. It will be closed for housekeeping purposes. | ||
- closeIssue | ||
- description: >- | ||
Search for Issues where - | ||
* Issue is Open | ||
* Issue has the label "Resolution: Duplicate" | ||
* Has not had activity in the last 1 day | ||
|
||
Then - | ||
* Close the Issue | ||
frequencies: | ||
- hourly: | ||
hour: 6 | ||
filters: | ||
- isIssue | ||
- isOpen | ||
- hasLabel: | ||
label: "Resolution: Duplicate" | ||
- noActivitySince: | ||
days: 1 | ||
actions: | ||
- addReply: | ||
reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes. | ||
- closeIssue | ||
onFailure: | ||
onSuccess: |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.