Skip to content

Bump cryptography from 39.0.1 to 41.0.2 #3

Bump cryptography from 39.0.1 to 41.0.2

Bump cryptography from 39.0.1 to 41.0.2 #3

name: Dependabot pull request approve and merge
on: pull_request_target
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
name: Dependabot
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: |
gh pr review --approve "${PR_URL}"
gh pr edit "${PR_URL}" --add-label "dependabot: auto approve"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-merge non major updates
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: |
gh pr merge --auto --squash "${PR_URL}"
gh pr edit "${PR_URL}" --add-label "dependabot: auto merge"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment + label major updates
if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major' }}
run: |
gh pr comment "${PR_URL}" --body "I'm **not approving** this PR because **it includes a major update of a dependency**"
gh pr edit "${PR_URL}" --add-label "dependabot: manual approve"
gh pr edit "${PR_URL}" --add-label "dependabot: manual merge"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}