This is an automated email from the ASF dual-hosted git repository.
xiatian pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/eventmesh-dashboard.git
The following commit(s) were added to refs/heads/main by this push:
new 33b5c1a [ISSUE #128] Use GitHub CLI `comment` to auto-merge a
Dependabot PR (#129)
33b5c1a is described below
commit 33b5c1a05882ec43fdf51feee1c4011dbacc1935
Author: Pil0tXia <[email protected]>
AuthorDate: Thu Apr 18 10:54:16 2024 +0800
[ISSUE #128] Use GitHub CLI `comment` to auto-merge a Dependabot PR (#129)
* Use GitHub CLI `comment`
* Adjust back interval
---
.github/dependabot.yml | 2 +-
.../workflows/{auto-merge-dependabot.yml => auto-dependabot.yml} | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index d59aae7..5fe85e6 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -21,7 +21,7 @@ updates:
directory: "/"
open-pull-requests-limit: 10
schedule:
- interval: "daily" # TODO Temporary daily for testing auto-merge
+ interval: "weekly"
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-major" ]
diff --git a/.github/workflows/auto-merge-dependabot.yml
b/.github/workflows/auto-dependabot.yml
similarity index 78%
rename from .github/workflows/auto-merge-dependabot.yml
rename to .github/workflows/auto-dependabot.yml
index f0d8fde..e1a2913 100644
--- a/.github/workflows/auto-merge-dependabot.yml
+++ b/.github/workflows/auto-dependabot.yml
@@ -23,6 +23,8 @@ permissions:
pull-requests: write
jobs:
+ #
https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions
+ # Pull request Auto merge is not enabled for this repository
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
@@ -33,15 +35,16 @@ jobs:
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- - name: Approve a PR
+ - name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- - name: Enable auto-merge for Dependabot PRs
+ # comment '@dependabot merge' to merge the PR
+ - name: Comment and Merge PR
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
- run: gh pr merge --auto --merge "$PR_URL"
+ run: gh pr comment $PR_URL -b "@dependabot merge"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]