From fcf88710db1b5fc042feb9f287ff6c7e4a5db55e Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:47:56 +0545 Subject: [PATCH 01/15] docs: update TODO with release automation notes --- docs/TODO.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/TODO.md b/docs/TODO.md index 21c723c..cff2549 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -1,2 +1,4 @@ https://stackoverflow.com/questions/76464269/how-to-rerun-a-github-action-workflow-from-the-command-line-and-have-the-status https://stackoverflow.com/questions/69893875/watch-gh-actions-workflow-output-in-cli + +# fix release automation \ No newline at end of file From b7af16103c90f76c464fe14f08ee39ea80d52922 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:48:55 +0545 Subject: [PATCH 02/15] build: update pr:push command for correct base branch --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f68c73d..462390c 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "clean": "rimraf .next out", "bump": "changeset version", "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", - "pr:push": "gh pr create --body '${nr git-cliff -l}' --title pr:deploy -d", + "pr:push": "gh pr create --body '${nr git-cliff -l}' --title pr:deploy -B develop", "gh:workflows": "gh workflow view", "ci:spelling": "act -j spelling", "ci:local": "act pull_request", From 4b7abaaf5cb784567bf5e708abd0373f9d1c25dd Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:49:50 +0545 Subject: [PATCH 03/15] style(package.json): fix quotes in pr:push script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 462390c..5b99ef0 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "clean": "rimraf .next out", "bump": "changeset version", "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", - "pr:push": "gh pr create --body '${nr git-cliff -l}' --title pr:deploy -B develop", + "pr:push": "gh pr create --body \"${nr git-cliff -l}\" --title pr:deploy -B develop", "gh:workflows": "gh workflow view", "ci:spelling": "act -j spelling", "ci:local": "act pull_request", From 13bfd8f35e148ae8c66309aba5c3f68836555e95 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:51:09 +0545 Subject: [PATCH 04/15] chore: fix command substitution syntax in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5b99ef0..5fbc37f 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "clean": "rimraf .next out", "bump": "changeset version", "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", - "pr:push": "gh pr create --body \"${nr git-cliff -l}\" --title pr:deploy -B develop", + "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:deploy -B develop", "gh:workflows": "gh workflow view", "ci:spelling": "act -j spelling", "ci:local": "act pull_request", From 4daef52a042cf7c238f873642b0bd262f91d6835 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:52:23 +0545 Subject: [PATCH 05/15] chore: update pr:push script in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5fbc37f..c75927b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "clean": "rimraf .next out", "bump": "changeset version", "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", - "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:deploy -B develop", + "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop -d", "gh:workflows": "gh workflow view", "ci:spelling": "act -j spelling", "ci:local": "act pull_request", From 5e34f805cf12eafff93f75eeae348b75cfe88963 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:56:45 +0545 Subject: [PATCH 06/15] ci: add spell check workflow to CI configuration --- .github/workflows/ci.yml | 8 ++++++++ docs/TODO.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0f6058..e902385 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,14 @@ on: pull_request #on: [pull_request, push] jobs: + typos: + name: Spell Check + runs-on: ubuntu-latest + steps: + - uses: taiki-e/checkout-action@v1 + - uses: crate-ci/typos@v1.26.0 + with: + files: . show: runs-on: ubuntu-latest steps: diff --git a/docs/TODO.md b/docs/TODO.md index cff2549..69ae3f6 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -1,4 +1,4 @@ https://stackoverflow.com/questions/76464269/how-to-rerun-a-github-action-workflow-from-the-command-line-and-have-the-status https://stackoverflow.com/questions/69893875/watch-gh-actions-workflow-output-in-cli -# fix release automation \ No newline at end of file +# fix release automation From 9ef7776613283d28172f06ec1a7a429fa9f46d6b Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:00:29 +0545 Subject: [PATCH 07/15] build: add new scripts for pull request handling --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index c75927b..41bd8ca 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,8 @@ "bump": "changeset version", "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop -d", + "pr:edit": "gh pr edit \"$(nr pr:number)\" --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop -d", + "pr:number": "gh pr view --json number --jq '.number'", "gh:workflows": "gh workflow view", "ci:spelling": "act -j spelling", "ci:local": "act pull_request", From 57a946ca33bb8ccea15d3a69f6865ec13e0e1f05 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:00:48 +0545 Subject: [PATCH 08/15] chore(package.json): update pr:edit command syntax --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 41bd8ca..1df3739 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "bump": "changeset version", "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop -d", - "pr:edit": "gh pr edit \"$(nr pr:number)\" --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop -d", + "pr:edit": "gh pr edit \"$(nr pr:number)\" --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop", "pr:number": "gh pr view --json number --jq '.number'", "gh:workflows": "gh workflow view", "ci:spelling": "act -j spelling", From 20f92be896ee9f6e76ce71068d11aa4b42cdc6fc Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:02:46 +0545 Subject: [PATCH 09/15] chore(package.json): update pr:push command for dry run --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1df3739..985e597 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "clean": "rimraf .next out", "bump": "changeset version", "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", - "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop -d", + "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop -d --dry-run", "pr:edit": "gh pr edit \"$(nr pr:number)\" --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop", "pr:number": "gh pr view --json number --jq '.number'", "gh:workflows": "gh workflow view", From 83b4a33cc757a47be29dc13d4d4202fb946d9d6e Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:04:16 +0545 Subject: [PATCH 10/15] ci: update CI workflow for PR checks and remove show job --- .github/workflows/ci.yml | 6 ------ .github/workflows/pr.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e902385..79ea696 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,3 @@ jobs: - uses: crate-ci/typos@v1.26.0 with: files: . - show: - runs-on: ubuntu-latest - steps: - - name: Show Env - # run: echo "Env ${{ env.ENV_ID }} - run: echo "Env for ci website pr" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..b2f4191 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,16 @@ +name: Check PR + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + pr: + runs-on: ubuntu-latest + steps: + - name: Show Env + # run: echo "Env ${{ env.ENV_ID }} + run: echo "Env for ci website pr" \ No newline at end of file From 8ab4c55460b6c704047f2e5e2d9e666896eb4f05 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:05:38 +0545 Subject: [PATCH 11/15] chore: update biome schema version to 1.9.3 --- biome.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biome.json b/biome.json index bc89457..24de6c0 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.9.2/schema.json", + "$schema": "https://biomejs.dev/schemas/1.9.3/schema.json", "files": { "ignore": [".next", "./**/*config.js", "./**/*.d.ts"], "ignoreUnknown": true From 4f8a65a0383eabc497d452d50ea36faaa1dbf4e9 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:11:39 +0545 Subject: [PATCH 12/15] ci: update GitHub Actions workflow and package.json scripts --- .github/workflows/pr.yml | 2 +- package.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b2f4191..6b21664 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,4 +13,4 @@ jobs: steps: - name: Show Env # run: echo "Env ${{ env.ENV_ID }} - run: echo "Env for ci website pr" \ No newline at end of file + run: echo "Env for ci website pr" diff --git a/package.json b/package.json index 985e597..047ae28 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,9 @@ "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop -d --dry-run", "pr:edit": "gh pr edit \"$(nr pr:number)\" --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop", - "pr:number": "gh pr view --json number --jq '.number'", + "pr:list": "gh pr list --state open --json number,title | jq -r '.[] | [.number, .title] | @tsv'", + "pr:l": "(echo -e 'PR Number\tTitle'; gh pr list --state open --json number,title | jq -r '.[] | [.number, .title] | @tsv') | column -t", + "pr:number": "gh pr view --json number --jq '.number' ", "gh:workflows": "gh workflow view", "ci:spelling": "act -j spelling", "ci:local": "act pull_request", From ec4c0ce6b0eed38aca8d20f47b5d6f98fdcf4001 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:14:11 +0545 Subject: [PATCH 13/15] chore: update PR commands in package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 047ae28..726323d 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "clean": "rimraf .next out", "bump": "changeset version", "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", - "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop -d --dry-run", - "pr:edit": "gh pr edit \"$(nr pr:number)\" --body \"$(nr git-cliff -l)\" --title pr:deploy --base develop", + "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:for-develop --base develop -d --dry-run", + "pr:edit": "gh pr edit \"$(nr pr:number)\" --body \"$(nr git-cliff -l)\" --title pr:develop --base develop", "pr:list": "gh pr list --state open --json number,title | jq -r '.[] | [.number, .title] | @tsv'", "pr:l": "(echo -e 'PR Number\tTitle'; gh pr list --state open --json number,title | jq -r '.[] | [.number, .title] | @tsv') | column -t", "pr:number": "gh pr view --json number --jq '.number' ", From c198e2beb70bc5719c3c522b82e546dba9e82370 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:15:16 +0545 Subject: [PATCH 14/15] ci: add job to update PR description automatically --- .github/workflows/pr.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6b21664..e442c03 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,6 +8,18 @@ on: - synchronize jobs: + update-pr-description: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Update PR Description + uses: nefrob/pr-description@v1.1.2 + with: + content: "Hello there!" + regex: ".*" + regexFlags: s + token: ${{ secrets.GITHUB_TOKEN }} pr: runs-on: ubuntu-latest steps: From 019139255cbe9bb874ba8c2932021bc14469f1c8 Mon Sep 17 00:00:00 2001 From: Axmin Shrestha <56112475+ax-sh@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:19:53 +0545 Subject: [PATCH 15/15] chore(package.json): update deploy script for GitHub PRs --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 726323d..84aa02c 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "prettier:fix": "prettier --write . ", "clean": "rimraf .next out", "bump": "changeset version", - "pr:deploy": "git push origin develop && gh pr create -H develop -B master --fill", + "pr:deploy-old": "git push origin develop && gh pr create -H develop -B master --fill", + "pr:deploy": "git push origin develop && gh pr create --head develop --base master --body '${nr git-cliff -l}' --title pr:deploy", "pr:push": "gh pr create --body \"$(nr git-cliff -l)\" --title pr:for-develop --base develop -d --dry-run", "pr:edit": "gh pr edit \"$(nr pr:number)\" --body \"$(nr git-cliff -l)\" --title pr:develop --base develop", "pr:list": "gh pr list --state open --json number,title | jq -r '.[] | [.number, .title] | @tsv'",