Skip to content

Conversation

@Marenz
Copy link
Contributor

@Marenz Marenz commented Oct 20, 2025

Summary

  • Add GitHub workflow to automatically approve and merge Dependabot PRs
  • Uses merge method for clean commit history

@Copilot Copilot AI review requested due to automatic review settings October 20, 2025 13:25
@Marenz Marenz requested a review from a team as a code owner October 20, 2025 13:25
@Marenz Marenz requested a review from shsms October 20, 2025 13:25
@github-actions github-actions bot added the part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) label Oct 20, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a GitHub Actions workflow to automate the approval and merging of Dependabot pull requests, streamlining dependency updates with a merge commit strategy.

Key Changes:

  • New automated workflow for Dependabot PRs with approval and merge functionality
  • Configured to use merge commits for maintaining explicit dependency update history

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +11 to +16
- name: Auto-merge Dependabot PR
uses: ad/dependabot-auto-approve@v1
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action ad/dependabot-auto-approve@v1 only approves PRs but does not merge them, despite its use in a step named 'Auto-merge'. To both approve and merge, consider using fastify/github-action-merge-dependabot@v3 or add a separate merge step using gh pr merge with the GitHub CLI.

Suggested change
- name: Auto-merge Dependabot PR
uses: ad/dependabot-auto-approve@v1
- name: Auto-approve and merge Dependabot PR
uses: fastify/github-action-merge-dependabot@v3

Copilot uses AI. Check for mistakes.
name: Auto-merge Dependabot PRs

on:
pull_request:
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow triggers on all pull_request events without specifying activity types. This means it runs on every PR event (opened, synchronized, reopened, etc.), including those from external forks in public repositories. Add types: [opened] or use pull_request_target with appropriate safeguards to limit when this workflow executes.

Suggested change
pull_request:
pull_request:
types: [opened]

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL pull_request by default only triggers on opened, reopened and synchronize.

Comment on lines 14 to 19
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: 'merge' No newline at end of file
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merge-method parameter is not supported by the ad/dependabot-auto-approve@v1 action, which only handles approval. This configuration will have no effect. If you want to control the merge method, use an action that actually performs merging or use the GitHub CLI with gh pr merge --merge.

Suggested change
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: 'merge'
github-token: ${{ secrets.GITHUB_TOKEN }}

Copilot uses AI. Check for mistakes.
@Marenz Marenz force-pushed the add-dependabot-workflow branch 2 times, most recently from e837ce5 to c82dbe6 Compare October 20, 2025 15:17
Signed-off-by: Mathias L. Baumann <[email protected]>
@Marenz Marenz force-pushed the add-dependabot-workflow branch from c82dbe6 to e40d708 Compare October 22, 2025 10:03
uses: ad/dependabot-auto-approve@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: 'merge'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in other PRs, shouldn't this also have other parameters, like auto-merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants