diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a28691d9e..15b991360 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,8 +3,8 @@ updates: - package-ecosystem: "bundler" directory: "/" schedule: - interval: "weekly" + interval: "daily" - package-ecosystem: "bundler" directory: "/docs" schedule: - interval: "weekly" + interval: "daily" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 000000000..c626064f9 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,25 @@ +name: Dependabot auto-merge + +on: + pull_request: + types: [opened] + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Approve Dependabot PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs + 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/.github/workflows/lint.yml b/.github/workflows/lint.yml index 30754e479..483898def 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -62,7 +62,12 @@ jobs: steps: - name: echo changed files run: | - if [[ ! "${{needs.changedfiles.outputs.markdown}}" == *"CHANGELOG.md"* ]]; then + # Filter out Gemfile.lock files from changed files + ALL_FILES="${{needs.changedfiles.outputs.all}}" + FILTERED_FILES=$(echo "$ALL_FILES" | tr ' ' '\n' | grep -v '^Gemfile\.lock$' | grep -v '^docs/Gemfile\.lock$' | tr '\n' ' ' | xargs) + + # Only require changelog if there are other files changed + if [[ -n "$FILTERED_FILES" ]] && [[ ! "${{needs.changedfiles.outputs.markdown}}" == *"CHANGELOG.md"* ]]; then echo "::error file=CHANGELOG.md,line=1,col=1::Please make sure that you add a docs/CHANGELOG.md entry to describe the changes in this pull request." exit 1 fi diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 955dbc39b..d15ec34f9 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,10 @@ nav_order: 6 ## main +* Automatically merge dependabot PRs. + + *Joel Hawksley* + * Use Ruby 4.0.0 in CI and dev. *Joel Hawksley* diff --git a/test/sandbox/test/rendering_test.rb b/test/sandbox/test/rendering_test.rb index d8ec2a436..44265ee77 100644 --- a/test/sandbox/test/rendering_test.rb +++ b/test/sandbox/test/rendering_test.rb @@ -20,7 +20,7 @@ def test_render_inline_allocations MyComponent.__vc_ensure_compiled with_instrumentation_enabled_option(false) do - assert_allocations({"4.1" => 67, "4.0" => 67, "3.4" => 72..74, "3.3" => 75, "3.2" => 78..79}) do + assert_allocations({"4.1" => 67..68, "4.0" => 67, "3.4" => 72..74, "3.3" => 75, "3.2" => 78..79}) do render_inline(MyComponent.new) end end