This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
66 lines (62 loc) · 3.93 KB
/
auto-merge-dependabot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Dependabot auto-merge
on: pull_request
permissions:
pull-requests: write
contents: write
repository-projects: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
# Automatically merge the following dependency upgrades:
if: "${{ steps.metadata.outputs.dependency-names == '@actions/core' ||
steps.metadata.outputs.dependency-names == '@automattic/color-studio' ||
steps.metadata.outputs.dependency-names == '@babel/cli' ||
steps.metadata.outputs.dependency-names == '@babel/core' ||
steps.metadata.outputs.dependency-names == '@babel/plugin-proposal-class-properties' ||
steps.metadata.outputs.dependency-names == '@babel/plugin-syntax-jsx' ||
steps.metadata.outputs.dependency-names == '@babel/polyfill' ||
steps.metadata.outputs.dependency-names == '@types/classnames' ||
steps.metadata.outputs.dependency-names == '@types/dinero.js' ||
steps.metadata.outputs.dependency-names == '@types/dompurify' ||
steps.metadata.outputs.dependency-names == '@types/gtag.js' ||
steps.metadata.outputs.dependency-names == '@types/jest' ||
steps.metadata.outputs.dependency-names == '@types/jest-environment-puppeteer' ||
steps.metadata.outputs.dependency-names == '@types/jquery' ||
steps.metadata.outputs.dependency-names == '@types/lodash' ||
steps.metadata.outputs.dependency-names == '@types/puppeteer' ||
steps.metadata.outputs.dependency-names == '@types/react' ||
steps.metadata.outputs.dependency-names == '@types/react-dom' ||
steps.metadata.outputs.dependency-names == '@types/wordpress__block-editor' ||
steps.metadata.outputs.dependency-names == '@types/wordpress__blocks' ||
steps.metadata.outputs.dependency-names == '@types/wordpress__data' ||
steps.metadata.outputs.dependency-names == '@types/wordpress__data-controls' ||
steps.metadata.outputs.dependency-names == '@types/wordpress__editor' ||
steps.metadata.outputs.dependency-names == '@types/wordpress__notices' ||
steps.metadata.outputs.dependency-names == '@typescript-eslint/eslint-plugin' ||
steps.metadata.outputs.dependency-names == '@typescript-eslint/parser' ||
steps.metadata.outputs.dependency-names == 'chalk' ||
steps.metadata.outputs.dependency-names == 'circular-dependency-plugin' ||
steps.metadata.outputs.dependency-names == 'commander' ||
steps.metadata.outputs.dependency-names == 'copy-webpack-plugin' ||
steps.metadata.outputs.dependency-names == 'eslint-import-resolver-typescript' ||
steps.metadata.outputs.dependency-names == 'gh-pages' ||
steps.metadata.outputs.dependency-names == 'markdown-it' ||
steps.metadata.outputs.dependency-names == 'promptly' ||
steps.metadata.outputs.dependency-names == 'react-docgen' ||
steps.metadata.outputs.dependency-names == 'wp-types'
}}"
run: |
gh pr edit --add-label 'dependencies-auto-merged' "$PR_URL"
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}