From df99b61a6135626e4d6f20dedaeaffb3bab5bdb6 Mon Sep 17 00:00:00 2001 From: neostryder <61663569+neostryder@users.noreply.github.com> Date: Sun, 8 Nov 2026 19:43:05 -0700 Subject: [PATCH 1/2] Add CI, the standard Dependabot setup, and auto-merge for passing updates --- .github/dependabot.yml | 27 +++++++++++++++ .github/workflows/ci.yml | 27 +++++++++++++++ .github/workflows/dependabot-automerge.yml | 39 ++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/dependabot-automerge.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..895a05f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,27 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: / + schedule: + interval: daily + cooldown: + default-days: 3 + open-pull-requests-limit: 20 + versioning-strategy: increase + groups: + minor-and-patch: + update-types: + - minor + - patch +- package-ecosystem: github-actions + directory: / + schedule: + interval: daily + cooldown: + default-days: 3 + open-pull-requests-limit: 20 + groups: + minor-and-patch: + update-types: + - minor + - patch diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d0928d3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - uses: pnpm/action-setup@v6 + with: + version: latest + - uses: actions/setup-node@v7 + with: + node-version: latest + cache: pnpm + + - run: pnpm install --frozen-lockfile + - run: pnpm run build diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 0000000..154cb0c --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,39 @@ +name: Dependabot auto-merge + +on: + workflow_run: + workflows: ["ci"] + types: [completed] + +permissions: + contents: write + pull-requests: write + checks: read + +jobs: + merge: + name: merge when green + if: >- + github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.conclusion == 'success' && + startsWith(github.event.workflow_run.head_branch, 'dependabot/') && + !startsWith(github.event.workflow_run.head_branch, 'dependabot/docker') + runs-on: ubuntu-latest + steps: + - name: Merge when every check has passed + env: + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} + SHA: ${{ github.event.workflow_run.head_sha }} + BRANCH: ${{ github.event.workflow_run.head_branch }} + run: | + set -euo pipefail + pr=$(gh pr list --repo "$REPO" --head "$BRANCH" --state open --json number,author --jq '[.[] | select(.author.login == "app/dependabot")][0].number // empty') + if [ -z "$pr" ]; then echo "No open Dependabot pull request for $BRANCH."; exit 0; fi + runs=$(gh api "repos/$REPO/commits/$SHA/check-runs?per_page=100" --jq '[.check_runs[] | select(.name != "merge when green")]') + total=$(jq 'length' <<<"$runs") + pending=$(jq '[.[] | select(.status != "completed")] | length' <<<"$runs") + bad=$(jq '[.[] | select(.status == "completed" and (.conclusion | IN("success","neutral","skipped") | not))] | length' <<<"$runs") + echo "checks: $total, pending: $pending, not passing: $bad" + if [ "$total" -eq 0 ] || [ "$pending" -ne 0 ] || [ "$bad" -ne 0 ]; then echo "Not merging yet."; exit 0; fi + gh pr merge "$pr" --repo "$REPO" --squash || gh pr merge "$pr" --repo "$REPO" --merge || gh pr merge "$pr" --repo "$REPO" --rebase From b04fda8fed6ccf07cc3d1a39c2f91e880d821125 Mon Sep 17 00:00:00 2001 From: neostryder <61663569+neostryder@users.noreply.github.com> Date: Sun, 8 Nov 2026 19:50:14 -0700 Subject: [PATCH 2/2] Keep only the Dependabot setup while the repo has no CI that can run here --- .github/workflows/ci.yml | 27 --------------- .github/workflows/dependabot-automerge.yml | 39 ---------------------- 2 files changed, 66 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/dependabot-automerge.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index d0928d3..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ci - -on: - push: - branches: [main] - pull_request: - workflow_dispatch: - -permissions: - contents: read - -jobs: - verify: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - - uses: pnpm/action-setup@v6 - with: - version: latest - - uses: actions/setup-node@v7 - with: - node-version: latest - cache: pnpm - - - run: pnpm install --frozen-lockfile - - run: pnpm run build diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml deleted file mode 100644 index 154cb0c..0000000 --- a/.github/workflows/dependabot-automerge.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Dependabot auto-merge - -on: - workflow_run: - workflows: ["ci"] - types: [completed] - -permissions: - contents: write - pull-requests: write - checks: read - -jobs: - merge: - name: merge when green - if: >- - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' && - startsWith(github.event.workflow_run.head_branch, 'dependabot/') && - !startsWith(github.event.workflow_run.head_branch, 'dependabot/docker') - runs-on: ubuntu-latest - steps: - - name: Merge when every check has passed - env: - GH_TOKEN: ${{ github.token }} - REPO: ${{ github.repository }} - SHA: ${{ github.event.workflow_run.head_sha }} - BRANCH: ${{ github.event.workflow_run.head_branch }} - run: | - set -euo pipefail - pr=$(gh pr list --repo "$REPO" --head "$BRANCH" --state open --json number,author --jq '[.[] | select(.author.login == "app/dependabot")][0].number // empty') - if [ -z "$pr" ]; then echo "No open Dependabot pull request for $BRANCH."; exit 0; fi - runs=$(gh api "repos/$REPO/commits/$SHA/check-runs?per_page=100" --jq '[.check_runs[] | select(.name != "merge when green")]') - total=$(jq 'length' <<<"$runs") - pending=$(jq '[.[] | select(.status != "completed")] | length' <<<"$runs") - bad=$(jq '[.[] | select(.status == "completed" and (.conclusion | IN("success","neutral","skipped") | not))] | length' <<<"$runs") - echo "checks: $total, pending: $pending, not passing: $bad" - if [ "$total" -eq 0 ] || [ "$pending" -ne 0 ] || [ "$bad" -ne 0 ]; then echo "Not merging yet."; exit 0; fi - gh pr merge "$pr" --repo "$REPO" --squash || gh pr merge "$pr" --repo "$REPO" --merge || gh pr merge "$pr" --repo "$REPO" --rebase