Replies: 2 comments 2 replies
-
Had an ephiphany that I could avoid complicated solutions by setting dependabot's There will only ever be one open Dependabot PR which means I can allow dependabot to update itself without worrying about excess CI runs due to parallel Dependabot PRs. The overhead of only having 1 at a time is minimal due to auto merging especially if it happens in the middle of the night. It'd still be good to get the questions above answered (since a busy repo would still want to a complete solution) but for now I think I can just go with a non queue based solution as proposed in a prior discussion: pull_request_rules:
- name: Auto-merge dependabot
conditions:
# Also covered by Github protections but this reduces noise from mergify.
- '#approved-reviews-by>=1'
- author=dependabot[bot]
- '#commits-behind=0'
# Don't auto-merge PRs where non dep change had to be commited as well
- '#commits=1'
actions:
merge:
method: squash |
Beta Was this translation helpful? Give feedback.
-
Hi @melink14 To answer your questions:
I'll add both items on our roadmap. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Background
With the advent of Github dependency review action and Dependabot metadata validation action, I feel safe enough to allow mergify to auto merge these PRs once checks pass.
As a bonus, I plan to disable Dependabot auto-rebase to allow mergify to attempt to update PRs only when they're at the head of the queue. (I will have Mergify send Dependabot
recreate
command on theconflict
condition.)For normal PRs, I use title+body template since I can enforce it matches convention and it can be easily changed to be canonical even as PR changes with review.
Dependabot PR bodies are special given they have a ton of extra metadata and don't match the commit message but they'll end up with extra merge commits when Mergify updates them so I can't use the default Github message since I beleive it appends all commit messages when there are more than one.
Questions
squash
action has afirst-commit
possibility (and no deprecation message) but the commit message documentation doesnt' mention how to emulate this using jinja templates. There's also no documentation about the shape of thecommits
attribute.Since you access jinja lists with normal indexing, I tried just getting the first item in the commits list but that gave the following validation error:
I also tried to use
first
filter, but got error that it wasn't a sequence. What should I do here?Beta Was this translation helpful? Give feedback.
All reactions