File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ name: "Dependabot auto-merge"
33on : pull_request
44
55permissions :
6+ actions : write
67 contents : write
78 pull-requests : write
89
@@ -21,11 +22,14 @@ jobs:
2122 # Checking the PR title is a poor substitute for the actual PR changes
2223 # but as long as this is used only with dependabot PRs,
2324 # it should be safe to assume that the title is not misleading.
24- regexp='^Bump .* from [0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)? to [0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?( in .*)?$'
25- if [[ "${PR_TITLE}" =~ $regexp ]]; then
26- gh pr review --approve "${PR_URL}"
25+ regexp='^Bump .* from [0-9]+\.[0-9]+(\.[0-9]+)?(\.[0-9]+)?(\-[a-z]+)? to [0-9]+\.[0-9]+(\.[0-9]+)?(\.[0-9]+)?(\-[a-z]+)?( in .*)?$'
26+ if ! [[ "${PR_TITLE}" =~ ${regexp} ]] ; then
27+ echo 'Non-semver upgrade, needs manual review.'
28+ elif [ "${BASH_REMATCH[3]}" != "${BASH_REMATCH[6]}" ] ; then
29+ echo 'Version suffixes do not match, needs manual review.'
2730 else
28- echo 'Non-semver upgrade needs manual review'
31+ echo 'Automated review approval.'
32+ gh pr review --approve "${PR_URL}"
2933 fi
3034 gh pr merge --auto --squash "${PR_URL}"
3135 env :
You can’t perform that action at this time.
0 commit comments