Skip to content

Commit

Permalink
Merge pull request #1690 from microsoftgraph/feature/auto-merge
Browse files Browse the repository at this point in the history
- adds auto merge workflow
  • Loading branch information
baywet committed Mar 8, 2023
2 parents 7a2be45 + 09c31fd commit fd6f353
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Auto-merge dependabot updates

on:
pull_request:
branches: [ main ]

permissions:
pull-requests: write
contents: write

jobs:

dependabot-merge:

runs-on: ubuntu-latest

if: ${{ github.actor == 'dependabot[bot]' }}

steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.3.6
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Enable auto-merge for Dependabot PRs
# Only if version bump is not a major version change
if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit fd6f353

Please sign in to comment.