Skip to content

Commit 92f3b5b

Browse files
committed
e fix issue with auto-merge
1 parent 2066321 commit 92f3b5b

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Diff for: .github/workflows/test.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,7 @@ jobs:
4141
github.actor == 'dependabot[bot]' &&
4242
github.event_name == 'pull_request'
4343
run: |
44-
if [[ -z "${GITHUB_TOKEN}" ]]; then
45-
gh pr merge --auto --rebase "$PR_URL"
46-
else
47-
echo 'if you want github to automatically merge pull requests from dependdabot, you need to create a'
48-
echo 'personal access token (public_repo) and assign it to setings -> secrets -> dependabot -> GH_ACTION_TOKEN'
49-
fi
44+
./merge_dependabot.sh
5045
env:
5146
PR_URL: ${{github.event.pull_request.html_url}}
5247
# this secret needs to be in the settings.secrets.dependabot

Diff for: merge_dependabot.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
gh pr merge --auto --rebase "$PR_URL"
4+
5+
if [ $? -ne 0 ]
6+
then
7+
echo 'if you want github to automatically merge pull requests from dependabot, you need to create a'
8+
echo 'personal access token (public_repo) and assign it to settings -> secrets -> dependabot -> GH_ACTION_TOKEN'
9+
fi
10+

0 commit comments

Comments
 (0)