Skip to content

Add Dependabot auto-merge workflows (ROSA-745)#448

Open
MitaliBhalla wants to merge 1 commit into
openshift:masterfrom
MitaliBhalla:chore/dependabot-auto-merge
Open

Add Dependabot auto-merge workflows (ROSA-745)#448
MitaliBhalla wants to merge 1 commit into
openshift:masterfrom
MitaliBhalla:chore/dependabot-auto-merge

Conversation

@MitaliBhalla
Copy link
Copy Markdown

@MitaliBhalla MitaliBhalla commented May 19, 2026

Summary

Dependabot auto-merge for routine updates (ROSA-745 / ROSAENG-751), aligned with openshift/backplane-cli (SREP-2438).

Changes

  • dependabot-auto-merge.yml: auto-merge patch/minor/digest after required CI; majors manual. Uses pull_request_target (no PR checkout), validated GraphQL/REST/comment responses.
  • branch-protection-check.yml: weekly verification of Dependabot config and workflows.

Notes

  • dependabot[bot] + openshift org only.
  • Requires ci/prow/* checks (DPP-20685).

Test plan

  • Required CI green
  • Review YAML

Made with Cursor

Summary by CodeRabbit

  • Chores
    • Added an automated weekly/manual validation that checks repository protection and dependency automation configuration, reporting missing or invalid settings.
    • Added automated dependency-handling: safely enables auto-merge for eligible patch/minor updates, posts informative comments on failures, and flags major-version updates for manual review.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Walkthrough

Adds a scheduled branch-protection validation workflow that verifies Dependabot config and the auto-merge workflow, and a Dependabot auto-merge workflow that conditionally enables GitHub auto-merge for safe updates, posts deduped comments for failures and major updates, and logs decisions.

Changes

Dependabot Automation and Validation

Layer / File(s) Summary
Branch Protection Check Workflow
.github/workflows/branch-protection-check.yml
Defines a weekly and manual branch-protection-check job that checks out the repo and runs Python validation of .github/dependabot.yml (schema, version, updates entries) and .github/workflows/dependabot-auto-merge.yml (presence of pull_request_target, jobs.auto-merge, steps, and dependabot/fetch-metadata).
Dependabot Auto-Merge — enablement
.github/workflows/dependabot-auto-merge.yml
Workflow triggered on pull_request_target events from Dependabot: fetches Dependabot metadata, obtains PR node ID via REST, attempts GraphQL mutation to enable auto-merge (SQUASH) for patch/minor/digest updates, and posts a warning comment on GraphQL failures.
Dependabot Auto-Merge — major-update comment
.github/workflows/dependabot-auto-merge.yml
Detects semver-major updates, lists issue comments to dedupe, and posts a “Major Version Update Detected” comment requiring manual review when absent.
Dependabot Auto-Merge — logging
.github/workflows/dependabot-auto-merge.yml
Always-run final step that prints the update type and auto-merge enabled/disabled summary to workflow logs.
sequenceDiagram
  participant DependabotBot as dependabot[bot]
  participant AutoMergeWF as dependabot-auto-merge workflow
  participant RepoREST as GitHub REST API
  participant RepoGraphQL as GitHub GraphQL API
  participant Repository as Repository (PR)
  DependabotBot->>AutoMergeWF: PR opened / synchronize (pull_request_target)
  AutoMergeWF->>AutoMergeWF: fetch dependabot metadata, determine update type
  AutoMergeWF->>RepoREST: GET PR -> node_id
  AutoMergeWF->>RepoGraphQL: mutation enableAutoMerge(node_id, method=SQUASH)
  RepoGraphQL->>AutoMergeWF: success/failure
  AutoMergeWF->>Repository: post deduped warning or major-update comment as needed
  AutoMergeWF->>AutoMergeWF: log final decision (auto_merge_enabled, update_type)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Dependabot auto-merge workflows, and includes the issue reference (ROSA-745).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR contains only GitHub Actions workflows (.yml files), not Ginkgo tests. The custom check for Ginkgo test name stability is not applicable.
Test Structure And Quality ✅ Passed PR adds only GitHub Actions workflows and configuration files, not Ginkgo test code. The custom check is not applicable to this pull request.
Microshift Test Compatibility ✅ Passed PR adds only GitHub Actions workflow files (.github/workflows/*.yml), not Ginkgo e2e tests. MicroShift Test Compatibility check only applies when new tests are added; this PR contains no test code.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds only GitHub Actions workflow YAML files (.github/workflows/), not Ginkgo e2e Go tests. Custom check for SNO test compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds only GitHub Actions workflow files (CI/CD automation), not Kubernetes manifests, operator code, or controllers with scheduling constraints.
Ote Binary Stdout Contract ✅ Passed Check not applicable: PR only adds GitHub Actions workflow YAML files with no Go code, test definitions, or stdout-related operations relevant to OTE Binary Stdout Contract.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR adds GitHub Actions workflows (.github/workflows/), not Ginkgo e2e tests. The custom check applies only to new e2e tests, so it is not applicable here.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 19, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: MitaliBhalla
Once this PR has been reviewed and has the lgtm label, please assign dustman9000 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/dependabot-auto-merge.yml:
- Around line 27-30: The if condition on steps.metadata.outputs.update-type
includes an invalid value 'version-update:semver-digest'; update the auto-merge
condition by removing that check so only documented outputs remain (keep
'version-update:semver-patch' and 'version-update:semver-minor', and add
'version-update:semver-major' if intended), i.e. edit the multi-line if that
references steps.metadata.outputs.update-type to eliminate the
'version-update:semver-digest' clause and ensure the OR chain only contains
valid update-type strings.
- Around line 108-135: The workflow step "Comment on Major Version Updates"
currently always posts a new comment (using the POST to /issues/.../comments and
jq-built body) on every synchronize event; modify it to first GET existing
comments for the pull request and search for an identifiable marker (e.g., a
unique HTML/comment token or "🚨 **Major Version Update Detected** 🚨" string)
and if found PATCH that existing comment ID instead of POSTing a new one,
otherwise POST as currently implemented; alternatively, add logic to skip this
whole step when the GitHub event is a synchronize by checking github.event_name
or remove synchronize from the workflow triggers—apply the change inside the
same step around the http_code/jq logic so the GH_TOKEN, comment body variables
and POST/PATCH decision are reused.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2c44ab95-0f87-4c02-a7e6-3c987f0a7e18

📥 Commits

Reviewing files that changed from the base of the PR and between e13fe45 and 8cf9dbb.

📒 Files selected for processing (2)
  • .github/workflows/branch-protection-check.yml
  • .github/workflows/dependabot-auto-merge.yml

Comment thread .github/workflows/dependabot-auto-merge.yml Outdated
Comment thread .github/workflows/dependabot-auto-merge.yml
@MitaliBhalla MitaliBhalla force-pushed the chore/dependabot-auto-merge branch 5 times, most recently from b7efcc5 to 175803d Compare May 19, 2026 06:18
- Auto-merge patch/minor/digest after CI; majors manual
- pull_request_target with validated API responses
- branch-protection-check for config/workflow presence

Co-authored-by: Cursor <cursoragent@cursor.com>
@MitaliBhalla MitaliBhalla force-pushed the chore/dependabot-auto-merge branch from 175803d to 80fe2a8 Compare May 20, 2026 07:52
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 20, 2026

@MitaliBhalla: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/branch-protection-check.yml:
- Line 17: The workflow currently uses the mutable reference "uses:
actions/checkout@v4"; replace that mutable tag with the action's immutable
commit SHA (e.g., "uses: actions/checkout@<commit-sha>") by locating the step
that contains "uses: actions/checkout@v4" and swapping the tag for the pinned
commit hash from the actions/checkout repository's release commit; update any
other actions in the file that use mutable tags similarly and commit the change
so the workflow uses fixed, immutable references.
- Line 22: The workflow installs PyYAML without a version pin (the step
containing "pip install --quiet pyyaml"); change that command to install a
specific, pinned PyYAML release (for example replace it with a pinned version
like pyyaml==6.0) so installs are reproducible and mitigate supply-chain risks,
and update the "pip install --quiet pyyaml" invocation in the
branch-protection-check.yml file accordingly (optionally include a hash or use a
requirements file if you prefer stronger verification).
- Around line 51-52: The current check only ensures the "directory" key exists;
update the validation around entry and i to also ensure entry["directory"] is a
non-empty string (not None, not empty/whitespace, and of type str) before
accepting it; if it fails these checks call fail with a clear message (e.g.,
keep using fail(f"dependabot.yml: updates[{i}] missing directory") or a slightly
adjusted message) so invalid values don't slip through.
- Around line 16-17: Update the "Checkout code" step that uses
actions/checkout@v4 to explicitly set persist-credentials: false to avoid
leaving GitHub token credentials available to later steps; locate the step with
the uses: actions/checkout@v4 entry and add the persist-credentials: false input
under that step so credential persistence is disabled.

In @.github/workflows/dependabot-auto-merge.yml:
- Around line 24-25: The workflow step with id enable-auto-merge calls
enablePullRequestAutoMerge without verifying that ci/prow/* checks exist; add a
fail-closed guard before invoking enablePullRequestAutoMerge by querying the PR
head SHA's check-runs/statuses (e.g., using the Checks API or a GraphQL
statusLookup) and ensure at least one ci/prow/* check-run or required status is
present; if none are found, skip or abort auto-merge to enforce the ci/prow/*
presence. Use the same guard logic for the earlier block referenced (lines
87-113) and keep the step name/id (enable-auto-merge /
enablePullRequestAutoMerge) so the mutation is only called when the check-run
guard passes.
- Around line 24-28: The auto-merge job gating condition in the step with id
enable-auto-merge only checks for semver patch/minor updates and thus misses
digest updates (which yield an empty update-type); update the if condition that
references steps.metadata.outputs.update-type to also accept an empty string by
adding || steps.metadata.outputs.update-type == '' so digest updates are
considered eligible for auto-merge.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 24c3a0a2-f45d-4265-96b4-2ff9c516bc79

📥 Commits

Reviewing files that changed from the base of the PR and between 8cf9dbb and 80fe2a8.

📒 Files selected for processing (2)
  • .github/workflows/branch-protection-check.yml
  • .github/workflows/dependabot-auto-merge.yml

Comment on lines +16 to +17
- name: Checkout code
uses: actions/checkout@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Set persist-credentials: false for defense in depth.

Although this workflow only reads the repository, disabling credential persistence prevents potential credential leakage through artifacts or logs.

🛡️ Proposed fix
       - name: Checkout code
-        uses: actions/checkout@v4
+        uses: actions/checkout@v4
+        with:
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 16-17: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/branch-protection-check.yml around lines 16 - 17, Update
the "Checkout code" step that uses actions/checkout@v4 to explicitly set
persist-credentials: false to avoid leaving GitHub token credentials available
to later steps; locate the step with the uses: actions/checkout@v4 entry and add
the persist-credentials: false input under that step so credential persistence
is disabled.

runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Pin action to commit hash for supply chain security.

Using a mutable tag reference (@v4) instead of an immutable commit hash exposes the workflow to potential supply chain attacks if the action's tag is moved or compromised.

🔒 Proposed fix
-        uses: actions/checkout@v4
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683  # v4.2.2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 16-17: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/branch-protection-check.yml at line 17, The workflow
currently uses the mutable reference "uses: actions/checkout@v4"; replace that
mutable tag with the action's immutable commit SHA (e.g., "uses:
actions/checkout@<commit-sha>") by locating the step that contains "uses:
actions/checkout@v4" and swapping the tag for the pinned commit hash from the
actions/checkout repository's release commit; update any other actions in the
file that use mutable tags similarly and commit the change so the workflow uses
fixed, immutable references.

- name: Validate Dependabot and workflow configuration
run: |
set -euo pipefail
pip install --quiet pyyaml
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Pin PyYAML version for reproducibility and security.

Installing PyYAML without a version constraint exposes the workflow to potential supply chain risks and non-reproducible builds if a new version introduces breaking changes or vulnerabilities.

📌 Proposed fix
-          pip install --quiet pyyaml
+          pip install --quiet pyyaml==6.0.2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pip install --quiet pyyaml
pip install --quiet pyyaml==6.0.2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/branch-protection-check.yml at line 22, The workflow
installs PyYAML without a version pin (the step containing "pip install --quiet
pyyaml"); change that command to install a specific, pinned PyYAML release (for
example replace it with a pinned version like pyyaml==6.0) so installs are
reproducible and mitigate supply-chain risks, and update the "pip install
--quiet pyyaml" invocation in the branch-protection-check.yml file accordingly
(optionally include a hash or use a requirements file if you prefer stronger
verification).

Comment on lines +51 to +52
if "directory" not in entry:
fail(f"dependabot.yml: updates[{i}] missing directory")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Validate directory field value, not just presence.

The check only verifies the directory key exists, but doesn't validate its value. An empty string, None, or non-string value would pass this check but fail Dependabot validation.

✅ Proposed fix
-              if "directory" not in entry:
-                  fail(f"dependabot.yml: updates[{i}] missing directory")
+              if not entry.get("directory"):
+                  fail(f"dependabot.yml: updates[{i}] missing or empty directory")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if "directory" not in entry:
fail(f"dependabot.yml: updates[{i}] missing directory")
if not entry.get("directory"):
fail(f"dependabot.yml: updates[{i}] missing or empty directory")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/branch-protection-check.yml around lines 51 - 52, The
current check only ensures the "directory" key exists; update the validation
around entry and i to also ensure entry["directory"] is a non-empty string (not
None, not empty/whitespace, and of type str) before accepting it; if it fails
these checks call fail with a clear message (e.g., keep using
fail(f"dependabot.yml: updates[{i}] missing directory") or a slightly adjusted
message) so invalid values don't slip through.

Comment on lines +24 to +25
- name: Enable Auto-Merge for Safe Updates
id: enable-auto-merge
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

ci/prow/* presence is not enforced before auto-merge is enabled.

This path goes from metadata lookup straight to enablePullRequestAutoMerge; there is no status/check-run query anywhere in the job. Any patch/minor Dependabot PR will therefore be put on the auto-merge path even when no ci/prow/* check exists for the head SHA, which is looser than the PR objective. Add a fail-closed guard before the GraphQL mutation.

Also applies to: 87-113

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/dependabot-auto-merge.yml around lines 24 - 25, The
workflow step with id enable-auto-merge calls enablePullRequestAutoMerge without
verifying that ci/prow/* checks exist; add a fail-closed guard before invoking
enablePullRequestAutoMerge by querying the PR head SHA's check-runs/statuses
(e.g., using the Checks API or a GraphQL statusLookup) and ensure at least one
ci/prow/* check-run or required status is present; if none are found, skip or
abort auto-merge to enforce the ci/prow/* presence. Use the same guard logic for
the earlier block referenced (lines 87-113) and keep the step name/id
(enable-auto-merge / enablePullRequestAutoMerge) so the mutation is only called
when the check-run guard passes.

Comment on lines +24 to +28
- name: Enable Auto-Merge for Safe Updates
id: enable-auto-merge
if: |
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
steps.metadata.outputs.update-type == 'version-update:semver-minor'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🌐 Web query:

What output from the current dependabot/fetch-metadata@v2 action should a workflow use to distinguish digest updates from semver patch/minor/major updates?

💡 Result:

To distinguish digest updates from semver (major, minor, patch) updates using the dependabot/fetch-metadata@v2 action, you should use the update-type output [1][2]. The update-type output provides the highest semver change being made by the pull request [1][2]. When Dependabot performs a digest update (e.g., updating a Docker image by its SHA), the update-type output will typically be empty or null, as it does not correspond to a semver version increment [3]. In contrast, semver updates will return values such as: - version-update:semver-major [1] - version-update:semver-minor [1] - version-update:semver-patch [1] To implement this in a GitHub Actions workflow, you can check the value of this output [1]: - To target semver updates: if: ${{ steps.dependabot-metadata.outputs.update-type!= '' }} - To target digest updates (where update-type is null or empty): if: ${{ steps.dependabot-metadata.outputs.update-type == '' }} Note that for more complex scenarios, such as grouped updates or specific package ecosystems, you may also want to inspect the updated-dependencies-json output, which provides a detailed JSON structure containing the full information about each updated dependency, including the previous and new versions [1][2].

Citations:


🏁 Script executed:

# Look for any PR description, issue, or documentation that states the objective
git log --oneline --all -20

Repository: openshift/certman-operator

Length of output: 1528


🏁 Script executed:

# Check for any documentation about the workflow's intended behavior
fd -t f -e md | xargs rg -l "digest.*auto" -i 2>/dev/null || echo "No direct matches for digest auto-merge objective"

Repository: openshift/certman-operator

Length of output: 120


🏁 Script executed:

# Check the commit or PR that introduced this workflow
git log --oneline -- ".github/workflows/dependabot-auto-merge.yml" | head -5

Repository: openshift/certman-operator

Length of output: 125


🏁 Script executed:

# Get the full commit message for the workflow introduction
git show 80fe2a8 --format=fuller -s

Repository: openshift/certman-operator

Length of output: 584


🏁 Script executed:

# Search for any ROSA-745 references or related documentation
rg -i "rosa-745|digest.*update" --type md

Repository: openshift/certman-operator

Length of output: 52


Add digest update detection to the auto-merge gate.

The PR objective explicitly requires patch, minor, and digest updates to auto-merge, but this condition only checks for semver patch/minor. Digest updates produce an empty update-type and will not match either condition, causing them to fall through to the "not eligible" branch.

Add || steps.metadata.outputs.update-type == '' to detect digest updates:

Diff
      - name: Enable Auto-Merge for Safe Updates
        id: enable-auto-merge
        if: |
          steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
          steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
          steps.metadata.outputs.update-type == ''
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/dependabot-auto-merge.yml around lines 24 - 28, The
auto-merge job gating condition in the step with id enable-auto-merge only
checks for semver patch/minor updates and thus misses digest updates (which
yield an empty update-type); update the if condition that references
steps.metadata.outputs.update-type to also accept an empty string by adding ||
steps.metadata.outputs.update-type == '' so digest updates are considered
eligible for auto-merge.

@MitaliBhalla
Copy link
Copy Markdown
Author

MitaliBhalla commented May 25, 2026

On hold — pausing this per-repo workflow rollout while we switch to the boilerplate / MintMaker (Renovate) path for ROSA-745. Please do not merge; we will close or reopen after the platform PR lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant