diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..a5cccc8 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,73 @@ +# Contributing to our repos + +At Primer, we believe that endorsing and maintaining open source software is an important step towards building strong bonds with the wider engineering community. We appreciate and actively invite contribution from outside of our organisation. + +## Our Standards + +We have expectations of our own behaviour and the behaviour of others when interacting with us in our open source repos. + +* Use welcoming and inclusive language at all times +* Be empathetic towards others at all times +* Be respectful of differing viewpoints and experiences +* Gracefully accept constructive criticism +* Focus on what is best for the existing members of the community + +There are some behaviours and forms of language that we won't tolerate when communicating with us about our software. Again, this applies to both our organisation members and those community members external to it. These include: + +* Sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting and/or derogatory comments, and personal or political attacks +* Public or private harassment of individuals or groups +* Publishing others' private information (a.k.a "doxxing"), such as a physical or electronic + address, without explicit permission from the owner +* Any other conduct that is antithetical to reasonable and polite discourse + +## Our Commitments + +We appreciate contributions of all forms, but we are not obliged to accept them such that we will make changes to our software or repos to accommodate them. + +We will always make best efforts to discuss contributions, but are not obliged to provide timelines, contact details, or other information concerning commitments that we may or may not make to the contribution in question. + + +## Reporting issues + +A bug 🐛 is something nobody ever wants to receive. But, they happen 🤷‍♂️. + +Please read the following guidelines before you [report an issue](../issues): + +1. **Use the GitHub issue search** — check if the issue has already been + reported. If it has been, please comment on the existing issue. If it is closed, + please reference the closed issue in your new issue report. + +2. **Check if the issue has been fixed** — the latest `master`/`main` or + development branch may already contain a fix. + +3. **Isolate the problem** — make sure that the code in the + project's repository is responsible for the issue. Create a broken-down list of steps or an + extremely simple and immediately viewable example of the issue. + +4. **Include a live example** — provide a link, screenshot, video + or anything that could help us understand better the domain. + +Other advice for reporting an issue: + +* Please try to be as detailed as possible in your report. +* Please include: what steps will reproduce the issue, which browsers, devices and/or OS +you have recreated the issue with. +* Please state what would you expect the outcome to be. + +## Pull requests + +Good pull requests — patches, improvements, new features — are a fantastic +help. They should remain focused in scope and avoid containing unrelated +commits. + +> [!WARNING] +> If your contribution involves a significant amount of work or substantial +> changes to any part of the project, **please open an issue to discuss it first**. + +## Thank you 🙏 + +👉 from all of the team at Primer ❤️ + +You are helping us making our product better 👌, faster 🚀, stronger 💪 \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7a5c338..7a6997a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,9 +17,9 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 with: node-version-file: '.nvmrc' diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..70da203 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +.gitignore +.github/CONTRIBUTING.md \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..23bcd70 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Primer API Ltd + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/package.json b/package.json index e48c63a..81881f2 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,11 @@ "lint": "concurrently npm:lint:*", "lint:commit": "commitlint --from origin/main --to HEAD --verbose", "lint:es": "eslint . --ignore-path .gitignore --report-unused-disable-directives --max-warnings 0", - "lint:prettier": "prettier . --ignore-path .gitignore --check", + "lint:prettier": "prettier . --check", "lint:ts": "echo 'Ignored for now...'", "format": "concurrently npm:format:*", "format:es": "npm run lint:es --fix", - "format:prettier": "prettier . --ignore-path .gitignore --write" + "format:prettier": "prettier . --write" }, "engines": { "node": "16.x" diff --git a/src/server.ts b/src/server.ts index 772085b..b6efaae 100644 --- a/src/server.ts +++ b/src/server.ts @@ -23,8 +23,8 @@ app.post('/client-session', async () => { const res = await post( `${primerApiUrl}/client-session`, - // ✨ Feel free to update this 👇 - // Check the API reference here: https://apiref.primer.io/reference/create_client_side_token_client_session_post + // 👀 Check the API reference here 👉 https://apiref.primer.io/reference/create_client_side_token_client_session_post + // ✨ Then, try modifying the client session below 👇 { orderId: randomUUID(),