Skip to content

Commit

Permalink
Merge pull request #235 from wix-incubator/fer0x/auto-merge-dependabot
Browse files Browse the repository at this point in the history
ci: auto-merge Dependabot PRs
  • Loading branch information
Fer0x authored Oct 2, 2023
2 parents a319e63 + 5505ea8 commit 2a24292
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

# configs
.github @denysdovhan

# Hack for Dependabot - do not assign any reviewer automatically
yarn.lock
10 changes: 8 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'monthly'
open-pull-requests-limit: 10
interval: 'daily'
open-pull-requests-limit: 25
ignore:
# Ignore major updates for npm packages
- dependency-name: '*'
update-types: ['version-update:semver-major']
# Maintain dependencies for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
open-pull-requests-limit: 25
21 changes: 21 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
push:
pull_request:

permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -26,3 +30,20 @@ jobs:

- name: 🧪 Run Tests
run: yarn test

dependabot:
name: Dependabot auto-merge
needs: [validate]
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Enable auto-merge for Dependabot PRs
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 2a24292

Please sign in to comment.