From 45fe85088d7ced8c6a62a33e8dfc2bb76a80c401 Mon Sep 17 00:00:00 2001 From: MitaliBhalla Date: Mon, 31 Aug 2026 10:40:57 +0530 Subject: [PATCH 1/2] chore: batch patch/minor dependency updates for automerge Match other ROSA repos: group gomod, dockerfile, and tekton patch/minor/digest updates into one PR each so automerge stays tidy instead of one PR per module. Co-authored-by: Cursor --- .github/dependabot.yml | 24 ++++++++++ .github/workflows/dependabot-auto-merge.yml | 50 +++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bc4b706..9a2efe1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,20 +2,44 @@ version: 2 updates: - package-ecosystem: "github-actions" directory: "/" + labels: + - "area/dependency" schedule: interval: "weekly" + cooldown: + default-days: 3 open-pull-requests-limit: 5 + groups: + github-actions: + patterns: + - "*" - package-ecosystem: "gomod" directory: "/" + labels: + - "area/dependency" schedule: interval: "weekly" + cooldown: + default-days: 3 open-pull-requests-limit: 10 groups: aws-sdk: patterns: - "github.com/aws/*" + kubernetes: + patterns: + - "k8s.io/*" + - "sigs.k8s.io/*" + openshift: + patterns: + - "github.com/openshift/*" + - "github.com/openshift-online/*" - package-ecosystem: "docker" directory: "/" + labels: + - "area/dependency" schedule: interval: "weekly" + cooldown: + default-days: 3 open-pull-requests-limit: 5 diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..3334b21 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,50 @@ +name: Dependabot Auto-Merge + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: | + github.event.pull_request.user.login == 'dependabot[bot]' && + github.event.pull_request.head.repo.full_name == github.repository + steps: + - name: Fetch Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Enable auto-merge for patch and minor updates + if: | + steps.metadata.outputs.update-type == 'version-update:semver-patch' || + steps.metadata.outputs.update-type == 'version-update:semver-minor' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Comment on major version updates + if: | + github.event.action == 'opened' && + steps.metadata.outputs.update-type == 'version-update:semver-major' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEPENDENCY_NAMES: ${{ steps.metadata.outputs.dependency-names }} + PREVIOUS_VERSION: ${{ steps.metadata.outputs.previous-version }} + NEW_VERSION: ${{ steps.metadata.outputs.new-version }} + PR_NUMBER: ${{ github.event.pull_request.number }} + REPOSITORY: ${{ github.repository }} + run: | + set -euo pipefail + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + "/repos/${REPOSITORY}/issues/${PR_NUMBER}/comments" \ + -f body="Major version update detected for ${DEPENDENCY_NAMES} (${PREVIOUS_VERSION} -> ${NEW_VERSION}). Auto-merge is disabled; manual review required." From 813e33dc3b63511e3385ee99796f6f190132b9ad Mon Sep 17 00:00:00 2001 From: MitaliBhalla Date: Mon, 31 Aug 2026 10:53:02 +0530 Subject: [PATCH 2/2] chore: drop Dependabot auto-merge workflow Keep Dependabot grouping for gomod/actions (this repo has no MintMaker). Do not add an auto-merge workflow. Co-authored-by: Cursor --- .github/workflows/dependabot-auto-merge.yml | 50 --------------------- 1 file changed, 50 deletions(-) delete mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml deleted file mode 100644 index 3334b21..0000000 --- a/.github/workflows/dependabot-auto-merge.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Dependabot Auto-Merge - -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - -permissions: - contents: write - pull-requests: write - -jobs: - dependabot: - runs-on: ubuntu-latest - if: | - github.event.pull_request.user.login == 'dependabot[bot]' && - github.event.pull_request.head.repo.full_name == github.repository - steps: - - name: Fetch Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - - name: Enable auto-merge for patch and minor updates - if: | - steps.metadata.outputs.update-type == 'version-update:semver-patch' || - steps.metadata.outputs.update-type == 'version-update:semver-minor' - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Comment on major version updates - if: | - github.event.action == 'opened' && - steps.metadata.outputs.update-type == 'version-update:semver-major' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEPENDENCY_NAMES: ${{ steps.metadata.outputs.dependency-names }} - PREVIOUS_VERSION: ${{ steps.metadata.outputs.previous-version }} - NEW_VERSION: ${{ steps.metadata.outputs.new-version }} - PR_NUMBER: ${{ github.event.pull_request.number }} - REPOSITORY: ${{ github.repository }} - run: | - set -euo pipefail - gh api \ - --method POST \ - -H "Accept: application/vnd.github+json" \ - "/repos/${REPOSITORY}/issues/${PR_NUMBER}/comments" \ - -f body="Major version update detected for ${DEPENDENCY_NAMES} (${PREVIOUS_VERSION} -> ${NEW_VERSION}). Auto-merge is disabled; manual review required."