chore: add Dependabot auto-merge workflow for patch/minor updates#93
chore: add Dependabot auto-merge workflow for patch/minor updates#93
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agent-Logs-Url: https://github.com/TrustSignal-dev/TrustSignal/sessions/b0fa78a1-39c3-4206-a500-d945a4fe3caf Co-authored-by: chrismaz11 <24700273+chrismaz11@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec2959df52
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds an automation workflow to reduce Dependabot patch/minor PR backlog by auto-approving and enabling squash auto-merge once required CI checks pass, while leaving major updates for manual review.
Changes:
- Introduces a
pull_request_targetworkflow that runs only for Dependabot-triggered events. - Uses
dependabot/fetch-metadata@v2to detect semver update type. - Auto-approves and enables auto-merge (squash) for patch/minor updates.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/TrustSignal-dev/TrustSignal/sessions/017b9c68-5c37-458b-90a9-f1ef7753e4c5 Co-authored-by: chrismaz11 <24700273+chrismaz11@users.noreply.github.com>
…auto-merge workflow Agent-Logs-Url: https://github.com/TrustSignal-dev/TrustSignal/sessions/871605c3-b8d7-4b1f-93bc-181aee1996b8 Co-authored-by: chrismaz11 <24700273+chrismaz11@users.noreply.github.com>
Dependabot PRs for patch/minor bumps pile up waiting for manual approval due to branch protection requiring 1 review + 9 status checks. This adds a workflow to auto-approve and squash-merge those PRs once CI passes, while leaving major bumps for human review.
Summary
.github/workflows/dependabot-auto-merge.ymltriggered onpull_request_target, scoped tobranches: [master]andtypes: [opened, synchronize, reopened, ready_for_review]to avoid firing on closed PRs or non-default branchesgithub.actor == 'dependabot[bot]'andgithub.event.pull_request.user.login == 'dependabot[bot]'to strictly target Dependabot-authored PRsdependabot/fetch-metadatapinned to commit SHAc9c4182(v2.3.0) instead of a moving tag, consistent with thescorecard.ymlsupply-chain pinning patterngh pr review --approve+gh pr merge --auto --squash; auto-merge fires only after all required branch-protection checks passgh pr review --approveandgh pr merge --auto --squashsteps emit a::error::workflow annotation with a direct link to the relevant repo setting if they fail (e.g. due to a 403), making misconfiguration immediately diagnosable in the Actions UIAI Disclosure (optional)
Review Checklist
Security impact:
pull_request_targetis scoped tobranches: [master]and open PR event types only. The dualdependabot[bot]guard (actor + PR author) ensures the job cannot be triggered by a maintainer re-running the workflow.dependabot/fetch-metadatais pinned to a full commit SHA to mitigate supply-chain risk. No elevated token scopes beyondcontents: writeandpull-requests: writeare granted. Major version bumps are explicitly excluded from auto-merge.Original prompt
Problem
The TrustSignal repo has branch protection rules requiring 1 approving review + 9 status checks before merging. This means Dependabot PRs for safe patch/minor dependency bumps pile up and require manual approval each time. Currently there are 5 blocked Dependabot PRs (#90, #89, #87, #42, #38).
Solution
Create a new GitHub Actions workflow at
.github/workflows/dependabot-auto-merge.ymlthat:pull_request_targeteventsdependabot[bot]dependabot/fetch-metadata@v2to determine the update typegh pr review --approvefor patch and minor version updatesgh pr merge --auto --squashfor patch and minor updatesWorkflow file:
.github/workflows/dependabot-auto-merge.ymlRequirements
.github/workflows/dependabot-auto-merge.ymlsemver-patchandsemver-minorupdatespull_request_target(notpull_request) since Dependabot PRs come from forks/bot branchesmaster(notmain) for this repoThe following is the prior conversation context from the user's chat exploration (may be truncated):
User: fix security vaul
Assistant: It looks like your message got cut off. Could you please provide more details about what you'd like to do?
Based on what I can see, it seems like you might want to:
Could you clarify:
owner/repoformat)User: can you go through all of the issues and pr for trustsignal-dev and resolve what you. can and what you can t resollvelet me know what tod
Assistant:
Let me start by finding the repository and then go through all the issues and PRs.
Assistant: Now let me fetch all open issues and PRs from the repos that have them (TrustSignal has 15, v0-signal-new has 3, TrustSignal-App has 2):
Assistant: Here's a full audit of all 20 open PRs across the 3 active repos in the TrustSignal-dev org. I've categorized each by what I can resolve vs. what needs your manual action.
📊 Full Inventory
Repo 1:
TrustSignal-dev/TrustSignal— 15 open PRs (all PRs, no standalone issues)