Skip to content

Commit f9d3351

Browse files
committed
ci(automerge): support dependabot groups
1 parent 7c65cb4 commit f9d3351

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎.github/workflows/automerge.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ jobs:
2424
# Checking the PR title is a poor substitute for the actual PR changes
2525
# but as long as this is used only with dependabot PRs,
2626
# it should be safe to assume that the title is not misleading.
27-
regexp='[Bb]ump .* from [0-9]+\.[0-9]+(\.[0-9]+)?(\.[0-9]+)?(\-[a-z]+)? to [0-9]+\.[0-9]+(\.[0-9]+)?(\.[0-9]+)?(\-[a-z]+)?( in .*)?$'
28-
if ! [[ "${PR_TITLE}" =~ ${regexp} ]] ; then
27+
regexp_group='[Bb]ump the .* group with [0-9]+ updates$'
28+
regexp_semver='[Bb]ump .* from [0-9]+\.[0-9]+(\.[0-9]+)?(\.[0-9]+)?(\-[a-z]+)? to [0-9]+\.[0-9]+(\.[0-9]+)?(\.[0-9]+)?(\-[a-z]+)?( in .*)?$'
29+
if [[ "${PR_TITLE}" =~ ${regexp_group} ]] ; then
30+
echo 'Automated group approval.'
31+
gh pr review --approve "${PR_URL}"
32+
elif ! [[ "${PR_TITLE}" =~ ${regexp_semver} ]] ; then
2933
echo 'Non-semver upgrade, needs manual review.'
3034
elif [ "${BASH_REMATCH[3]}" != "${BASH_REMATCH[6]}" ] ; then
3135
echo 'Version suffixes do not match, needs manual review.'

0 commit comments

Comments
 (0)