Skip to content

Add call to dependabot-automerge workflow#259

Draft
leynos wants to merge 1 commit intomainfrom
terragon/add-dependabot-automerge-rus099
Draft

Add call to dependabot-automerge workflow#259
leynos wants to merge 1 commit intomainfrom
terragon/add-dependabot-automerge-rus099

Conversation

@leynos
Copy link
Owner

@leynos leynos commented Jan 17, 2026

Summary

  • Adds a new Dependabot auto-merge workflow that delegates to the shared action
  • Ensures Dependabot PRs can be auto-merged after checks pass, using a centralized workflow

Changes

New Workflow

  • .github/workflows/dependabot-automerge.yml: New workflow that
    • listens on pull_request_target for opened, reopened, synchronize, ready_for_review, labeled
    • supports manual dispatch via workflow_dispatch
    • sets permissions: contents: write, pull-requests: write, checks: read, statuses: read
    • runs only when the actor is dependabot[bot]
    • calls the reusable workflow at leynos/shared-actions@235d2d0

Rationale

  • Centralizes Dependabot auto-merge behavior to a shared, tested workflow, reducing drift across repositories.

Test Plan

  • Trigger workflow_dispatch to verify it invokes the reusable workflow
  • Create a Dependabot PR to exercise the automerge path (in a safe/isolated PR)
  • Confirm PR auto-merges automatically when the shared workflow criteria are met (as defined by the shared action)

Notes

  • The workflow is intentionally gated to dependabot[bot] to avoid unintended auto-merges from other actors
  • The shared workflow hash is pinned for stability

🌿 Generated by Terry


ℹ️ Tag @terragon-labs to ask questions and address PR feedback

📎 Task: https://www.terragonlabs.com/task/78a84312-6598-41b5-be67-f2608225d98b

Summary by Sourcery

Build:

  • Introduce a dependabot-automerge GitHub Actions workflow that triggers on Dependabot pull_request_target events and delegates to a shared auto-merge workflow.

Introduce a new GitHub Actions workflow to automatically merge Dependabot pull requests under specified conditions to streamline dependency updates.

Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 17, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a new GitHub Actions workflow that auto-merges Dependabot pull requests by delegating to a centralized reusable workflow with restricted permissions and actor gating.

Sequence diagram for Dependabot auto-merge reusable workflow invocation

sequenceDiagram
    actor DependabotBot
    participant GitHubRepo
    participant GHActions as GitHubActions
    participant DependabotAutomergeWorkflow as DependabotAutomergeWorkflow
    participant SharedWorkflow as SharedAutomergeWorkflow

    DependabotBot->>GitHubRepo: Open or update pull_request
    GitHubRepo-->>GHActions: pull_request_target event
    GHActions->>DependabotAutomergeWorkflow: Evaluate trigger (opened, reopened, synchronize, ready_for_review, labeled)
    DependabotAutomergeWorkflow->>DependabotAutomergeWorkflow: Check condition github.actor == dependabot[bot]
    alt actor is dependabot[bot]
        DependabotAutomergeWorkflow->>SharedWorkflow: Reusable workflow call
        SharedWorkflow->>GitHubRepo: Read checks and statuses
        SharedWorkflow->>GitHubRepo: Update PR (merge when criteria satisfied)
    else actor is not dependabot[bot]
        DependabotAutomergeWorkflow-->>GHActions: Job skipped
    end

    actor Maintainer
    Maintainer->>GHActions: workflow_dispatch (manual trigger)
    GHActions->>DependabotAutomergeWorkflow: Run on workflow_dispatch
    DependabotAutomergeWorkflow->>DependabotAutomergeWorkflow: Check condition github.actor == dependabot[bot]
    DependabotAutomergeWorkflow-->>GHActions: Usually skipped (actor is maintainer)
Loading

File-Level Changes

Change Details Files
Introduce a Dependabot auto-merge workflow that delegates to a shared reusable workflow.
  • Create a new GitHub Actions workflow triggered on pull_request_target events (opened, reopened, synchronize, ready_for_review, labeled) and manual workflow_dispatch.
  • Configure workflow permissions to allow writing contents and pull requests, and reading checks and statuses.
  • Restrict the workflow job execution to runs where the GitHub actor is dependabot[bot].
  • Invoke the shared dependabot-automerge reusable workflow pinned to a specific commit hash in the leynos/shared-actions repository.
.github/workflows/dependabot-automerge.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch terragon/add-dependabot-automerge-rus099

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

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