Skip to content

Commit

Permalink
feat: add dependabot for managing live preview (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
MayaGillilan authored Sep 28, 2023
2 parents d5693e1 + d590da7 commit dca1c85
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
version: 2

registries:
npm-registry-registry-npmjs-org:
type: npm-registry
url: https://registry.npmjs.org
token: '${{secrets.NPM_REGISTRY_REGISTRY_NPMJS_ORG_TOKEN}}'

updates:
# main branch
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
time: '05:00'
timezone: UTC
commit-message:
prefix: build
include: scope
labels:
- 'dependencies'
- 'dependabot'
open-pull-requests-limit: 2
reviewers:
- 'contentful/team-tolkien'
registries:
- npm-registry-registry-npmjs-org
allow:
- dependency-name: '@contentful/live-preview'

- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
time: '05:00'
timezone: UTC
open-pull-requests-limit: 15
commit-message:
prefix: build
include: scope

# main-private branch
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
time: '05:00'
timezone: UTC
commit-message:
prefix: build
include: scope
labels:
- 'dependencies'
- 'dependabot'
- 'main-private'
open-pull-requests-limit: 2
reviewers:
- 'contentful/team-tolkien'
registries:
- npm-registry-registry-npmjs-org
allow:
- dependency-name: '@contentful/live-preview'
target-branch: 'main-private'

- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
time: '05:00'
timezone: UTC
open-pull-requests-limit: 15
commit-message:
prefix: build
include: scope
target-branch: 'main-private'
15 changes: 15 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'dependabot approve-and-request-merge'

on: pull_request_target

jobs:
worker:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: contentful/github-auto-merge@v1
with:
VAULT_URL: ${{ secrets.VAULT_URL }}

0 comments on commit dca1c85

Please sign in to comment.