diff --git a/.github/ISSUE_TEMPLATE/customer-feedback.yml b/.github/ISSUE_TEMPLATE/customer-feedback.yml index 9a7ef031900f..ac66b8d7d973 100644 --- a/.github/ISSUE_TEMPLATE/customer-feedback.yml +++ b/.github/ISSUE_TEMPLATE/customer-feedback.yml @@ -44,4 +44,11 @@ body: required: true attributes: label: Article author - + - type: textarea + id: metadata + validations: + required: false + attributes: + label: Metadata + description: >- + Documentation metadata will be applied here diff --git a/.github/policies/close-issues.yml b/.github/policies/close-issues.yml new file mode 100644 index 000000000000..da7d8071bac2 --- /dev/null +++ b/.github/policies/close-issues.yml @@ -0,0 +1,44 @@ +name: Close issues +description: Close issues based on label +resource: repository +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - frequencies: + - daily: + time: 12:00 + filters: + - isIssue + - isOpen + - hasLabel: + label: needs-more-info + - noActivitySince: + days: 14 + actions: + - addReply: + reply: This issue has been automatically closed due to no response from the original author. Feel free to reopen it if you have more information that can help us investigate the issue further. + - closeIssue + + eventResponderTasks: + - description: Remove needs-more-info label when author comments on issue + if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: needs-more-info + - isOpen + then: + - removeLabel: + label: needs-more-info + + - description: Close issues labeled 'code-of-conduct' + if: + - payloadType: Issues + - hasLabel: + label: code-of-conduct + then: + - closeIssue diff --git a/.github/policies/issueManagement-emptyIssue.yml b/.github/policies/issueManagement-emptyIssue.yml new file mode 100644 index 000000000000..b2ab7705f633 --- /dev/null +++ b/.github/policies/issueManagement-emptyIssue.yml @@ -0,0 +1,25 @@ +id: issueManagement.emptyIssue +name: GitOps.EmptyIssue +description: Checks for an issue created via learn that has an empty description from the template. +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Close an issue created with the learn template that has an empty body. + if: + - payloadType: Issues + - bodyContains: + pattern: '### Description[\n\r]+\[Enter feedback here\][\n\r]+###' + isRegex: true + then: + - addLabel: 'needs-more-info' + - removeLabel: ':watch: Not Triaged' + - closeIssue + + triggerOnOwnActions: false + +onFailure: +onSuccess: diff --git a/.github/policies/issueManagement-notTriaged.yml b/.github/policies/issueManagement-notTriaged.yml new file mode 100644 index 000000000000..67af06d5b1d5 --- /dev/null +++ b/.github/policies/issueManagement-notTriaged.yml @@ -0,0 +1,54 @@ +id: issueManagement.notTriaged +name: GitOps.NotTriagedHandler +description: Ensures the Not Triaged label is added or removed when appropriate +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + 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' + triggerOnOwnActions: false + + - 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: 'reQUEST' + then: + - removeLabel: ':watch: Not Triaged' + triggerOnOwnActions: false + +onFailure: +onSuccess: diff --git a/.github/policies/labelAdded-areaLabels.yml b/.github/policies/labelAdded-areaLabels.yml new file mode 100644 index 000000000000..21463fdf4789 --- /dev/null +++ b/.github/policies/labelAdded-areaLabels.yml @@ -0,0 +1,32 @@ +id: labelAdded.areaLabels +name: GitOps.AreaLabelHandler +description: Handles when specific area labels are added +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: >- + When the label "grpc/subsvc" is added to an issue + * Add label "gRPC" + if: + - payloadType: Issues + - labelAdded: + label: 'grpc/subsv' + then: + - addLabel: 'gRPC' + + - description: >- + When the label "aspnetcore-signalr/subsvc" is added to an issue + * Add label "SignalR" + if: + - payloadType: Issues + - labelAdded: + label: 'aspnetcore-signalr/subsvc' + then: + - addLabel: 'SignalR' + +onFailure: +onSuccess: diff --git a/.github/policies/labelAdded-mapQuest.yml b/.github/policies/labelAdded-mapQuest.yml new file mode 100644 index 000000000000..c760b7c7fe33 --- /dev/null +++ b/.github/policies/labelAdded-mapQuest.yml @@ -0,0 +1,25 @@ +id: labelAdded.mapQuest +name: GitOps.MapQuestHandler +description: Handles when "mapQUEST" label is added +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: >- + When the label "mapQUEST" is added to an issue + * Remove label "mapQUEST" + if: + - or: + - payloadType: Issues + - payloadType: Pull_Request + + - labelAdded: + label: 'mapQUEST' + then: + - removeLabel: 'mapQUEST' + triggerOnOwnActions: true +onFailure: +onSuccess: diff --git a/.github/policies/pullRequestManagement-labelFiles.yml b/.github/policies/pullRequestManagement-labelFiles.yml new file mode 100644 index 000000000000..a6d8e6607dc9 --- /dev/null +++ b/.github/policies/pullRequestManagement-labelFiles.yml @@ -0,0 +1,56 @@ +id: pullRequestManagement.labelFiles +name: GitOps.PullRequestLabelFiles +description: Checks the files touched by a pull request and assigns a reviewer +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Modify PRs that touch certain files + triggerOnOwnActions: false + if: + - payloadType: Pull_Request + - or: + - isAction: + action: Opened + - isAction: + action: Synchronize + - not: + targetsBranch: + branch: live + then: + - if: + - filesMatchPattern: + matchAny: true + pattern: '(?i).*/blazor/hybrid/.*' + then: + - requestReview: + reviewer: guardrex + - addLabel: + label: 'blazor-hybrid/subsvc' + - if: + - or: + - filesMatchPattern: + matchAny: true + pattern: '(?i).*/blazor/.*' + - filesMatchPattern: + matchAny: true + pattern: '(?i).*/client-side/dotnet-interop/index.md' + - filesMatchPattern: + matchAny: true + pattern: '(?i).*/client-side/dotnet-interop/wasm-browser-app.md' + - filesMatchPattern: + matchAny: true + pattern: '(?i).*/mvc/views/tag-helpers/built-in/component-tag-helper.md' + - filesMatchPattern: + matchAny: true + pattern: '(?i).*/mvc/views/tag-helpers/built-in/persist-component-state.md' + then: + - requestReview: + reviewer: guardrex + - addLabel: + label: 'blazor/subsvc' +onFailure: +onSuccess: diff --git a/.github/workflows/issue-processing.yml b/.github/workflows/issue-processing.yml deleted file mode 100644 index bae690717316..000000000000 --- a/.github/workflows/issue-processing.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Issue processing -on: - issues: - types: - - labeled -jobs: - process-grpc-issue: - if: github.event.label.name == 'grpc/subsvc' - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - uses: actions/github-script@v6 - with: - script: | - await github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ["gRPC"] - }) - - process-signalr-issue: - if: github.event.label.name == 'aspnetcore-signalr/subsvc' - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - uses: actions/github-script@v6 - with: - script: | - await github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ["SignalR"] - }) diff --git a/.repoman.yml b/.repoman.yml index 9236e3ba4c15..71cd1e437aef 100644 --- a/.repoman.yml +++ b/.repoman.yml @@ -1,4 +1,4 @@ -revision: 5 +revision: 6 schema-version: 5 owner-ms-alias: adegeo @@ -10,29 +10,11 @@ config: ParserRegex: "^\\* (.*): (.*)$" ContentUrlRegex: - - "### Page URL\n\n(.*)" + - "### Page URL\n\n(.*)" issues: opened: - # New issue opened, add Not Triaged - - labels-add: [":watch: Not Triaged"] - - # 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 - - # default for doc comment - - check: - - type: metadata-exists - pass: - - labels-add: ["Source - Docs.ms"] - - svc_subsvc_labels: true # Add links to related issues if it's a doc issue - check: @@ -42,14 +24,12 @@ issues: pass: - link-related-issues - labeled: - - # Temporary label to mark issues as updated for Quest. The label is instantly removed + # If it's an issue from docs feedback, add svc/subsvc and source labels. - check: - - type: query - value: "length(Issue.Labels[?Name == 'mapQuest']) != `0`" + - type: metadata-exists pass: - - labels-remove: ["mapQuest"] + - labels-add: ["Source - Docs.ms"] + - svc_subsvc_labels: true projects_v2_item: