Skip to content

Commit 5a19c11

Browse files
authored
ci(dependabot): update dependabot PRs only if opened by dependabot (#36)
1 parent ca9a5ed commit 5a19c11

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Diff for: .github/workflows/dependabot-approve-and-auto-merge.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ permissions:
66
jobs:
77
pull-request-title-change:
88
runs-on: ubuntu-latest
9+
if: ${{ github.actor == 'dependabot[bot]' }}
910
steps:
1011
# Checkout the source code
1112
- name: 'Checkout source code'
@@ -23,18 +24,13 @@ jobs:
2324
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2425
PR_URL: ${{github.event.pull_request.html_url}}
2526
run: |
26-
echo $TITLE
2727
title_pt2="${TITLE##*:}"
2828
title_pt1="${TITLE%%:*}"
2929
gh pr checkout "$PR_URL" # sets the upstream metadata for `gh pr status`
3030
packagename="${{ steps.dependabot-fetch.outputs.dependency-names }}"
31-
#echo "packagename is $packagename"
32-
#echo "$title_pt1"
33-
#echo "$title_pt2"
3431
parensOpen="("
3532
parensClose="):"
3633
pr_title=$title_pt1$parensOpen$packagename$parensClose$title_pt2
37-
echo "FINAL TITLE: $pr_title"
3834
gh pr edit "$PR_URL" --title "$pr_title"
3935
4036
# Auto merge Dependabot PRs for:

0 commit comments

Comments
 (0)