From 2d1e7864fcefcead495c99a3f62987bbc51cca70 Mon Sep 17 00:00:00 2001 From: karkir0003 Date: Sat, 26 Sep 2026 19:29:31 -0400 Subject: [PATCH 1/5] Auto Lint + Prettier action --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..c4b05f62 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + pull_request: + branches: + - master + types: [opened, synchronize, reopened] + +permissions: + contents: write + +jobs: + format-and-lint: + runs-on: ubuntu-latest + steps: + # Checkout Action: https://github.com/actions/checkout + - name: Checkout repository + uses: actions/checkout@v7 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.GITHUB_TOKEN }} + + # Setup Node Action: https://github.com/actions/setup-node + - name: Set up Node.js + uses: actions/setup-node@v7 + with: + node-version: 16.x + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run Prettier + run: npm run prettier + + # Auto Commit Action Repo: https://github.com/stefanzweifel/git-auto-commit-action + - name: Commit and push formatting changes + uses: stefanzweifel/git-auto-commit-action@v7 + with: + commit_message: "style: auto-format code with prettier" + commit_user_name: "github-actions[bot]" + commit_user_email: "github-actions[bot]@users.noreply.github.com" + + - name: Run ESLint + run: npm run lint From d24152792486886dee39b2fa795b57a2feffd6a6 Mon Sep 17 00:00:00 2001 From: karkir0003 Date: Sat, 26 Sep 2026 19:34:42 -0400 Subject: [PATCH 2/5] name change --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4b05f62..3ac4cef1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ permissions: contents: write jobs: - format-and-lint: + run-ci: runs-on: ubuntu-latest steps: # Checkout Action: https://github.com/actions/checkout From de69c179be20053063224eacdf80d324788820c8 Mon Sep 17 00:00:00 2001 From: karkir0003 Date: Sat, 26 Sep 2026 20:19:01 -0400 Subject: [PATCH 3/5] bugfix --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ac4cef1..bf822bde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: CI on: - pull_request: + pull_request_target: branches: - master types: [opened, synchronize, reopened] @@ -17,6 +17,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v7 with: + repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} token: ${{ secrets.GITHUB_TOKEN }} From b6eba549833baad86ef2ba83a7c3ce5cf95ca999 Mon Sep 17 00:00:00 2001 From: karkir0003 Date: Sat, 26 Sep 2026 20:20:57 -0400 Subject: [PATCH 4/5] add clarification --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf822bde..ccbbaecc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v7 with: + # Adding repository parameter to ensure that this action runs properly on the forks! repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} token: ${{ secrets.GITHUB_TOKEN }} From 9da929da6652cca0049812c304574b50ec5706e3 Mon Sep 17 00:00:00 2001 From: karkir0003 Date: Sat, 26 Sep 2026 20:24:28 -0400 Subject: [PATCH 5/5] test action --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccbbaecc..0eafcecc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: CI on: - pull_request_target: + pull_request: branches: - master types: [opened, synchronize, reopened] @@ -16,11 +16,6 @@ jobs: # Checkout Action: https://github.com/actions/checkout - name: Checkout repository uses: actions/checkout@v7 - with: - # Adding repository parameter to ensure that this action runs properly on the forks! - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.head_ref }} - token: ${{ secrets.GITHUB_TOKEN }} # Setup Node Action: https://github.com/actions/setup-node - name: Set up Node.js