]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
ci: add automerge
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 28 Sep 2020 14:14:34 +0000 (16:14 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 28 Sep 2020 14:14:34 +0000 (16:14 +0200)
.github/workflows/automerge.yml [new file with mode: 0644]

diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml
new file mode 100644 (file)
index 0000000..d1f1641
--- /dev/null
@@ -0,0 +1,24 @@
+on: pull_request
+
+name: Auto merge Dependabot
+
+jobs:
+  automerge:
+    needs: [Test, Lint]
+    runs-on: ubuntu-latest
+    if: |
+      github.actor == 'dependabot[bot]' &&
+      github.event_name == 'pull_request' &&
+      startsWith(github.event.pull_request.title, 'chore(deps-dev):')
+    steps:
+      - name: '@dependabot merge'
+        uses: actions/github-script@v2
+        with:
+          github-token: ${{secrets.GITHUB_TOKEN}}
+          script: |
+            await github.issues.createComment({
+              owner: context.payload.repository.owner.login,
+              repo: context.payload.repository.name,
+              issue_number: context.payload.pull_request.number,
+              body: '@dependabot merge'
+            })