Add Dependabot Tidy workflow for managing Go module dependencies#2810
Merged
Conversation
Signed-off-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a GitHub Actions workflow intended to keep Go module files consistent by automatically running module maintenance commands on Dependabot PRs and pushing any resulting go.mod/go.sum/vendor updates back to the PR branch.
Changes:
- Added a new
Dependabot Tidyworkflow that runs on Dependabot-authored PRs. - Runs
go mod tidy(root +/test) andgo mod vendor(root) and auto-commits/pushes resulting changes back to the PR branch.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
helsaawy
approved these changes
Jul 6, 2026
| exit 0 | ||
| fi | ||
| git config user.name 'dependabot[bot]' | ||
| git config user.email '49699333+dependabot[bot]@users.noreply.github.com' |
Contributor
There was a problem hiding this comment.
it feels weird to impersonate dependabot (or take a dependency on its bot id/email remaining the same)
Contributor
Author
There was a problem hiding this comment.
That sounds good! I made the change to attribute the commit to github actions bot instead.
…rkflow Address review feedback: the header comment and step name implied the test module is vendored, but only the root module has a vendor/ directory. Reword the comment and rename the step to accurately reflect that both modules are tidied while only the root is vendored. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The commit is created by the workflow (a GitHub Action), so attribute it to the github-actions[bot] identity rather than hardcoding Dependabot's. This removes the coupling to Dependabot's account ID while keeping proper, real-account attribution; DCO still passes since author == sign-off. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
anmaxvl
approved these changes
Jul 8, 2026
helsaawy
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new GitHub Actions workflow to automatically tidy and vendor Go modules for both the root and
/testmodules when Dependabot opens a pull request. This ensures that module dependencies remain consistent and up-to-date, especially since/testinherits dependencies from the root, which can otherwise become stale after root bumps.Automation for dependency management:
.github/workflows/dependabot-tidy.ymlto automatically rungo mod tidyandgo mod vendoron both the root and/testmodules when Dependabot opens a PR, and pushes any resulting changes back to the PR branch./testmodule dependencies and vendoring stay in sync with the root after dependency updates, preventing stale or inconsistent dependency files.