From 3c83a8d882cc9bf7731f8d474ac3ec4117c6725c Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:58:58 +0900 Subject: [PATCH 1/7] chore: manifest.json --- README.md | 3 ++- manifest.json | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 manifest.json diff --git a/README.md b/README.md index 7b0867a..2910503 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ This template repository includes support for the following: - Environment Variables - Conventional Commits - Automatic deployment to Cloudflare Pages +- `manifest.json` plugin description ## Testing @@ -17,7 +18,7 @@ To test with Cypress Studio UI, run yarn cy:open ``` -Otherwise to simply run the tests through the console, run +Otherwise, to simply run the tests through the console, run ```shell yarn cy:run diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..8975439 --- /dev/null +++ b/manifest.json @@ -0,0 +1,10 @@ +{ + "name": "ts-template", + "description": "ts-template for Ubiquibot plugins.", + "commands": { + "command1": { + "example": "/command1 argument", + "description": "Command 1 with an argument." + } + } +} From 9729b15b01912f1f62749756bc20ef69bdf0d5f9 Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Thu, 11 Jul 2024 21:07:43 +0900 Subject: [PATCH 2/7] chore: manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 8975439..d2cf618 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "description": "ts-template for Ubiquibot plugins.", "commands": { "command1": { - "example": "/command1 argument", + "ubiquity:example": "/command1 argument", "description": "Command 1 with an argument." } } From 83c9c2172198bce94af98b96d0d255ec99765492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A2=E3=83=AC=E3=82=AF=E3=82=B5=E3=83=B3=E3=83=80?= =?UTF-8?q?=E3=83=BC=2Eeth?= <4975670+0x4007@users.noreply.github.com> Date: Fri, 19 Jul 2024 13:41:04 +0900 Subject: [PATCH 3/7] Delete CHANGELOG.md @gentlementlegen we shouldn't have this in the template. be sure to remove from any ci etc --- CHANGELOG.md | 61 ---------------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 5e0448e..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,61 +0,0 @@ -# Changelog - -## 1.0.0 (2024-06-05) - - -### Features - -* add conventional commits ([9c9366a](https://github.com/ubiquity/ts-template/commit/9c9366ad423cfb450909c36f735aa08c222cd319)) -* add dotenv ([7b7c6f5](https://github.com/ubiquity/ts-template/commit/7b7c6f5decd076cf833352c03906e2dcb514428f)) -* add knip CI configuration ([83b6cb6](https://github.com/ubiquity/ts-template/commit/83b6cb68ce08cd279b315718586ad8f136e065ba)) -* add naming conventions rule ([f3997c9](https://github.com/ubiquity/ts-template/commit/f3997c9b635dc8d027965b65079423bbba268986)) -* add pull request template ([e7fff97](https://github.com/ubiquity/ts-template/commit/e7fff971d1ef38f2fc18516c5ba45322490a4a8c)) -* add TS support ([f9b45ea](https://github.com/ubiquity/ts-template/commit/f9b45eaae8f7e2da76cd9979fd60217f4d4938cc)) -* ban non null assertions ([e674345](https://github.com/ubiquity/ts-template/commit/e6743454269235a4d1b632742fd723287e16a190)) -* cd ([9fbac16](https://github.com/ubiquity/ts-template/commit/9fbac16e59476e56333baa5c7e89fb177ed40313)) -* commit or pr ([dbec9e3](https://github.com/ubiquity/ts-template/commit/dbec9e30f1bbfb9a6514cb68c0507db37dd7cf2b)) -* copy typescript rules ([86cb568](https://github.com/ubiquity/ts-template/commit/86cb56883e02419c919c7646d62fea530a5ff99f)) -* create helloWorld index.html ([d1e8b0b](https://github.com/ubiquity/ts-template/commit/d1e8b0b52130f6cc206675b7e2b8b616da2fda81)) -* **cspell:** support colors ([27786d7](https://github.com/ubiquity/ts-template/commit/27786d7d0ba92c4268395ab38675627bc9bef8ea)) -* cypress testing suite ([92cad2c](https://github.com/ubiquity/ts-template/commit/92cad2c46aabc81b42a926298270adbd38adffdc)) -* default Jest testing configuration ([d7670f4](https://github.com/ubiquity/ts-template/commit/d7670f4d4b7ba307052117a9928540b9d967ec13)) -* default Jest testing configuration ([#19](https://github.com/ubiquity/ts-template/issues/19)) ([f0c06fb](https://github.com/ubiquity/ts-template/commit/f0c06fba5fdcc6919d009f17197b303916608530)) -* easy ui support ([7ffbda1](https://github.com/ubiquity/ts-template/commit/7ffbda1732fbb579cb0f9db0e8e59a8521b02725)) -* easy ui support ([805224f](https://github.com/ubiquity/ts-template/commit/805224f0a3c2fb13205e0d0fe184844e99fab02d)) -* format on lint-staged ([bfcfcda](https://github.com/ubiquity/ts-template/commit/bfcfcdaab8c0aed6fda112e579d9f4f4bb557ee0)) -* initial commit ([080bedf](https://github.com/ubiquity/ts-template/commit/080bedf1c104dd8ace4495edd595fbcee3c22ab9)) -* new github env style ([6eb4ace](https://github.com/ubiquity/ts-template/commit/6eb4ace9aff0ce51d1b09befa1b85e09c6eca81f)) -* prefer named functions ([31825e8](https://github.com/ubiquity/ts-template/commit/31825e82fc48c0e4b8480598f291ce8b1bc88d1a)) -* production deploys ([821f81e](https://github.com/ubiquity/ts-template/commit/821f81e95925b9dcfc8ae6631bae3150b1cfcb27)) -* push action for development branch ([af60573](https://github.com/ubiquity/ts-template/commit/af605734b9a66fa4b1d5b5887704e2940de43cf6)) -* release please Action ([f667d6e](https://github.com/ubiquity/ts-template/commit/f667d6e730e1bfdd68a577f844a66216cd8446cf)) -* reusable deploy script ([4e8bf2b](https://github.com/ubiquity/ts-template/commit/4e8bf2b14aa38ad0e3bcdd82a4e080be86d77179)) -* spell check on commit ([53bfa02](https://github.com/ubiquity/ts-template/commit/53bfa0258251b2e775699bfc6a5120f174ccaf58)) -* update readme ([d2cb9f8](https://github.com/ubiquity/ts-template/commit/d2cb9f89841650c76596a03d0eab4a3026244247)) -* workflow dispatch ([126e819](https://github.com/ubiquity/ts-template/commit/126e819301653d30eede0849d258e44db973f2ba)) -* workflow dispatch ([dc336a9](https://github.com/ubiquity/ts-template/commit/dc336a9d2902a4c425491ac61fbc5325ad6e4826)) - - -### Bug Fixes - -* app installation if ([059487c](https://github.com/ubiquity/ts-template/commit/059487c910fbf671ef99a058631af40ed83ed12c)) -* change dist to static ([783e786](https://github.com/ubiquity/ts-template/commit/783e786dfce63e702672f5a09f58935fad75b1ae)) -* **ci:** cspell ([ea8c924](https://github.com/ubiquity/ts-template/commit/ea8c924d95ef36ef5ece2ac3a5b6e0153c6b816a)) -* **ci:** cspell ([48b4419](https://github.com/ubiquity/ts-template/commit/48b441995dbc0a78b5de5bb2dd353fa77ef804ae)) -* **ci:** on prs ([f2fea11](https://github.com/ubiquity/ts-template/commit/f2fea11b632888bd7f7eebb310905843d6c57f70)) -* commit sha ([2393807](https://github.com/ubiquity/ts-template/commit/23938078cf1e720c714698d6b966dff395153c61)) -* commit-msg script and add lint-staged command ([7c2aa64](https://github.com/ubiquity/ts-template/commit/7c2aa64df980c4937812c09d4038b19de7ea8cda)) -* cspell ci ([8ee208a](https://github.com/ubiquity/ts-template/commit/8ee208a1dd30d5c708a61e636cca29b04b373aac)) -* disabled comments on every push, and added default value for coverage ([419442c](https://github.com/ubiquity/ts-template/commit/419442c644651ec8db72e26f446b56123b284ebf)) -* forgot to include cspell ([4026845](https://github.com/ubiquity/ts-template/commit/4026845606011433d71c78a921ebf1f93d5d83e8)) -* gitignore ([4818b15](https://github.com/ubiquity/ts-template/commit/4818b15f6f0b3cdfe74a96fd8fa94c0f6ed6461c)) -* lint staged ([9cad989](https://github.com/ubiquity/ts-template/commit/9cad989afff96c8786db86cb92df64e808b5f405)) -* lint staged ([937630e](https://github.com/ubiquity/ts-template/commit/937630eb4abf93b7f3055b660e9bebc809d53399)) -* moved eslint from js to json and accept numbers in file names ([b9c377c](https://github.com/ubiquity/ts-template/commit/b9c377c9b1c2dc8840622027c996cf626f996920)) -* prettier for css ([4880237](https://github.com/ubiquity/ts-template/commit/4880237fb5d524e8315638f10bae984f3942999c)) -* rename pull_request_template ([8aa986e](https://github.com/ubiquity/ts-template/commit/8aa986e6885173d56f628ee6d887d3619a19407c)) -* transport secrets ([83c2e29](https://github.com/ubiquity/ts-template/commit/83c2e2948ccce120400f943334a2c3bdb573f175)) -* use regex and ignore e2e.ts ([67e0375](https://github.com/ubiquity/ts-template/commit/67e0375fca861d1d71fdbfac436f667d758b448a)) -* whitespace ([1f80af6](https://github.com/ubiquity/ts-template/commit/1f80af63af8b2c1d97b125fd64b0a248e8d4ded0)) -* workflow cypress ([0499dcb](https://github.com/ubiquity/ts-template/commit/0499dcbe14472c86b0a50169a86f2e6282d6c323)) -* workflow release please ([5dd1302](https://github.com/ubiquity/ts-template/commit/5dd1302a93822de66b216bdd5293b110eeda75c8)) From a952bdd25134e7d24f093569759126dfd8d86e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A2=E3=83=AC=E3=82=AF=E3=82=B5=E3=83=B3=E3=83=80?= =?UTF-8?q?=E3=83=BC=2Eeth?= <4975670+0x4007@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:35:14 +0900 Subject: [PATCH 4/7] Update README.md --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 2910503..bd75c68 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,41 @@ To start Jest tests, run ```shell yarn test ``` + +## Sync any repository to latest `ts-template` + +A bash function that can do this for you: + +```bash +sync-branch-to-template() { + local branch_name + branch_name=$(git rev-parse --abbrev-ref HEAD) + local original_remote + original_remote=$(git remote show | head -n 1) + + # Add the template remote + git remote add template https://github.com/ubiquity/ts-template + + # Fetch from the template remote + git fetch template development + + if [ "$branch_name" != "HEAD" ]; then + # Create a new branch and switch to it + git checkout -b "chore/merge-${branch_name}-template" + + # Merge the changes from the template remote + git merge template/development --allow-unrelated-histories + + # Switch back to the original branch + git checkout "$branch_name" + + # Push the changes to the original remote + git push "$original_remote" HEAD:"$branch_name" + else + echo "You are in a detached HEAD state. Please checkout a branch first." + fi + + # Remove the template remote + # git remote remove template +} +``` From 61aff8aec1f55715c7b6471d0d47ec82757f54cd Mon Sep 17 00:00:00 2001 From: gentlementlegen Date: Sun, 18 Aug 2024 15:54:50 +0900 Subject: [PATCH 5/7] fix: release-please.yml uses the latest version of the Action --- .github/workflows/release-please.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 5c62600..a38ccee 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -14,13 +14,7 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: google-github-actions/release-please-action@v3 + - uses: googleapis/release-please-action@v4 with: - release-type: node - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "20.10.0" - registry-url: https://registry.npmjs.org/ - - run: | - yarn install --immutable --immutable-cache --check-cache + release-type: simple + target-branch: main From c7e78abba4a8a84b8ac12635cc386daae4b8386c Mon Sep 17 00:00:00 2001 From: gentlementlegen Date: Sun, 18 Aug 2024 15:56:56 +0900 Subject: [PATCH 6/7] fix: conventional-commits.yml uses the latest version of the Action --- .github/workflows/conventional-commits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index 6b3066e..8d17568 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -8,5 +8,5 @@ jobs: name: Conventional Commits runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ubiquity/action-conventional-commits@master From ed76e9567f5fb100543748cbf5b41516f228f7d9 Mon Sep 17 00:00:00 2001 From: gentlementlegen Date: Sun, 18 Aug 2024 16:26:51 +0900 Subject: [PATCH 7/7] chore: removed manifest.json and updated README.md --- README.md | 1 - manifest.json | 10 ---------- 2 files changed, 11 deletions(-) delete mode 100644 manifest.json diff --git a/README.md b/README.md index bd75c68..caace40 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ This template repository includes support for the following: - Environment Variables - Conventional Commits - Automatic deployment to Cloudflare Pages -- `manifest.json` plugin description ## Testing diff --git a/manifest.json b/manifest.json deleted file mode 100644 index d2cf618..0000000 --- a/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "ts-template", - "description": "ts-template for Ubiquibot plugins.", - "commands": { - "command1": { - "ubiquity:example": "/command1 argument", - "description": "Command 1 with an argument." - } - } -}