
Description
My team relies on the branch-deploy functionality to prevent deploying branches that are out of date (i.e. update_branch = "warn"
). We noticed recently that there's a nuance to this though: it only prevents deploying PRs that are out of date with their base branch.
My team uses a stacked diffs workflow; the main relevant effect of that here is that it's not uncommon for branches to be stacked on top of each other - i.e. featureA
's base branch is main
, but featureB
's base branch is featureA
. As-is, branch deploy would allow us to deploy featureB
even if the stack including featureA
and featureB
is out of date when comparing against main
.
For the time being we have a workaround by just adding our own condition to our action that checks the result of
git rev-list --left-right --count origin/main..origin/featureB | awk '{print $2}'
but in an ideal world, it would be great if this could be implemented by branch-deploy internally.
Something along the lines of an input like outdated_mode
with options pr_base
and default_branch
(defaulting to pr_base
to prevent this being a breaking change).