Skip to content

Conversation

@g-linville
Copy link
Member

@g-linville g-linville commented Apr 12, 2024

for #240

There was a problem where sometimes credential tools without github.com at the front of their name were having their credentials stored anyway. This change also skips the credential lookup for non-GitHub tools, since we aren't going to store the credentials for those anyway.

)

// Only try to look up the cred if the tool is on GitHub.
if strings.HasPrefix(credToolName, "github.com") {
Copy link
Member

Choose a reason for hiding this comment

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

nit: I suggest using a constant instead of a literal since we're using it in multiple places.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed. Decided to just define a function.

Signed-off-by: Grant Linville <[email protected]>
@g-linville g-linville requested a review from njhale April 12, 2024 19:45
@g-linville g-linville merged commit 9e8d144 into gptscript-ai:main Apr 12, 2024
@g-linville g-linville deleted the cred-local-fix branch April 12, 2024 21:19
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