Skip to content
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

feat(config): add diff with remotes for auth #2814

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

avallete
Copy link
Member

@avallete avallete commented Oct 29, 2024

What kind of change does this PR introduce?

feature
relates to #2552

What is the current behavior?

Please link any relevant issues here.

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

@coveralls
Copy link

coveralls commented Oct 29, 2024

Pull Request Test Coverage Report for Build 11626956411

Details

  • 2 of 4 (50.0%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 59.803%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/link/link.go 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 11607464227: 0.0%
Covered Lines: 6375
Relevant Lines: 10660

💛 - Coveralls

result.Email.Smtp.Host = *remoteConfig.SmtpHost
}
if remoteConfig.SmtpPass != nil {
result.Email.Smtp.Pass = *remoteConfig.SmtpPass
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this value is masked in api response.

pkg/config/auth.go Outdated Show resolved Hide resolved
return
}
localHashed := sha256Hmac(secret, *local)
diff.CompareSensitiveField(&localHashed, remote)
Copy link
Member Author

Choose a reason for hiding this comment

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

remark

Here I still use CompareSentitiveField to keep a human readable result message. We could just use the standard comparaison over the hashed values but I think that might confuse the users wondering why the value they set in their config get a different value in their config diff.

@avallete avallete marked this pull request as ready for review November 1, 2024 09:51
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