From e36fbf668a889f4e4601967c83a67152ab779c65 Mon Sep 17 00:00:00 2001 From: Ahmad Syafiq Aqil Wafi Date: Sat, 24 Feb 2024 02:16:22 +0700 Subject: [PATCH 1/6] docs: fix response body for local provider (#649) Co-authored-by: Zoey --- docs/content/1.getting-started/3.quick-start.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/1.getting-started/3.quick-start.md b/docs/content/1.getting-started/3.quick-start.md index b892d9cd..91c210a6 100644 --- a/docs/content/1.getting-started/3.quick-start.md +++ b/docs/content/1.getting-started/3.quick-start.md @@ -95,7 +95,7 @@ The backend must accept a request with a body like: and return a token that can be used to authenticate future requests in the response body, e.g., like: ```ts { - tokens: { + token: { accessToken: 'eyBlaBlub' } } @@ -142,7 +142,7 @@ The backend must accept a request with a body like: and return a token that can be used to authenticate future requests in the response body, e.g., like: ```ts { - tokens: { + token: { accessToken: 'eyBlaBlub' refreshToken: 'eyBlaubwww' } From 457cb5094d22eb8794faf1e122aa33646f489344 Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 23 Feb 2024 20:37:29 +0100 Subject: [PATCH 2/6] chore: Update the issue templates (#682) --- .../DISCUSSION_TEMPLATE/feature-requests.yml | 33 +++++++++++++++++ .github/ISSUE_TEMPLATE/bug-report.yaml | 17 +++++++-- .github/ISSUE_TEMPLATE/config.yml | 8 ++-- .github/ISSUE_TEMPLATE/feature-request.yaml | 22 ----------- .github/PULL_REQUEST_TEMPLATE.md | 37 +++++++++++++++++++ 5 files changed, 87 insertions(+), 30 deletions(-) create mode 100644 .github/DISCUSSION_TEMPLATE/feature-requests.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature-request.yaml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/DISCUSSION_TEMPLATE/feature-requests.yml b/.github/DISCUSSION_TEMPLATE/feature-requests.yml new file mode 100644 index 00000000..9d31ded7 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/feature-requests.yml @@ -0,0 +1,33 @@ +name: "๐Ÿš€ Feature request" +description: Suggest a feature that will improve NuxtAuth +labels: ["pending", "enchantment"] +body: + - type: markdown + attributes: + value: | + Thank you for taking the time to fill out this feature request! + - type: textarea + id: feature-description + attributes: + label: Describe the feature + description: A clear and concise description of what you think would be a helpful addition to NuxtAuth, including the possible use cases and alternatives you have considered. If you have a working prototype or module that implements it, please include a link. + placeholder: Feature description + validations: + required: true + - type: checkboxes + id: provider + attributes: + label: Which provider would this enchantment improve? + description: We currently offer three providers: authjs, local and refresh. If the enchanment is a general one, please select all three. + options: + - label: AuthJS + - label: Local + - label: Refresh + - label: New Provider + - type: checkboxes + id: additional-info + attributes: + label: Additional information + description: Additional information that helps us decide how to proceed. + options: + - label: Would you be willing to help implement this feature? diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index 0236ebf8..56a70070 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -1,23 +1,32 @@ name: ๐Ÿž Bug report description: Create a bug report for this project -labels: [bug] +labels: [bug, pending] body: - type: markdown attributes: value: | - Please help us finding and resolving problems. + Please carefully read the nuxt contribution docs before creating a bug report + ๐Ÿ‘‰ https://nuxt.com/docs/community/reporting-bugs + + Please use a template below to create a minimal reproduction + ๐Ÿ‘‰ https://stackblitz.com/github/nuxt/starter/tree/v3 + ๐Ÿ‘‰ https://codesandbox.io/s/github/nuxt/starter/tree/v3 - type: textarea id: bug-env attributes: label: Environment description: You can use `npx nuxi info` to fill this section placeholder: Environment + validations: + required: true - type: textarea id: reproduction attributes: label: Reproduction - description: Provide a link to a repo that can reproduce the problem you ran into if you can. + description: Please provide a link to a repo that can reproduce the problem you ran into. A [**minimal reproduction**](https://nuxt.com/docs/community/reporting-bugs#create-a-minimal-reproduction) is required unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. If no reproduction is provided we might close it. placeholder: Reproduction + validations: + required: true - type: textarea id: bug-description attributes: @@ -37,4 +46,4 @@ body: label: Logs description: | Optional if provided reproduction. Please try not to insert an image but copy paste the log text. - render: shell + render: shell-script diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7f137cd5..3daa74ee 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,8 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: ๐Ÿ“š nuxt-auth documentation url: https://sidebase.io/nuxt-auth about: Check the documentation for usage of nuxt-auth - - name: ๐Ÿ’ฌ Discussions - url: https://github.com/sidebase/nuxt-auth/discussions - about: Use discussions if you have another issue, an idea for improvement or for asking questions. + - name: ๐Ÿš€ Feature request + url: https://github.com/sidebase/nuxt-auth/discussions/new?category=feature-requests + about: Suggest a feature to improve this project diff --git a/.github/ISSUE_TEMPLATE/feature-request.yaml b/.github/ISSUE_TEMPLATE/feature-request.yaml deleted file mode 100644 index 6e196c0e..00000000 --- a/.github/ISSUE_TEMPLATE/feature-request.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: ๐Ÿš€ Feature request -description: Suggest a feature to improve this project -labels: [enhancement] -body: - - type: markdown - attributes: - value: | - Thank you for taking the time to fill out this feature request of this young, just growing project. It really means a lot to us! โค๏ธ - - type: textarea - id: feature-description - attributes: - label: Describe the feature - description: A clear and concise description of what you think would be a helpful addition, including the possible use cases and alternatives you have considered. If you have a working prototype or module that implements it, please include a link. - placeholder: Feature description - validations: - required: true - - type: textarea - id: additional-info - attributes: - label: Additional information - description: Additional information that helps us decide how to proceed. - placeholder: Additional information diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..f99be3b8 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,37 @@ + + +### ๐Ÿ”— Linked issue + + + +### โ“ Type of change + + + +- [ ] ๐Ÿ“– Documentation (updates to the documentation, readme or JSdoc annotations) +- [ ] ๐Ÿž Bug fix (a non-breaking change that fixes an issue) +- [ ] ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance) +- [ ] โœจ New feature (a non-breaking change that adds functionality) +- [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries) +- [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change) + +### ๐Ÿ“š Description + + + + + +### ๐Ÿ“ Checklist + + + + + +- [ ] I have linked an issue or discussion. +- [ ] I have added tests (if possible). +- [ ] I have updated the documentation accordingly. From e3c136cc41bac77783a96179eb07de0ac9381c0c Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 23 Feb 2024 20:40:44 +0100 Subject: [PATCH 3/6] chore: fix Discussions template file --- .github/DISCUSSION_TEMPLATE/feature-requests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/DISCUSSION_TEMPLATE/feature-requests.yml b/.github/DISCUSSION_TEMPLATE/feature-requests.yml index 9d31ded7..5899b4a7 100644 --- a/.github/DISCUSSION_TEMPLATE/feature-requests.yml +++ b/.github/DISCUSSION_TEMPLATE/feature-requests.yml @@ -18,7 +18,7 @@ body: id: provider attributes: label: Which provider would this enchantment improve? - description: We currently offer three providers: authjs, local and refresh. If the enchanment is a general one, please select all three. + description: "We currently offer three providers: authjs, local and refresh. If the enchanment is a general one, please select all three." options: - label: AuthJS - label: Local From e4ea932416dbf5af5ef68b06f3abb5ca4e27f956 Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 23 Feb 2024 21:07:58 +0100 Subject: [PATCH 4/6] fix: Fix Discussions template (#683) --- .../DISCUSSION_TEMPLATE/feature-requests.yml | 33 ------------- .github/ISSUE_TEMPLATE/config.yml | 10 ++-- .github/ISSUE_TEMPLATE/enchantment.yml | 49 +++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 10 ---- 4 files changed, 54 insertions(+), 48 deletions(-) delete mode 100644 .github/DISCUSSION_TEMPLATE/feature-requests.yml create mode 100644 .github/ISSUE_TEMPLATE/enchantment.yml diff --git a/.github/DISCUSSION_TEMPLATE/feature-requests.yml b/.github/DISCUSSION_TEMPLATE/feature-requests.yml deleted file mode 100644 index 5899b4a7..00000000 --- a/.github/DISCUSSION_TEMPLATE/feature-requests.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "๐Ÿš€ Feature request" -description: Suggest a feature that will improve NuxtAuth -labels: ["pending", "enchantment"] -body: - - type: markdown - attributes: - value: | - Thank you for taking the time to fill out this feature request! - - type: textarea - id: feature-description - attributes: - label: Describe the feature - description: A clear and concise description of what you think would be a helpful addition to NuxtAuth, including the possible use cases and alternatives you have considered. If you have a working prototype or module that implements it, please include a link. - placeholder: Feature description - validations: - required: true - - type: checkboxes - id: provider - attributes: - label: Which provider would this enchantment improve? - description: "We currently offer three providers: authjs, local and refresh. If the enchanment is a general one, please select all three." - options: - - label: AuthJS - - label: Local - - label: Refresh - - label: New Provider - - type: checkboxes - id: additional-info - attributes: - label: Additional information - description: Additional information that helps us decide how to proceed. - options: - - label: Would you be willing to help implement this feature? diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3daa74ee..779fb139 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,8 @@ blank_issues_enabled: false contact_links: - - name: ๐Ÿ“š nuxt-auth documentation + - name: ๐Ÿ“š Documentation url: https://sidebase.io/nuxt-auth - about: Check the documentation for usage of nuxt-auth - - name: ๐Ÿš€ Feature request - url: https://github.com/sidebase/nuxt-auth/discussions/new?category=feature-requests - about: Suggest a feature to improve this project + about: Check the documentation for usage of nuxt-auth! + - name: โญ Other projects + url: https://sidebase.io + about: Supercharge your Nuxt application with more of our projects! diff --git a/.github/ISSUE_TEMPLATE/enchantment.yml b/.github/ISSUE_TEMPLATE/enchantment.yml new file mode 100644 index 00000000..515c6647 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enchantment.yml @@ -0,0 +1,49 @@ +name: "๐Ÿš€ Enchantment" +description: Suggest an enchantment that will improve NuxtAuth +labels: ["pending", "enchantment"] +body: + - type: markdown + attributes: + value: | + Thank you for taking the time to fill out this feature request! + + Please note: Only post enchanments that you have properly considered. This means: + - You have properly determined what problem your enchanment fixes + - How you would recommend implementing your enchancement + - How this change would impact NuxtAuth + + If you are still unsure about your implementation or would like to discuss it prior, open a discussion first: + ๐Ÿ‘‰ https://github.com/sidebase/nuxt-auth/discussions/new?category=feature-requests + - type: textarea + id: feature-description + attributes: + label: Describe the feature + description: A clear and concise description of what you think would be a helpful addition to NuxtAuth, including the possible use cases and alternatives you have considered. + placeholder: Feature description + validations: + required: true + - type: textarea + id: feature-implementation + attributes: + label: How would you implement this? + description: For this, please outline how this feature would work. This could be in the form of a textual description, or a walkthrough of what would be adjusted inside the code. + placeholder: Feature description + validations: + required: true + - type: checkboxes + id: additional-info + attributes: + label: Additional information + description: Additional information that helps us decide how to proceed. + options: + - label: Would you be willing to help implement this feature? + - type: checkboxes + id: provider-selection + attributes: + label: Provider + description: Please check the provider this feature targets. + options: + - label: AuthJS + - label: Local + - label: Refresh + - label: New Provider diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f99be3b8..ef48f7e7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,5 @@ ### ๐Ÿ”— Linked issue @@ -22,16 +19,9 @@ Please carefully read the contribution docs before creating a pull request ### ๐Ÿ“š Description - - - ### ๐Ÿ“ Checklist - - - - - [ ] I have linked an issue or discussion. - [ ] I have added tests (if possible). - [ ] I have updated the documentation accordingly. From 30cf24cffc79171fcdc3d42d6cb2ca56bcaf8757 Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 23 Feb 2024 23:48:41 +0100 Subject: [PATCH 5/6] chore: Add reproduction workflow (#684) --- .github/reproduire/needs-reproduction.md | 19 +++++++++++++++++++ .github/workflows/reproduire-close.yml | 24 ++++++++++++++++++++++++ .github/workflows/reproduire.yml | 16 ++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 .github/reproduire/needs-reproduction.md create mode 100644 .github/workflows/reproduire-close.yml create mode 100644 .github/workflows/reproduire.yml diff --git a/.github/reproduire/needs-reproduction.md b/.github/reproduire/needs-reproduction.md new file mode 100644 index 00000000..1b794148 --- /dev/null +++ b/.github/reproduire/needs-reproduction.md @@ -0,0 +1,19 @@ +Hello ๐Ÿ‘‹ + +Please provide a [reproduction](https://nuxt.com/docs/community/reporting-bugs/#create-a-minimal-reproduction) for this issue ๐Ÿ™ + +
+How can I create a reproduction? + +Please use one of the following links to reproduce your issue. + +- https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz +- https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox + +Please ensure that the reproduction is as **minimal** as possible. This will allow us to isolate the issue as best as possible. + +Here are some more amazing posts about the importance of reproductions: +- [The Importance of Reproductions](https://antfu.me/posts/why-reproductions-are-required) +- [How to Generate a Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/minimal-reproducible-example) + +
diff --git a/.github/workflows/reproduire-close.yml b/.github/workflows/reproduire-close.yml new file mode 100644 index 00000000..d5990961 --- /dev/null +++ b/.github/workflows/reproduire-close.yml @@ -0,0 +1,24 @@ +name: Close incomplete issues +on: + workflow_dispatch: + schedule: + - cron: '30 1 * * *' # run every day + +permissions: + issues: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-stale: -1 # Issues and PR will never be flagged stale automatically. + stale-issue-label: 'needs reproduction' # Label that flags an issue as stale. + only-labels: 'needs reproduction' # Only process these issues + days-before-issue-close: 14 + ignore-updates: true + remove-stale-when-updated: false + close-issue-message: This issue was closed because it was open for 14 days without a reproduction. + close-issue-label: closed-by-bot + operations-per-run: 300 #default 30 diff --git a/.github/workflows/reproduire.yml b/.github/workflows/reproduire.yml new file mode 100644 index 00000000..db2fe7d2 --- /dev/null +++ b/.github/workflows/reproduire.yml @@ -0,0 +1,16 @@ +name: Reproduire +on: + issues: + types: [labeled] + +permissions: + issues: write + +jobs: + reproduire: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: Hebilicious/reproduire@v1 + with: + label: needs-reproduction From e036b0b7b0ffa40fbf2befff5dab4d345e18392f Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 23 Feb 2024 23:51:34 +0100 Subject: [PATCH 6/6] fix: reproduire version --- .github/workflows/reproduire.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reproduire.yml b/.github/workflows/reproduire.yml index db2fe7d2..77f95c28 100644 --- a/.github/workflows/reproduire.yml +++ b/.github/workflows/reproduire.yml @@ -11,6 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: Hebilicious/reproduire@v1 + - uses: Hebilicious/reproduire@4b686ae9cbb72dad60f001d278b6e3b2ce40a9ac # v0.0.9-mp with: label: needs-reproduction