diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md deleted file mode 100644 index 9ed3ea0f..00000000 --- a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Bug report, feature request or other -about: Create a report to help us improve -title: Bug report, feature request or other request -labels: '' -assignees: '' ---- - -**Describe the issue** -A clear and concise description of what the issue is about. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your issue. - -**Environment (please complete the following information, if applicable):** - - OS: [e.g. Windows/Mac/Linux] - - Browser [e.g. edge, chrome, firefox, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 00000000..f2e9d448 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,22 @@ +name: Bug Report +description: Create a report to help us improve +labels: ["potential-bug", "feature: api-description"] +body: +- id: hint + type: markdown + attributes: + value: This project is in maintenance mode and will receive no further feature updates. See https://github.com/Azure/azure-functions-openapi-extension/issues/683 for more information. **Please use this template only for reporting bugs.** Issues opened for new feature requests will be closed. +- id: description + type: textarea + attributes: + label: Description + placeholder: Please provide a succinct description of the issue. + validations: + required: true +- id: repro + type: textarea + attributes: + label: Steps to reproduce + placeholder: Please provide the steps required to reproduce the problem. + validations: + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..5f48259e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Questions + url: https://aka.ms/azure-functions/questions-and-answers + about: Please ask and answer questions using Microsoft Q&A. \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md index 06d80aa3..f458cd80 100644 --- a/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md @@ -2,17 +2,22 @@ name: Pull request about: Create a pull request title: Pull request -labels: '' +labels: 'feature: api-description' assignees: '' --- -Related to #{issue_number}. + -**Changes proposed in this pull request**: +### Issue describing the changes in this PR -* ... -* ... -* ... +resolves #issue_for_this_pr -**Screenshots** -If applicable, add screenshots to help explain your pull request. +### Pull request checklist + +* [ ] My changes **do not** add features +* [ ] I have added all required tests (Unit tests, E2E tests) + + +### Additional information + +Additional PR information diff --git a/.github/policies/issue.add-no-recent-activity.yml b/.github/policies/issue.add-no-recent-activity.yml new file mode 100644 index 00000000..9fe963f6 --- /dev/null +++ b/.github/policies/issue.add-no-recent-activity.yml @@ -0,0 +1,29 @@ +name: Add no recent activity +description: Takes action to handle issues with no recent activity +resource: repository +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: Add no recent activity label to issues + frequencies: + - hourly: + hour: 3 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - noActivitySince: + days: 4 + - isNotLabeledWith: + label: no-recent-activity + actions: + - addLabel: + label: no-recent-activity + - addReply: + reply: |- + This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. + + If you are not the original author (${issueAuthor}) and believe this issue is not stale, please comment with `/bot not-stale` and I will not close it. +onFailure: +onSuccess: \ No newline at end of file diff --git a/.github/policies/issue.close-duplicate-issues.yml b/.github/policies/issue.close-duplicate-issues.yml new file mode 100644 index 00000000..3535357e --- /dev/null +++ b/.github/policies/issue.close-duplicate-issues.yml @@ -0,0 +1,23 @@ +name: Close duplicate issues +description: Close duplicate issues +resource: repository +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: Close duplicate issues + frequencies: + - hourly: + hour: 3 + filters: + - isIssue + - isOpen + - hasLabel: + label: duplicate + - noActivitySince: + days: 3 + actions: + - addReply: + reply: This issue has been marked as duplicate and has not had any activity for **3 days**. It will be closed for housekeeping purposes. + - closeIssue +onFailure: +onSuccess: \ No newline at end of file diff --git a/.github/policies/issue.close-stale-issues.yml b/.github/policies/issue.close-stale-issues.yml new file mode 100644 index 00000000..7b446ef4 --- /dev/null +++ b/.github/policies/issue.close-stale-issues.yml @@ -0,0 +1,25 @@ +name: Close stale issues +description: Action to handle stale issues +resource: repository +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: Close stale issues + frequencies: + - hourly: + hour: 3 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - hasLabel: + label: no-recent-activity + - noActivitySince: + days: 3 + - isNotLabeledWith: + label: 'bot: do not close' + actions: + - closeIssue +onFailure: +onSuccess: \ No newline at end of file diff --git a/.github/policies/issue.flag-for-triage.yml b/.github/policies/issue.flag-for-triage.yml new file mode 100644 index 00000000..656d2951 --- /dev/null +++ b/.github/policies/issue.flag-for-triage.yml @@ -0,0 +1,52 @@ +name: Flag for triage +description: Add triage labels and default assignments to issues +resource: repository +configuration: + resourceManagementConfiguration: + eventResponderTasks: + + - description: Add needs triage label to new issues + if: + - payloadType: Issues + - and: + - isAction: + action: Opened + - not: + isAssignedToSomeone + then: + - addLabel: + label: 'Needs: Triage (Functions)' + + - description: Add needs attention label to reopened issues + if: + - payloadType: Issues + - and: + - isAction: + action: Reopened + - not: + hasLabel: 'Needs: Attention :wave:' + then: + - addLabel: + label: 'Needs: Attention :wave:' + + - description: Assign issues when marked for triage or when attention needed again + if: + - payloadType: Issues + - isAction: + action: Labeled + - not: + isAssignedToSomeone + - or: + - labelAdded: + label: 'Needs: Triage (Functions)' + - labelAdded: + label: 'Needs: Attention :wave:' + then: + - assignIcmUsers: + teamId: 114785 + primary: true + secondary: false + triggerOnOwnActions: true + +onFailure: +onSuccess: diff --git a/.github/policies/issue.prevent-auto-close.yml b/.github/policies/issue.prevent-auto-close.yml new file mode 100644 index 00000000..b19b7a1c --- /dev/null +++ b/.github/policies/issue.prevent-auto-close.yml @@ -0,0 +1,33 @@ +name: Prevent auto-close +description: Prevents issue from being closed by the automation +resource: repository +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Prevents issue from being closed by the automation + if: + - payloadType: Issue_Comment + - or : + - isAction: + action: Created + - isAction: + action: Edited + - commentContains: + pattern: /bot not-stale + isRegex: False + - and: + - hasLabel: + label: 'Needs: Author Feedback' + - hasLabel: + label: no-recent-activity + - not: + hasLabel: 'bot: do not close' + then: + - addLabel: + label: 'bot: do not close' + - addLabel: + label: 'Needs: Attention :wave:' + - addReply: + reply: Thank you ${contextualAuthor}. This issue will not be automatically closed and a member of the team will review it soon. +onFailure: +onSuccess: \ No newline at end of file diff --git a/.github/policies/issue.remove-needs-author-feedback.yml b/.github/policies/issue.remove-needs-author-feedback.yml new file mode 100644 index 00000000..f639a773 --- /dev/null +++ b/.github/policies/issue.remove-needs-author-feedback.yml @@ -0,0 +1,25 @@ +name: Remove needs author feedback label. +description: Remove needs author feedback label and adds needs attention +resource: repository +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Remove needs author feedback label. Add needs attention + if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'Needs: Author Feedback' + then: + - if: + - isOpen + then: + - addLabel: + label: 'Needs: Attention :wave:' + - removeLabel: + label: 'Needs: Author Feedback' +onFailure: +onSuccess: diff --git a/.github/policies/issue.remove-needs-triage.yml b/.github/policies/issue.remove-needs-triage.yml new file mode 100644 index 00000000..73b98082 --- /dev/null +++ b/.github/policies/issue.remove-needs-triage.yml @@ -0,0 +1,45 @@ +name: Remove triage labels on close +description: Removes "needs:*" labels from closed issues +resource: repository +configuration: + resourceManagementConfiguration: + eventResponderTasks: + + - description: Remove needs triage label from closed issues + if: + - payloadType: Issues + - isAction: + action: Closed + - hasLabel: + label: 'Needs: Triage (Functions)' + then: + - removeLabel: + label: 'Needs: Triage (Functions)' + triggerOnOwnActions: true + + - description: Remove needs attention label from closed issues + if: + - payloadType: Issues + - isAction: + action: Closed + - hasLabel: + label: 'Needs: Attention :wave:' + then: + - removeLabel: + label: 'Needs: Attention :wave:' + triggerOnOwnActions: true + + - description: Remove needs author feedback label from closed issues + if: + - payloadType: Issues + - isAction: + action: Closed + - hasLabel: + label: 'Needs: Author Feedback' + then: + - removeLabel: + label: 'Needs: Author Feedback' + triggerOnOwnActions: true + +onFailure: +onSuccess: \ No newline at end of file diff --git a/.github/policies/issue.remove-no-recent-activity-with-comment.yml b/.github/policies/issue.remove-no-recent-activity-with-comment.yml new file mode 100644 index 00000000..68186b07 --- /dev/null +++ b/.github/policies/issue.remove-no-recent-activity-with-comment.yml @@ -0,0 +1,18 @@ +name: Remove no recent activity label +description: Remove no recent activity label when issue is commented on +resource: repository +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Remove no recent activity label when issue is commented on + if: + - payloadType: Issue_Comment + - isAction: + action: Created + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity +onFailure: +onSuccess: \ No newline at end of file diff --git a/.github/policies/pullrequest.all.yml b/.github/policies/pullrequest.all.yml new file mode 100644 index 00000000..de905083 --- /dev/null +++ b/.github/policies/pullrequest.all.yml @@ -0,0 +1,141 @@ +id: +name: GitOps.PullRequestIssueManagement +description: Pull request policies +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 3 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - hasLabel: + label: no-recent-activity + - noActivitySince: + days: 7 + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 3 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - noActivitySince: + days: 7 + - isNotLabeledWith: + label: no-recent-activity + actions: + - addLabel: + label: no-recent-activity + - addReply: + reply: This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**. + - description: + frequencies: + - hourly: + hour: 3 + filters: + - isOpen + - noActivitySince: + days: 30 + - isNotLabeledWith: + label: stale + - hasLabel: + label: 'pr: needs author feedback' + actions: + - addReply: + reply: "Hi @${issueAuthor}.\nIt seems this PR hasn't had any activity in the past 30 days. To avoid accumulating old PRs, we're marking it as `stale`. As a result, it will be closed if no further activity occurs **within 4 days of this comment**. " + - addLabel: + label: stale + - description: + frequencies: + - hourly: + hour: 4 + filters: + - isOpen + - isPullRequest + - hasLabel: + label: stale + - noActivitySince: + days: 4 + actions: + - closeIssue + eventResponderTasks: + - if: + - payloadType: Pull_Request_Review + - isAction: + action: Submitted + - isReviewState: + reviewState: Changes_requested + then: + - addLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Pull_Request + - isActivitySender: + issueAuthor: True + - not: + isAction: + action: Closed + - hasLabel: + label: 'Needs: Author Feedback' + then: + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Pull_Request_Review + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'Needs: Author Feedback' + then: + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Pull_Request + - not: + isAction: + action: Closed + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request_Review + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request + - isOpen + - hasLabel: + label: stale + - isActivitySender: + issueAuthor: True + then: + - removeLabel: + label: stale + - removeLabel: + label: 'pr: needs author feedback' + description: +onFailure: +onSuccess: \ No newline at end of file