From 4fd6f868b0116ffc850cb453c58127165d47ee40 Mon Sep 17 00:00:00 2001 From: James Thompson Date: Wed, 4 Nov 2026 16:49:56 -0500 Subject: [PATCH 1/2] Add CI, Dependabot, and Dependabot auto-merge workflows - .github/workflows/ci.yml runs `bundle exec rspec` on pull requests and pushes to main using ruby/setup-ruby with bundler caching. - .github/dependabot.yml checks bundler and GitHub Actions dependencies weekly, grouping security updates and minor/patch bumps. - .github/workflows/dependabot-auto-merge.yml enables auto-merge on Dependabot PRs for non-major bumps and security fixes; they still wait for the required CI check. - .ruby-version pins 3.4.2 to match mise.toml so CI and local match. Co-Authored-By: Claude Fable 5.1 --- .github/dependabot.yml | 24 ++++++++++++++++++ .github/workflows/ci.yml | 17 +++++++++++++ .github/workflows/dependabot-auto-merge.yml | 27 +++++++++++++++++++++ .ruby-version | 1 + 4 files changed, 69 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/dependabot-auto-merge.yml create mode 100644 .ruby-version diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6f1e2ab --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +version: 2 +updates: + - package-ecosystem: bundler + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 + groups: + security: + applies-to: security-updates + patterns: ["*"] + minor-and-patch: + applies-to: version-updates + patterns: ["*"] + update-types: ["minor", "patch"] + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 + groups: + github-actions: + patterns: ["*"] + update-types: ["minor", "patch"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..36cf184 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,17 @@ +name: CI + +on: + pull_request: + push: + branches: [ main ] + +jobs: + rspec: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + - run: bundle exec rspec diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..24b34ef --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,27 @@ +name: Dependabot auto-merge + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + auto-merge: + if: github.event.pull_request.user.login == 'dependabot[bot]' + runs-on: ubuntu-latest + steps: + - name: Fetch Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + # Patch/minor bumps and any PR that fixes a security advisory are + # queued for auto-merge; they still wait for the required CI checks. + - name: Enable auto-merge + if: steps.metadata.outputs.update-type != 'version-update:semver-major' || steps.metadata.outputs.ghsa-id != '' + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..4d9d11c --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.4.2 From 60c6543f94fd274773e2f1e2f7d57649cc62351d Mon Sep 17 00:00:00 2001 From: James Thompson Date: Wed, 4 Nov 2026 16:51:12 -0500 Subject: [PATCH 2/2] Pin Ruby 3.4.12 for CI and local ruby/setup-ruby only builds the latest patch of each series for the ubuntu-latest (26.04) runner, so 3.4.2 is unavailable there. Bump both .ruby-version and mise.toml to 3.4.12 so CI and local stay in sync. Co-Authored-By: Claude Fable 5.1 --- .ruby-version | 2 +- mise.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ruby-version b/.ruby-version index 4d9d11c..25e8632 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.4.2 +3.4.12 diff --git a/mise.toml b/mise.toml index 63adf13..c71cdd4 100644 --- a/mise.toml +++ b/mise.toml @@ -1,2 +1,2 @@ [tools] -ruby = "3.4.2" +ruby = "3.4.12"