Bump dnspython from 2.2.1 to 2.6.1 in /Script #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/fetch-metadata@v1.3.3 | |
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 }} |