chore: automerge Dependabot PRs on passing checks - #39
Conversation
Co-authored-by: don-petry <36422719+don-petry@users.noreply.github.com>
|
@copilot - apply prettier. Always apply prettier on every commit. |
Co-authored-by: don-petry <36422719+don-petry@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds Dependabot configuration and a GitHub Actions workflow to automatically enable auto-merge for eligible Dependabot PRs, supporting faster dependency hygiene for this repo.
Changes:
- Add
.github/dependabot.ymlto enable weekly updates for npm and GitHub Actions. - Add a
Dependabot auto-mergeworkflow that enables auto-merge for semver patch/minor Dependabot PRs viagh pr merge --auto.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/dependabot-automerge.yml | Enables auto-merge for Dependabot PRs (patch/minor) using fetch-metadata + gh pr merge --auto. |
| .github/dependabot.yml | Configures weekly Dependabot updates for npm and GitHub Actions. |
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| dependabot: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
permissions are set to contents: write and pull-requests: write at the workflow level, which grants a write-scoped GITHUB_TOKEN for every PR event (even though the job later gates on github.actor). To follow least-privilege, set the workflow-level permissions to read-only (or omit them) and move the write permissions down to the jobs.dependabot.permissions (or the specific step) so they’re only granted when needed.
| contents: write | |
| pull-requests: write | |
| jobs: | |
| dependabot: | |
| runs-on: ubuntu-latest | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| dependabot: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write |
| @@ -0,0 +1,23 @@ | |||
| name: Dependabot auto-merge | |||
|
|
|||
| on: pull_request | |||
There was a problem hiding this comment.
This workflow triggers on every pull_request to any branch. Other workflows in this repo scope PR workflows to main; consider switching to on: pull_request: branches: [main] (and using the expanded on: mapping style) to avoid unnecessary runs and keep workflow triggers consistent across the repo.
| on: pull_request | |
| on: | |
| pull_request: | |
| branches: | |
| - main |
Co-authored-by: don-petry <36422719+don-petry@users.noreply.github.com>
…bot-automerge workflow (#48) * Initial plan * fix: address PR #39 review comments on dependabot-automerge workflow Co-authored-by: don-petry <36422719+don-petry@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: don-petry <36422719+don-petry@users.noreply.github.com>
.github/dependabot.ymlto enable weekly Dependabot updates for npm and GitHub Actions.github/workflows/dependabot-automerge.ymlworkflow to auto-merge Dependabot PRs when all checks passOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.