Repository navigation
fix: Pass integer repository IDs for Dependabot secret - #4618
Frank2006x wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request simplifies the CreateOrUpdateOrgSecret function in github/dependabot_secrets.go and its corresponding test in github/dependabot_secrets_test.go by removing the manual conversion of repository IDs to strings and directly passing the request body. There are no review comments, and I have no feedback to provide.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4618 +/- ##
==========================================
- Coverage 98.61% 98.61% -0.01%
==========================================
Files 199 199
Lines 18664 18653 -11
==========================================
- Hits 18406 18395 -11
Misses 258 258 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
My only concern here is that this may break GitHub Enterprise users who are stuck on older versions.
|
I checked the repository’s API metadata and existing implementations, and I don’t see evidence that this change would break GHES users. The Dependabot organization-secret endpoint is mapped to GitHub.com, GHEC, and GHES 3.22 in
Issues #2401, #2794, and #2817 document the history of the string-conversion workaround:
This change makes Dependabot consistent with Actions and the documented API schema, which defines |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @Frank2006x.
LGTM.
Awaiting second LGTM+Approval from any other contributor to the repo before merging.
Summary
Removes the legacy workaround in
CreateOrUpdateOrgSecretthat convertedSelectedRepositoryIDsfrom[]int64to[]string.The GitHub API expects integer repository IDs for
PUT /orgs/{org}/dependabot/secrets/{secret_name}. This change ensures the request payload uses the correct type.This addresses the [Dependabot secrets item in the API version migration tracking list](#4077 (comment)).
part of #4077
Tests
script/fmt.shgo test ./githubscript/test.shscript/lint.shAssisted Contribution
Drafted with the assistance of an AI coding agent. All changes and test results were reviewed and verified against repository guidelines.