Integrate dependabot-automerge workflow into CI#14
Draft
leynos wants to merge 1 commit into
Draft
Conversation
Introduce a new job in the GitHub Actions workflow to automatically merge Dependabot PRs when possible. This job runs only when the actor is Dependabot and sets the appropriate permissions for contents, pull requests, checks, and statuses. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a Dependabot-specific automerge job to the CI workflow that delegates to a shared reusable workflow, scoped to run only for Dependabot PRs with appropriate write/read permissions. Sequence diagram for Dependabot PR automerge workflowsequenceDiagram
actor Dependabot_bot
participant GitHub as GitHub_Repo
participant CI as CI_Workflow_ci_yml
participant GA as GitHub_Actions_Runner
participant SA as Shared_Automerge_Workflow
Dependabot_bot->>GitHub: Create_or_update_Dependency_PR
GitHub-->>CI: Trigger_CI_on_PR_event
CI->>GA: Start_job_build_test
GA->>GA: Run_tests_and_other_checks
GA-->>GitHub: Report_checks_and_statuses
Note over CI,GA: GitHub_actor == dependabot_bot
CI->>GA: Start_job_dependabot_automerge
GA->>SA: Reuse_workflow_dependabot_automerge_yaml
SA->>GitHub: Read_checks_and_statuses
SA->>GitHub: Verify_required_checks_passed
SA->>GitHub: Merge_PR_using_contents_write_and_pull_requests_write
GitHub-->>Dependabot_bot: PR_merged_notification
Flow diagram for CI workflow with Dependabot-specific automerge jobflowchart TD
A[PR_opened_or_updated] --> B{Actor_is_dependabot_bot}
B -->|no| C[Run_build_test_job]
C --> D[Report_checks_statuses]
D --> E[Wait_for_manual_merge]
B -->|yes| C
D --> F[Start_dependabot_automerge_job]
F --> G[Call_shared_dependabot_automerge_workflow]
G --> H{All_required_checks_pass}
H -->|no| I[Leave_PR_open]
H -->|yes| J[Merge_PR_automatically]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
CI Configuration
Introduced a new job
dependabot-automergein .github/workflows/ci.ymlJob only runs when the actor is the Dependabot bot:
if: ${{ github.actor == 'dependabot[bot]' }}Permissions granted:
Uses the shared automerge workflow:
uses: leynos/shared-actions/.github/workflows/dependabot-automerge.yml@235d2d07b9a321364a742310873f6732d7228e72Behavior
Test plan
🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/d4b73e3c-3910-453e-8681-91f0455ab3d5
Summary by Sourcery
CI: