diff --git a/.github/ISSUE_TEMPLATE/1.bug_report.yaml b/.github/ISSUE_TEMPLATE/1.bug_report.yaml index ed10dbad86d..9d73aee3760 100644 --- a/.github/ISSUE_TEMPLATE/1.bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/1.bug_report.yaml @@ -1,6 +1,5 @@ name: Bug report description: Create a report to help us improve Amplify JS -labels: pending-triage body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/2.feature_request.yaml b/.github/ISSUE_TEMPLATE/2.feature_request.yaml index 13eb5e1522d..c50290cbd22 100644 --- a/.github/ISSUE_TEMPLATE/2.feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/2.feature_request.yaml @@ -1,6 +1,5 @@ name: Feature request description: Suggest an idea for Amplify JS -labels: pending-triage body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/3.usage-question.md b/.github/ISSUE_TEMPLATE/3.usage-question.md deleted file mode 100644 index 82d079fe7be..00000000000 --- a/.github/ISSUE_TEMPLATE/3.usage-question.md +++ /dev/null @@ -1,23 +0,0 @@ - - ---- - -name: Usage Question -about: Ask a question about AWS Amplify usage -title: '' -labels: question,pending-triage -assignees: '' - ---- - -** Which Category is your question related to? ** -E.g. Auth, Predictions, Storage, etc. -** What AWS Services are you utilizing? ** -E.g. Cognito, AWS AppSync, etc. -** Provide additional details e.g. code snippets ** -E.g. Sample code, versions of Amplify you are using diff --git a/.github/ISSUE_TEMPLATE/4.rfc.md b/.github/ISSUE_TEMPLATE/4.rfc.md deleted file mode 100644 index 464d9aee63f..00000000000 --- a/.github/ISSUE_TEMPLATE/4.rfc.md +++ /dev/null @@ -1,46 +0,0 @@ ---- - -name: Request For Comments (RFC) -about: Gather community feedback regarding a proposed change to the library -title: 'RFC: PROPOSAL HEADLINE' -labels: feature-request -assignees: '' ----_This issue is a Request For Comments (RFC). It is intended to elicit community feedback regarding a proposed change to the library. Please feel free to post comments or questions here._ - -## Summary - -In one or two sentences, why should this change exist? - -## Motivation - -Why is this RFC needed? What will happen if accepted? And what would happen if it _isn't_ accepted? - -## Basic Example - -If the RFC involves a new or changed API, include a basic code example. (Omit if not applicable) - -## Detailed Design - -Provide enough detail on _how_ this should be implemented such that someone other than yourself could build it. -Include examples of how the implementation is used - -## Drawbacks - -- Is this a breaking change? Days/Weeks/Months to implement? Will it require extensive documentation & examples? - -## Adoption Strategy - -- What supporting efforts will be needed (e.g. documentation, tests, tutorials, public outreach, etc.)? - -## Related Issues - -Add GitHub issue numbers/URLs that informed or would be impacted by this proposal. - -- #1234 -- https://github.com/aws-amplify/amplify-js/issues/1234 - -## References - -List articles, resources, prior art, and inspiration for this proposal. - -- http://stackoverflow.com/ diff --git a/.github/workflows/issue-closed.yml b/.github/workflows/issue-closed.yml new file mode 100644 index 00000000000..fed460e0181 --- /dev/null +++ b/.github/workflows/issue-closed.yml @@ -0,0 +1,22 @@ +name: Issue Closed + +on: + issues: + types: [closed] + +permissions: + issues: write + +jobs: + cleanup-labels: + runs-on: ubuntu-latest + if: ${{ (contains(github.event.issue.labels.*.name, 'pending-community-response') || contains(github.event.issue.labels.*.name, 'pending-maintainer-response') || contains(github.event.issue.labels.*.name, 'pending-triage')) }} + steps: + - name: Remove unnecessary labels after closing + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + REPOSITORY_NAME: ${{ github.event.repository.full_name }} + run: | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-community-response" --remove-label "pending-maintainer-response" --remove-label "pending-triage" diff --git a/.github/workflows/issue-comment.yml b/.github/workflows/issue-comment.yml new file mode 100644 index 00000000000..cfde2f7d331 --- /dev/null +++ b/.github/workflows/issue-comment.yml @@ -0,0 +1,31 @@ +name: Issue Comment + +on: + issue_comment: + types: [created] + +jobs: + adjust-labels: + runs-on: ubuntu-latest + permissions: + issues: write + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + REPOSITORY_NAME: ${{ github.event.repository.full_name }} + steps: + - name: Remove pending-community-response when new comment received + if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) && !github.event.issue.pull_request }} + shell: bash + run: | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-community-response" + - name: Add pending-maintainer-response when new community comment received + if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} + shell: bash + run: | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-maintainer-response" + - name: Remove pending-maintainer-response when new owner/member comment received + if: ${{ contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} + shell: bash + run: | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-maintainer-response" diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml new file mode 100644 index 00000000000..022fc996a3a --- /dev/null +++ b/.github/workflows/issue-labeled.yml @@ -0,0 +1,21 @@ +name: Issue Labeled + +on: + issues: + types: [labeled] + +jobs: + remove-pending-triage-label: + runs-on: ubuntu-latest + if: ${{ contains(fromJSON('["question", "bug", "feature-request"]'), github.event.label.name) }} + permissions: + issues: write + steps: + - name: Remove the pending-triage label + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + REPOSITORY_NAME: ${{ github.event.repository.full_name }} + run: | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-triage" diff --git a/.github/workflows/issue-opened.yml b/.github/workflows/issue-opened.yml new file mode 100644 index 00000000000..6ac0a9ce124 --- /dev/null +++ b/.github/workflows/issue-opened.yml @@ -0,0 +1,25 @@ +name: Issue Opened + +on: + issues: + types: [opened] + +jobs: + add-issue-opened-labels: + runs-on: ubuntu-latest + permissions: + issues: write + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + REPOSITORY_NAME: ${{ github.event.repository.full_name }} + steps: + - name: Add the pending-triage label + shell: bash + run: | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-triage" + - name: Add the pending-maintainer-response label + if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.issue.author_association) }} + shell: bash + run: | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-maintainer-response" diff --git a/.github/workflows/issue-pending-response.yml b/.github/workflows/issue-pending-response.yml deleted file mode 100644 index 8dd8ac9584d..00000000000 --- a/.github/workflows/issue-pending-response.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: issue-pending-response -on: - issue_comment: - types: [created] -permissions: - issues: write -jobs: - issue_commented: - if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'pending-response') }} - runs-on: ubuntu-latest - steps: - - uses: siegerts/pending-author-response@409a63bf27370ba9a0e98e8d5fbda7a12398d456 # v1 https://github.com/siegerts/pending-author-response/commit/409a63bf27370ba9a0e98e8d5fbda7a12398d456 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - pending-response-label: pending-response