From f2f542d09395edad0dd6d7012eec4c7b69ce6f5f Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 3 Oct 2022 09:39:31 +0200 Subject: [PATCH] Allow auto merging of Dependabot JS minor or patch Reducing the time consuming of merging deps which shouldn't break the project --- .github/workflows/dependabot-automerge-js.yml | 25 +++++++++++++++++++ yarn.lock | 7 +----- 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/dependabot-automerge-js.yml diff --git a/.github/workflows/dependabot-automerge-js.yml b/.github/workflows/dependabot-automerge-js.yml new file mode 100644 index 000000000..31483566a --- /dev/null +++ b/.github/workflows/dependabot-automerge-js.yml @@ -0,0 +1,25 @@ +name: Auto-merge Dependabot JS +on: pull_request_target + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1.3.1 + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + - name: Approve and merge minor updates + if: ${{ steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch') }} + run: | + gh pr review --approve "$PR_URL" + gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/yarn.lock b/yarn.lock index 6c722cd34..630af901d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,11 +22,6 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.3.tgz#707b939793f867f5a73b2666e6d9a3396eb03151" integrity sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw== -"@babel/compat-data@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.3.tgz#707b939793f867f5a73b2666e6d9a3396eb03151" - integrity sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw== - "@babel/core@^7.19.3": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.3.tgz#2519f62a51458f43b682d61583c3810e7dcee64c" @@ -81,7 +76,7 @@ "@babel/helper-explode-assignable-expression" "^7.18.6" "@babel/types" "^7.18.6" -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.19.0", "@babel/helper-compilation-targets@^7.19.1", "@babel/helper-compilation-targets@^7.19.3": +"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.19.0", "@babel/helper-compilation-targets@^7.19.3": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz#a10a04588125675d7c7ae299af86fa1b2ee038ca" integrity sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==