Skip to content

Commit

Permalink
ci(dependabot): update dependabot PRs only if opened by dependabot (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschach authored Nov 9, 2023
1 parent ca9a5ed commit 5a19c11
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/dependabot-approve-and-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ permissions:
jobs:
pull-request-title-change:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
# Checkout the source code
- name: 'Checkout source code'
Expand All @@ -23,18 +24,13 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{github.event.pull_request.html_url}}
run: |
echo $TITLE
title_pt2="${TITLE##*:}"
title_pt1="${TITLE%%:*}"
gh pr checkout "$PR_URL" # sets the upstream metadata for `gh pr status`
packagename="${{ steps.dependabot-fetch.outputs.dependency-names }}"
#echo "packagename is $packagename"
#echo "$title_pt1"
#echo "$title_pt2"
parensOpen="("
parensClose="):"
pr_title=$title_pt1$parensOpen$packagename$parensClose$title_pt2
echo "FINAL TITLE: $pr_title"
gh pr edit "$PR_URL" --title "$pr_title"
# Auto merge Dependabot PRs for:
Expand Down

0 comments on commit 5a19c11

Please sign in to comment.