Skip to content

ci(deps): bump google/osv-scanner-action from 2.1.0 to 2.2.1 #64

ci(deps): bump google/osv-scanner-action from 2.1.0 to 2.2.1

ci(deps): bump google/osv-scanner-action from 2.1.0 to 2.2.1 #64

Workflow file for this run

---
name: "Dependabot auto-merge"
on: pull_request
permissions:
actions: write
contents: write
pull-requests: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge for Dependabot PRs
shell: bash
run: |
# Checking the PR title is a poor substitute for the actual PR changes
# but as long as this is used only with dependabot PRs,
# it should be safe to assume that the title is not misleading.
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 .*)?$'
if ! [[ "${PR_TITLE}" =~ ${regexp} ]] ; then
echo 'Non-semver upgrade, needs manual review.'
elif [ "${BASH_REMATCH[3]}" != "${BASH_REMATCH[6]}" ] ; then
echo 'Version suffixes do not match, needs manual review.'
else
echo 'Automated review approval.'
gh pr review --approve "${PR_URL}"
fi
gh pr merge --auto --squash "${PR_URL}"
env:
PR_TITLE: ${{github.event.pull_request.title}}
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}