From e6741eac9e560a0b8faef5f8003fee889e308fef Mon Sep 17 00:00:00 2001 From: Nitrrine Date: Fri, 5 Jul 2024 13:47:01 +0500 Subject: [PATCH 1/7] Automatically check new commits with Prettier --- .github/workflows/prettier-check.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/prettier-check.yml diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml new file mode 100644 index 0000000..867c4ee --- /dev/null +++ b/.github/workflows/prettier-check.yml @@ -0,0 +1,26 @@ +name: "Prettier Check" + +on: + push: + branches: + - main + pull_request: + +jobs: + check-prettier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + - name: Install dependencies + run: pnpm install + - name: Check code with Prettier + run: pnpm exec prettier --check . From 52a738b8851faec12cc36acde54f70d71901e6a9 Mon Sep 17 00:00:00 2001 From: Nitrrine Date: Fri, 5 Jul 2024 13:48:43 +0500 Subject: [PATCH 2/7] Format all files with Prettier --- .github/ISSUE_TEMPLATE/01-add-an-alternative.md | 7 +++---- .github/PULL_REQUEST_TEMPLATE/01-add-an-alternative.md | 7 +++---- .github/PULL_REQUEST_TEMPLATE/02-site-changes.md | 5 ++--- .github/PULL_REQUEST_TEMPLATE/03-chore-stuff.md | 1 - .vscode/extensions.json | 4 ++-- README.md | 2 +- pages/index.vue | 2 +- 7 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/01-add-an-alternative.md b/.github/ISSUE_TEMPLATE/01-add-an-alternative.md index 5217a50..19d79da 100644 --- a/.github/ISSUE_TEMPLATE/01-add-an-alternative.md +++ b/.github/ISSUE_TEMPLATE/01-add-an-alternative.md @@ -3,10 +3,9 @@ name: Add an alternative to the list about: Suggest the inclusion of a new mod that can replace an Essential function. title: "Add [mod] to the alternatives page." labels: enhancement -assignees: -- KTrain5169 -- blryface - +assignees: + - KTrain5169 + - blryface --- ## What part(s) of Essential does this mod replace? diff --git a/.github/PULL_REQUEST_TEMPLATE/01-add-an-alternative.md b/.github/PULL_REQUEST_TEMPLATE/01-add-an-alternative.md index 4bc1d05..3fc406d 100644 --- a/.github/PULL_REQUEST_TEMPLATE/01-add-an-alternative.md +++ b/.github/PULL_REQUEST_TEMPLATE/01-add-an-alternative.md @@ -3,10 +3,9 @@ name: Adding new alternative about: Select this if you are adding a new mod to the alternatives page. title: "add: [mod name] to alternatives page" labels: enhancement -assignees: -- KTrain5169 -- blryface - +assignees: + - KTrain5169 + - blryface --- ## What part(s) of Essential does this mod replace? diff --git a/.github/PULL_REQUEST_TEMPLATE/02-site-changes.md b/.github/PULL_REQUEST_TEMPLATE/02-site-changes.md index 5a57fe1..8912639 100644 --- a/.github/PULL_REQUEST_TEMPLATE/02-site-changes.md +++ b/.github/PULL_REQUEST_TEMPLATE/02-site-changes.md @@ -4,9 +4,8 @@ about: Select this if you changed the website in a different way. title: "change/fix (choose one): [short description of the change]" labels: enhancement assignees: -- blryface -- WorldWidePixel - + - blryface + - WorldWidePixel --- ## Are there major changes (ex: signficantly revamping the website visuals) that we NEED to know about? diff --git a/.github/PULL_REQUEST_TEMPLATE/03-chore-stuff.md b/.github/PULL_REQUEST_TEMPLATE/03-chore-stuff.md index 2ec97af..a62a2af 100644 --- a/.github/PULL_REQUEST_TEMPLATE/03-chore-stuff.md +++ b/.github/PULL_REQUEST_TEMPLATE/03-chore-stuff.md @@ -4,7 +4,6 @@ about: Select this if you are modifying something that won't affect what other p title: "chore: [short description of changes go here]" labels: documentation assignees: KTrain5169 - --- ## What have you changed? diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 79e80ed..c83e263 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["esbenp.prettier-vscode"] -} \ No newline at end of file + "recommendations": ["esbenp.prettier-vscode"] +} diff --git a/README.md b/README.md index 0d0485a..aaacb6d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # NotEssential website -A website linking to mods that can substitute Essential's features. \ No newline at end of file +A website linking to mods that can substitute Essential's features. diff --git a/pages/index.vue b/pages/index.vue index 2f1e31d..67141d2 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -34,4 +34,4 @@ useSeoMeta({ "Essential has many issues. This website tells why, and provides alternatives.", ogImage: "/img/icon512.png", }) - \ No newline at end of file + From 5ef7ce5ecdc24f876dae7c0f8d0ffa04a3d03ff5 Mon Sep 17 00:00:00 2001 From: Nitrrine Date: Fri, 5 Jul 2024 13:53:58 +0500 Subject: [PATCH 3/7] Make action file more readable --- .github/workflows/prettier-check.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml index 867c4ee..e6c86fe 100644 --- a/.github/workflows/prettier-check.yml +++ b/.github/workflows/prettier-check.yml @@ -4,23 +4,29 @@ on: push: branches: - main - pull_request: + pull_request_target: jobs: check-prettier: + name: Prettier Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Download repo + uses: actions/checkout@v4 + - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 9 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: "pnpm" + - name: Install dependencies run: pnpm install + - name: Check code with Prettier run: pnpm exec prettier --check . From 948a04c07f351862ce5a8b40369d957c7d08a420 Mon Sep 17 00:00:00 2001 From: Nitrrine Date: Fri, 5 Jul 2024 13:55:28 +0500 Subject: [PATCH 4/7] Test github action --- .github/workflows/prettier-check.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml index e6c86fe..cb3abc3 100644 --- a/.github/workflows/prettier-check.yml +++ b/.github/workflows/prettier-check.yml @@ -2,9 +2,7 @@ name: "Prettier Check" on: push: - branches: - - main - pull_request_target: + pull_request: jobs: check-prettier: From 9e44e1cf231948e860897f48f9b00b2e300ea039 Mon Sep 17 00:00:00 2001 From: Nitrrine Date: Fri, 5 Jul 2024 13:58:11 +0500 Subject: [PATCH 5/7] Make action run only on pull requests --- .github/workflows/prettier-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml index cb3abc3..fc01d2f 100644 --- a/.github/workflows/prettier-check.yml +++ b/.github/workflows/prettier-check.yml @@ -1,7 +1,6 @@ name: "Prettier Check" on: - push: pull_request: jobs: From 9e102da85f1b6c9eb6cdf6b7028eebd634b227b4 Mon Sep 17 00:00:00 2001 From: Nitrrine <43351072+Nitrrine@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:34:15 +0500 Subject: [PATCH 6/7] Forgot to specify Node JS version --- .github/workflows/prettier-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml index fc01d2f..ea1a3b2 100644 --- a/.github/workflows/prettier-check.yml +++ b/.github/workflows/prettier-check.yml @@ -16,10 +16,10 @@ jobs: with: version: 9 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js v20.15.0 uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: "20.15.0" cache: "pnpm" - name: Install dependencies From 5e80c2daa61af676ff2f90e0dc4e0825e925b1c5 Mon Sep 17 00:00:00 2001 From: Nitrrine <43351072+Nitrrine@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:57:10 +0500 Subject: [PATCH 7/7] Make prettier to run on push too --- .github/workflows/prettier-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml index ea1a3b2..5c30957 100644 --- a/.github/workflows/prettier-check.yml +++ b/.github/workflows/prettier-check.yml @@ -1,6 +1,7 @@ name: "Prettier Check" on: + push: pull_request: jobs: