-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3eebb3d
commit 8e0af95
Showing
26 changed files
with
902 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @auth0/project-dx-sdks-engineer-codeowner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: 🐞 Report a bug | ||
description: Have you found a bug or issue? Create a bug report for this library | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
**Please do not report security vulnerabilities here**. The [Responsible Disclosure Program](https://auth0.com/responsible-disclosure-policy) details the procedure for disclosing security issues. | ||
- type: checkboxes | ||
id: checklist | ||
attributes: | ||
label: Checklist | ||
options: | ||
- label: The issue can be reproduced in the [nextjs-auth0 sample app](https://github.com/auth0-samples/auth0-nextjs-samples/tree/main/Sample-01) (or N/A). | ||
required: true | ||
- label: I have looked into the [Readme](https://github.com/auth0/nextjs-auth0#readme), [Examples](https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md), and [FAQ](https://github.com/auth0/nextjs-auth0/blob/main/FAQ.md) and have not found a suitable solution or answer. | ||
required: true | ||
- label: I have looked into the [API documentation](https://auth0.github.io/nextjs-auth0/) and have not found a suitable solution or answer. | ||
required: true | ||
- label: I have searched the [issues](https://github.com/auth0/nextjs-auth0/issues) and have not found a suitable solution or answer. | ||
required: true | ||
- label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer. | ||
required: true | ||
- label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). | ||
required: true | ||
|
||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: Provide a clear and concise description of the issue, including what you expected to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: reproduction | ||
attributes: | ||
label: Reproduction | ||
description: Detail the steps taken to reproduce this error and, ideally, share a repo of a minimal reproducible example. State whether this issue can be reproduced consistently or if it is intermittent. | ||
placeholder: | | ||
1. Step 1... | ||
2. Step 2... | ||
3. ... | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Additional context | ||
description: Other libraries that might be involved, or any other relevant information you think would be useful. | ||
validations: | ||
required: false | ||
|
||
- type: input | ||
id: environment-version | ||
attributes: | ||
label: nextjs-auth0 version | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
id: environment-nextjs-version | ||
attributes: | ||
label: Next.js version | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
id: environment-nodejs-version | ||
attributes: | ||
label: Node.js version | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: 🧩 Feature request | ||
description: Suggest an idea or a feature for this library | ||
labels: ["feature request"] | ||
|
||
body: | ||
- type: checkboxes | ||
id: checklist | ||
attributes: | ||
label: Checklist | ||
options: | ||
- label: I have looked into the [Readme](https://github.com/auth0/nextjs-auth0#readme), [Examples](https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md), and [FAQ](https://github.com/auth0/nextjs-auth0/blob/main/FAQ.md) and have not found a suitable solution or answer. | ||
required: true | ||
- label: I have looked into the [API documentation](https://auth0.github.io/nextjs-auth0/) and have not found a suitable solution or answer. | ||
required: true | ||
- label: I have searched the [issues](https://github.com/auth0/nextjs-auth0/issues) and have not found a suitable solution or answer. | ||
required: true | ||
- label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer. | ||
required: true | ||
- label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). | ||
required: true | ||
|
||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Describe the problem you'd like to have solved | ||
description: A clear and concise description of what the problem is. | ||
placeholder: I'm always frustrated when... | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: ideal-solution | ||
attributes: | ||
label: Describe the ideal solution | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: alternatives-and-workarounds | ||
attributes: | ||
label: Alternatives and current workarounds | ||
description: A clear and concise description of any alternatives you've considered or any workarounds that are currently in place. | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Additional context | ||
description: Add any other context or screenshots about the feature request here. | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: 🤔 Help & Questions | ||
url: https://community.auth0.com | ||
about: Ask general support or usage questions in the Auth0 Community forums | ||
- name: 📑 FAQ | ||
url: https://github.com/auth0/nextjs-auth0/blob/main/FAQ.md | ||
about: Check some commonly asked questions | ||
- name: 🚀 Examples | ||
url: https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md | ||
about: Check the examples to get up to speed with the SDK | ||
- name: 📖 API Documentation | ||
url: https://auth0.github.io/nextjs-auth0/ | ||
about: Check the public API documentation for in-depth overview of all the available features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!-- | ||
❗ For general support or usage questions, use the Auth0 Community forums or raise a support ticket. | ||
By submitting a pull request to this repository, you agree to the terms within the Auth0 Code of Conduct: https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md. | ||
--> | ||
|
||
- [ ] All new/changed/fixed functionality is covered by tests (or N/A) | ||
- [ ] I have added documentation for all new/changed functionality (or N/A) | ||
|
||
<!-- | ||
❗ All the above items are required. Pull requests with an incomplete or missing checklist will be closed. | ||
--> | ||
|
||
### 📋 Changes | ||
|
||
<!-- | ||
Describe both what is changing and why this is important. Include: | ||
- Types and methods added, deleted, deprecated, or changed | ||
- A summary of usage if this is a new feature or a change to a public API | ||
--> | ||
|
||
### 📎 References | ||
|
||
<!-- | ||
Add relevant links supporting this change, such as: | ||
- GitHub issue/PR number addressed or fixed | ||
- Auth0 Community post | ||
- StackOverflow answer | ||
- Related pull requests/issues from other repositories | ||
If there are no references, simply delete this section. | ||
--> | ||
|
||
### 🎯 Testing | ||
|
||
<!-- | ||
Describe how this can be tested by reviewers. Be specific about anything not tested and why. Include any manual steps for testing end-to-end, or for testing functionality not covered by unit tests. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build package | ||
description: Build the SDK package | ||
|
||
inputs: | ||
node: | ||
description: The Node version to use | ||
required: false | ||
default: 18 | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node }} | ||
cache: npm | ||
|
||
- shell: bash | ||
run: npm ci | ||
env: | ||
NODE_ENV: development | ||
|
||
- shell: bash | ||
run: npm run install:example | ||
env: | ||
NODE_ENV: development | ||
|
||
- shell: bash | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Return a boolean indicating if the version contains prerelease identifiers | ||
|
||
# | ||
# Returns a simple true/false boolean indicating whether the version indicates it's a prerelease or not. | ||
# | ||
# TODO: Remove once the common repo is public. | ||
# | ||
|
||
inputs: | ||
version: | ||
required: true | ||
|
||
outputs: | ||
prerelease: | ||
value: ${{ steps.get_prerelease.outputs.PRERELEASE }} | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- id: get_prerelease | ||
shell: bash | ||
run: | | ||
if [[ "${VERSION}" == *"beta"* || "${VERSION}" == *"alpha"* ]]; then | ||
echo "PRERELEASE=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "PRERELEASE=false" >> $GITHUB_OUTPUT | ||
fi | ||
env: | ||
VERSION: ${{ inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Return the release notes extracted from the body of the PR associated with the release. | ||
|
||
# | ||
# Returns the release notes from the content of a pull request linked to a release branch. It expects the branch name to be in the format release/vX.Y.Z, release/X.Y.Z, release/vX.Y.Z-beta.N. etc. | ||
# | ||
# TODO: Remove once the common repo is public. | ||
# | ||
inputs: | ||
version: | ||
required: true | ||
repo_name: | ||
required: false | ||
repo_owner: | ||
required: true | ||
token: | ||
required: true | ||
|
||
outputs: | ||
release-notes: | ||
value: ${{ steps.get_release_notes.outputs.RELEASE_NOTES }} | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- uses: actions/github-script@v7 | ||
id: get_release_notes | ||
with: | ||
result-encoding: string | ||
script: | | ||
const { data: pulls } = await github.rest.pulls.list({ | ||
owner: process.env.REPO_OWNER, | ||
repo: process.env.REPO_NAME, | ||
state: 'all', | ||
head: `${process.env.REPO_OWNER}:release/${process.env.VERSION}`, | ||
}); | ||
core.setOutput('RELEASE_NOTES', pulls[0].body); | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.token }} | ||
REPO_OWNER: ${{ inputs.repo_owner }} | ||
REPO_NAME: ${{ inputs.repo_name }} | ||
VERSION: ${{ inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Return the version extracted from the branch name | ||
|
||
# | ||
# Returns the version from the .version file. | ||
# | ||
# TODO: Remove once the common repo is public. | ||
# | ||
|
||
outputs: | ||
version: | ||
value: ${{ steps.get_version.outputs.VERSION }} | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- id: get_version | ||
shell: bash | ||
run: | | ||
VERSION=$(head -1 .version) | ||
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Publish release to npm | ||
|
||
inputs: | ||
node-version: | ||
required: true | ||
npm-token: | ||
required: true | ||
version: | ||
required: true | ||
require-build: | ||
default: true | ||
release-directory: | ||
default: './' | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
cache: 'npm' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: npm ci --include=dev | ||
|
||
- name: Build package | ||
if: inputs.require-build == 'true' | ||
shell: bash | ||
run: npm run build | ||
|
||
- name: Publish release to NPM | ||
shell: bash | ||
working-directory: ${{ inputs.release-directory }} | ||
run: | | ||
if [[ "${VERSION}" == *"beta"* ]]; then | ||
TAG="beta" | ||
elif [[ "${VERSION}" == *"alpha"* ]]; then | ||
TAG="alpha" | ||
else | ||
TAG="latest" | ||
fi | ||
npm publish --provenance --tag $TAG | ||
env: | ||
NODE_AUTH_TOKEN: ${{ inputs.npm-token }} | ||
VERSION: ${{ inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Prepare test | ||
description: Prepare an SDK test | ||
|
||
inputs: | ||
node: | ||
description: The Node version to use | ||
required: false | ||
default: 18 | ||
cache: | ||
description: The cache key identifier to use | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node }} | ||
cache: npm | ||
|
||
- uses: actions/cache/restore@v3 | ||
with: | ||
path: . | ||
key: ${{ inputs.cache }} |
Oops, something went wrong.