-
Notifications
You must be signed in to change notification settings - Fork 0
CBP-18409 using the new git-credential-cloudbees #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repo has very less unit tests overall, so, maybe we can have some tests for only newly added lines for this PR, not mandatory but it will be good to have some tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Implements support for the new git-credential-cloudbees helper with fallback to the legacy helper when the new binary is not available.
- Detects git-credential-cloudbees on PATH and conditionally configures credentials.
- Adds internal Debug logging utility gated by RUNNER_DEBUG.
- Introduces invokeGitCredentialsHelper to initialize and configure the new helper.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| internal/util.go | Adds a Debug helper that prints messages when RUNNER_DEBUG=1. |
| internal/configuration/config.go | Detects and invokes git-credential-cloudbees, adds fallback logic, and wires up helper initialization and config updates. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
b5567c3 to
f670ab6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
internal/configuration/config.go
Outdated
| for _, filterGitUrl := range filterGitUrls { | ||
| filterUrlArgs = append(filterUrlArgs, "--filter-git-urls", filterGitUrl) | ||
| } | ||
| cmd := exec.CommandContext(ctx, path, filterGitUrls...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be cmd := exec.CommandContext(ctx, path, filterUrlArgs...) ?
https://cloudbees.atlassian.net/browse/CBP-18409
similar to cloudbees-io/checkout#41
if
git-credential-cloudbeesexists in PATH use it else defer to older impl