Skip to content

Conversation

@cb-nsrinivasa
Copy link
Contributor

@cb-nsrinivasa cb-nsrinivasa commented Oct 17, 2025

https://cloudbees.atlassian.net/browse/CBP-18409

similar to cloudbees-io/checkout#41

if git-credential-cloudbees exists in PATH use it else defer to older impl

@cb-nsrinivasa cb-nsrinivasa self-assigned this Oct 17, 2025
@cb-nsrinivasa cb-nsrinivasa marked this pull request as ready for review October 17, 2025 13:02
@cb-nsrinivasa cb-nsrinivasa requested a review from a team as a code owner October 17, 2025 13:02
Copy link

@sraybee sraybee left a 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.

@sraybee sraybee requested a review from Copilot October 17, 2025 13:35
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

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.

@pinaki124 pinaki124 requested a review from Copilot October 22, 2025 19:57
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

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.

for _, filterGitUrl := range filterGitUrls {
filterUrlArgs = append(filterUrlArgs, "--filter-git-urls", filterGitUrl)
}
cmd := exec.CommandContext(ctx, path, filterGitUrls...)
Copy link

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...) ?

@cb-nsrinivasa cb-nsrinivasa merged commit 7dd6d46 into main Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants