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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: log.write removed option.resource.labels #1219

Merged
merged 2 commits into from
Jan 21, 2022
Merged

Conversation

losalex
Copy link
Contributor

@losalex losalex commented Jan 21, 2022

The snakecaseKeys was always removing labels which were in snake-case

Fixes #1167 馃

@losalex losalex requested review from a team as code owners January 21, 2022 20:07
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Jan 21, 2022
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/nodejs-logging API. label Jan 21, 2022
Copy link
Contributor

@minherz minherz left a comment

Choose a reason for hiding this comment

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

lgtm with few questions

Comment on lines +60 to +63
const replaced = key.replace(
/[A-Z]/g,
letter => `_${letter.toLowerCase()}`
);
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just key.toLowerCase()?

Copy link
Contributor Author

@losalex losalex Jan 21, 2022

Choose a reason for hiding this comment

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

you need to add also '_' - I afraid that if I change it now, it might be breaking change...

test/utils/log-common.ts Show resolved Hide resolved
@losalex losalex merged commit 6d7e9ed into main Jan 21, 2022
@losalex losalex deleted the losalex/fix-1167 branch January 21, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/nodejs-logging API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants