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

[chloggen] Introduce repo-level config file #371

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

djaglowski
Copy link
Member

This PR introduces an optional repo-level configuration file for the chloggen tool.

  • Add a global --config flag that can be used to specify a config file.
  • Removes the chloggen-directory flag, which is not used anywhere in our org. Instead, this value can be specified within the config file.
  • Renames the ChloggenDir field to ChlogsDir, since it is no longer required that this directory be used for "meta" files, such as config and template.
  • Ensures that "meta" files (config, template) are ignored when reading/deleting entries. This allows for these files to be placed in the chlogs dir, or not.
  • Adds an example config file that can be copied into place when setting up a repo. In the future this can likely be handled by a chloggen init command.

@djaglowski djaglowski requested review from a team and jpkrohling July 20, 2023 18:37
@djaglowski djaglowski force-pushed the chloggen-config-file branch from 27c56c0 to 2c363e6 Compare July 20, 2023 18:40
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Patch coverage: 82.05% and project coverage change: +0.20 🎉

Comparison is base (d2e2f13) 61.88% compared to head (e93b556) 62.08%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #371      +/-   ##
==========================================
+ Coverage   61.88%   62.08%   +0.20%     
==========================================
  Files          48       48              
  Lines        2330     2345      +15     
==========================================
+ Hits         1442     1456      +14     
- Misses        739      741       +2     
+ Partials      149      148       -1     
Impacted Files Coverage Δ
chloggen/cmd/root.go 64.86% <30.00%> (-16.39%) ⬇️
chloggen/cmd/new.go 78.78% <100.00%> (ø)
chloggen/cmd/validate.go 84.21% <100.00%> (ø)
chloggen/internal/chlog/entry.go 81.53% <100.00%> (+4.61%) ⬆️
chloggen/internal/config/config.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@djaglowski djaglowski force-pushed the chloggen-config-file branch from 2c363e6 to e93b556 Compare July 20, 2023 21:04
@djaglowski djaglowski merged commit 02066be into open-telemetry:main Jul 21, 2023
@djaglowski djaglowski deleted the chloggen-config-file branch July 21, 2023 13:52
@pellared pellared mentioned this pull request Jul 26, 2023
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