diff --git a/.github/workflows/auto_approve_dependabot_prs.yml b/.github/workflows/auto_approve_dependabot_prs.yml new file mode 100644 index 00000000..be0ff28f --- /dev/null +++ b/.github/workflows/auto_approve_dependabot_prs.yml @@ -0,0 +1,16 @@ +name: Dependabot auto-approve +on: pull_request + +permissions: + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'Decatur-Robotics/Gearbox' + steps: + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/increment_version.yml b/.github/workflows/increment_version.yml new file mode 100644 index 00000000..a021286e --- /dev/null +++ b/.github/workflows/increment_version.yml @@ -0,0 +1,37 @@ +name: Increment Version + +on: + workflow_call: + workflow_dispatch: + pull_request_target: + branches: [main] + types: [opened] + +jobs: + increment: + runs-on: ubuntu-latest + if: + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} # We need to checkout the head branch, not the temporary merge branch + persist-credentials: false + + - name: Setup Node.js environment + uses: actions/setup-node@v4.1.0 + + - name: Set name + run: git config user.name "Gearbox Bot" + + - name: Set email + run: git config user.email "gearbox@decaturrobotics.org" + + - name: Increment patch number + run: npm version patch + + - name: Push changes + uses: ad-m/github-push-action@v0.8.0 + with: + github_token: ${{ secrets.GIT_PUSH_TOKEN }} + branch: ${{ github.head_ref }} diff --git a/README.md b/README.md index cd5f5724..0ef6b4a0 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Gearbox: Intuitive, Powerful Scouting at [4026.org](https://4026.org) + The final incarnation of Scout Janssen. Rewritten fully in Typescript, written to be easy to maintain and modular. Features full feature parity with SJ2, whilst remaining simpler, faster and cooler. ## Features + - Automatic match generation - Match assignment (both automatic and manual) - Pre-generated forms @@ -17,9 +19,16 @@ Features full feature parity with SJ2, whilst remaining simpler, faster and cool - Public data sharing (optional) - Sub-5-minute setup +## Status + +![CI Checks](https://github.com/Decatur-Robotics/Gearbox/actions/workflows/ci.yml/badge.svg)
+![Formatting](https://github.com/Decatur-Robotics/Gearbox/actions/workflows/format.yml/badge.svg)
+![Autoversioning](https://github.com/Decatur-Robotics/Gearbox/actions/workflows/increment_version.yml/badge.svg) + ## Setup ### Prerequisites + - Node.js - NPM - A MongoDB instance @@ -36,6 +45,7 @@ Features full feature parity with SJ2, whilst remaining simpler, faster and cool - A Resend audience ID ### Installation + 1. Clone the repository 1. Run `npm install` 1. Add the secrets to a `.env` file @@ -43,21 +53,26 @@ Features full feature parity with SJ2, whilst remaining simpler, faster and cool ### Running #### Development + 1. Run `npm run dev` #### Production + 1. Run `npm run build` 1. Run `npm run start` #### Tests + 1. Run `npm run test` ## Contributing + You've made it past set up and are ready to contibure to the future of scouting - here's how. We recommend you start with issues labelled `good first issue` to get a feel for the codebase. Fork the repo (unless you're part of Decatur Robotics, in which case make a new branch) and then make a pull request to the main branch. We'll review it and, if it looks good, merge it. ## Contibutors + @@ -65,4 +80,5 @@ We recommend you start with issues labelled `good first issue` to get a feel for Made with [contrib.rocks](https://contrib.rocks). ## Licensed under a CC BY-NC-SA 4.0 license + Read the license [here](LICENSE.md). diff --git a/package-lock.json b/package-lock.json index 68ca1be1..d34cdff9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,13 @@ { "name": "sj3", - "version": "0.1.1", + "version": "1.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sj3", - "version": "0.1.1", + "version": "1.1.1", + "license": "CC BY-NC-SA 4.0", "dependencies": { "dependencies": "^0.0.1", "@next-auth/mongodb-adapter": "^1.1.3", @@ -21,7 +22,7 @@ "bson": "^5.0.0", "cloc": "^2.11.0", "dotenv": "^16.4.7", - "eslint": "9.16.0", + "eslint": "9.17.0", "eslint-config-next": "15.0.3", "formidable": "^3.5.2", "jose": "^5.9.6", @@ -33,7 +34,7 @@ "next-pwa": "^5.6.0", "next-seo": "^6.6.0", "nodemailer": "^6.9.16", - "omit-call-signature": "^1.0.6", + "omit-call-signature": "^1.0.15", "react": "18.3.1", "react-beautiful-dnd": "^13.1.1", "react-bootstrap": "^2.10.5", @@ -63,13 +64,13 @@ "@jest/globals": "^29.7.0", "@types/formidable": "^3.4.5", "@types/jest": "^29.5.14", - "@types/node": "^20.11.16", + "@types/node": "^22.10.2", "@types/react": "^18.3.8", "autoprefixer": "^10.4.20", "cross-env": "^7.0.3", "daisyui": "^4.12.22", "jest": "^29.7.0", - "postcss": "^8.4.47", + "postcss": "^8.4.49", "prettier": "3.3.3", "tailwindcss": "^3.3.2", "ts-jest": "^29.2.5" @@ -1987,7 +1988,6 @@ "version": "9.17.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", - "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -4052,11 +4052,11 @@ "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==" }, "node_modules/@types/node": { - "version": "20.11.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", - "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", + "version": "22.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.20.0" } }, "node_modules/@types/p5": { @@ -6691,17 +6691,16 @@ } }, "node_modules/eslint": { - "version": "9.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", - "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", - "license": "MIT", + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", + "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.0", "@eslint/core": "^0.9.0", "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.16.0", + "@eslint/js": "9.17.0", "@eslint/plugin-kit": "^0.2.3", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -6710,7 +6709,7 @@ "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.5", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.2.0", @@ -7267,14 +7266,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "9.16.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", - "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", @@ -11437,9 +11428,9 @@ "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -11566,9 +11557,9 @@ } }, "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "dev": true, "funding": [ { @@ -11586,7 +11577,7 @@ ], "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { @@ -14049,9 +14040,9 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", diff --git a/package.json b/package.json index c56f489b..380dc6a5 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "name": "sj3", - "version": "0.1.1", + "version": "1.1.1", "private": true, "repository": "https://github.com/Decatur-Robotics/Gearbox", + "license": "CC BY-NC-SA 4.0", "scripts": { "dev": "cross-env NODE_ENV=development npx tsx index.ts", "build": "next build", @@ -30,7 +31,7 @@ "cloc": "^2.11.0", "dependencies": "^0.0.1", "dotenv": "^16.4.7", - "eslint": "9.16.0", + "eslint": "9.17.0", "eslint-config-next": "15.0.3", "formidable": "^3.5.2", "jose": "^5.9.6", @@ -42,7 +43,7 @@ "next-pwa": "^5.6.0", "next-seo": "^6.6.0", "nodemailer": "^6.9.16", - "omit-call-signature": "^1.0.6", + "omit-call-signature": "^1.0.15", "react": "18.3.1", "react-beautiful-dnd": "^13.1.1", "react-bootstrap": "^2.10.5", @@ -72,13 +73,13 @@ "@jest/globals": "^29.7.0", "@types/formidable": "^3.4.5", "@types/jest": "^29.5.14", - "@types/node": "^20.11.16", + "@types/node": "^22.10.2", "@types/react": "^18.3.8", "autoprefixer": "^10.4.20", "cross-env": "^7.0.3", "daisyui": "^4.12.22", "jest": "^29.7.0", - "postcss": "^8.4.47", + "postcss": "^8.4.49", "prettier": "3.3.3", "tailwindcss": "^3.3.2", "ts-jest": "^29.2.5"