Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
14 changes: 14 additions & 0 deletions .github/policies/close-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ configuration:
then:
- removeLabel:
label: needs-more-info
triggerOnOwnActions: true

- description: Close issues labeled 'code-of-conduct'
if:
Expand All @@ -42,3 +43,16 @@ configuration:
label: code-of-conduct
then:
- closeIssue

- description: Close learn template issues with empty descriptions. (spam)
if:
- payloadType: Issues
- bodyContains:
pattern: '### Description[\n\r]+\[Enter feedback here\][\n\r]+###'
isRegex: true
then:
- addLabel: 'needs-more-info'
- removeLabel: ':watch: Not Triaged'
- addReply:
reply: This issue has been automatically closed due to an empty issue description from the original author. Feel free to reopen it if you have more information that can help us investigate the issue further.
- closeIssue
109 changes: 106 additions & 3 deletions .github/policies/label-issues.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
id: label.issues
name: GitOps.IssueManagement
description: Management logic around issues
owner:
resource: repository
disabled: false
Expand All @@ -24,6 +24,109 @@ configuration:
label: okr-quality

eventResponderTasks:
- description: >-
Add "not triaged" label when:
* Issue is opened
* Issue is reopened
* 'needs-more-info' label removed
if:
- payloadType: Issues
- or:

- or:
- isAction:
action: Opened
- isAction:
action: Reopened

- labelRemoved:
label: 'needs-more-info'
then:
- addLabel: ':watch: Not Triaged'

- description: >-
Remove "not triaged" label when:
* Issue author closes the issue
* reQUEST label is added
if:
- payloadType: Issues
- hasLabel:
label: ':watch: Not Triaged'
- or:
- and:
- isAction:
action: Closed
- isActivitySender:
issueAuthor: true

- labelAdded:
label: ':world_map: reQUEST'
then:
- removeLabel: ':watch: Not Triaged'

- description: >-
When the label "mapQUEST" is added to an issue
* Remove label "mapQUEST"
if:
- or:
- payloadType: Issues
- payloadType: Pull_Request

- labelAdded:
label: ':world_map: mapQUEST'
then:
- removeLabel: ':world_map: mapQUEST'

- description: Label dependabot issues
if:
- payloadType: Issues
- isAction:
action: Opened
- or:
- isActivitySender:
user: dependabot
- isActivitySender:
user: dependabot[bot]
then:
- addLabel:
label: dependencies

- description: Remove "won't fix" label when issue is reopened
if:
- payloadType: Issues
- isAction:
action: Reopened
- hasLabel:
label: "won't fix"

then:
- removeLabel:
label: "won't fix"

- description: Remove "in-progress" label when issue closed
if:
- payloadType: Issues
- isAction:
action: Closed
- hasLabel:
label: 'in-progress'

then:
- removeLabel:
label: 'in-progress'

- description: Add "resolved-by-customer" label when issue closed by author.
if:
- payloadType: Issues
- isAction:
action: Closed
- isActivitySender:
issueAuthor: true

then:
- addLabel:
label: resolved-by-customer

- description: Add in-pr label to issues
if:
- payloadType: Pull_Request
Expand Down
106 changes: 3 additions & 103 deletions .repoman.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
revision: 6
revision: 7
schema-version: 5
owner-ms-alias: adegeo

Expand All @@ -14,81 +14,7 @@ config:

issues:

unlabeled: "labeled"

labeled:

# Temporary label to mark issues as updated for Quest. The label is instantly removed
- check:
- type: query
value: "length(Issue.Labels[?Name == ':world_map: mapQUEST']) != `0`"
pass:
- labels-remove: [":world_map: mapQUEST"]

# Handle issues with /svc /subsvc labels from label bot
- check:
- type: query
value: "length(Issue.Labels[?contains(Name, '/svc') || contains(Name, '/subsvc')]) != `0`"

# If the issue has a /svc or /subsvc label, it must be categorized otherwise it's considered untriaged
pass:
- check:
- type: query
value: "length(Issue.Labels[?Name == ':pushpin: seQUESTered' || Name == ':world_map: reQUEST' || Name == 'training-module' || Name == 'doc-enhancement' || Name == 'product-question' || Name == 'in-progress' || Name == 'test-issue' || Name == 'kudos' || Name == 'loc' || Name == 'doc-bug' || Name == 'product-feedback' || Name == 'code-of-conduct' || Name == 'support-request' || Name == 'duplicate' || Name == 'resolved-by-customer' || Name == 'docs-experience' || Name == 'doc-provided' || Name == 'doc-idea' || Name == 'needs-more-info']) != `0`"
pass:
- labels-remove: [":watch: Not Triaged"]
fail:
- labels-add: [":watch: Not Triaged"]

# Not an doc issue specifically
fail:

# If the issue is open, then we'll allow some further processing on it. If it's closed, ignore it and let the user do what they want.
- check:
- type: query
value: "Issue.State.StringValue == 'open'"

pass:
- check:
- type: query
value: "length(Issue.Labels[?Name == ':pushpin: seQUESTered' || Name == ':world_map: reQUEST' || Name == 'training-module' || Name == 'video-content'] || Name == 'test-issue') != `0`"
pass:
- labels-remove: [":watch: Not Triaged"]
fail:
- labels-add: [":watch: Not Triaged"]

# Checks for binary/source incompatible checkboxes and adds a label
- check:
- type: query
value: "contains(InstanceData.IssuePrBody, '- [x] **Binary incompatible**') == `true` || contains(InstanceData.IssuePrBody, '- [X] **Binary incompatible**') == `true`"
pass:
- labels-add: ["binary incompatible"]

- check:
- type: query
value: "contains(InstanceData.IssuePrBody, '- [x] **Source incompatible**') == `true` || contains(InstanceData.IssuePrBody, '- [X] **Source incompatible**') == `true`"
pass:
- labels-add: ["source incompatible"]

opened:
# New issue opened, add Not Triaged
- labels-add: [":watch: Not Triaged"]

# Dependabot opened issue, label it
- check:
- type: query
value: "Issue.User.Login == 'dependabot'"
pass:
- labels-add: ["dependencies"]

# Try to detect an empty issue
- check:
- type: comment-body
value: "### Description[\\n\\r]+\\[Enter feedback here\\][\\n\\r]+###"
pass:
- labels-add: ["needs-more-info"]
- labels-remove: [":watch: Not Triaged"]
- close

# Add links to related issues if it's a doc issue
- check:
Expand All @@ -98,23 +24,10 @@ issues:
pass:
- link-related-issues

reopened:

# Remove won't fix label
- labels-remove: ["won't fix"]

closed:

# Issue closed, remove in-progress and not triaged labels
- labels-remove: ["in-progress", ":watch: Not Triaged"]

# Check if the issue was closed by the user who opened it
- check:
- type: query
value: "Issue.User.Id == EventPayload.sender.id"
- type: metadata-exists
pass:
- labels-add: ["resolved-by-customer"]
- labels-remove: [":watch: Not Triaged"]
- svc_subsvc_labels: true

projects_v2_item:

Expand Down Expand Up @@ -410,16 +323,3 @@ pull_request:
- path: "(?i).*docs\/visual-basic\/misc.*"
run:
- labels-add: ["dotnet-visualbasic/svc", "errors-warnings/subsvc"]

issue_comment:

created:

# someone creates a comment with #please-review in it, add changes-addressed label
- check:
- type: query
value: "Issue.State.StringValue == 'open' && Issue.User.Id == Comment.User.Id"
- type: comment-body
value: ^#please-review$
pass:
- labels-add: ["changes-addressed"]
Loading