Skip to content

Commit

Permalink
Update manual-dependabot.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hknokh committed Apr 30, 2024
1 parent 1cbb29a commit 2c31c00
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/manual-dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Manual Dependabot Recreate
name: Manual Dependabot

on:
workflow_dispatch:

jobs:
recreate_dependabot_prs:
manage_dependabot_prs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Close Dependabot PRs and delete branches
- name: Close Dependabot PRs
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -30,12 +30,14 @@ jobs:
pull_number: pr.number,
state: 'closed'
});
// Delete the branch
await github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'heads/' + pr.head.ref
});
}
}
- name: Trigger Dependabot by modifying a file
run: |
echo "Dependabot trigger at $(date)" > .dependabot/trigger
git config user.name "github-actions"
git config user.email "[email protected]"
git add .dependabot/trigger
git commit -m "Trigger Dependabot"
git push

0 comments on commit 2c31c00

Please sign in to comment.