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

Configure from section in Cargo.toml #46

Closed
alerque opened this issue Jan 6, 2022 · 5 comments
Closed

Configure from section in Cargo.toml #46

alerque opened this issue Jan 6, 2022 · 5 comments
Assignees
Labels
feature/request New feature or request
Milestone

Comments

@alerque
Copy link
Contributor

alerque commented Jan 6, 2022

Having a separate config file just for a few values (hint hint #45) seems like overkill.

It seems like it would be pretty easy to check for a custom section in Cargo.toml for Rust projects. As a bonus with some json maybe also look at package.json, pyproject.toml, etc. Most of these formats allow project meta data in custom keys.

@alerque alerque added the feature/request New feature or request label Jan 6, 2022
@orhun
Copy link
Owner

orhun commented Jan 23, 2022

Hey, although I'm a proponent of not adding language-specific features to git-cliff, it makes sense to drop the need for a config file altogether and place the configuration inside an already existing manifest per se.

On that note, can you share examples to demonstrate how it might look like for the formats you mentioned? I think the first place to start implementing this is obviously Cargo.toml so it would be nice to get an idea.

@orhun orhun added the question Further information is requested label Jan 23, 2022
@alerque
Copy link
Contributor Author

alerque commented Jan 24, 2022

Here is an example of a similar use case, specifically using standard-version tooling on a JS project. The conventional commit settings such as allowed types just gets added to the existing package.json file:

https://github.com/sile-typesetter/sile/blob/master/package.json#L36-L85

I'll try to come up with an example for a similar situation using Cargo.toml and adapt it far what it would look like with git-cliff settings.

@orhun
Copy link
Owner

orhun commented Jan 29, 2022

Here is an example of a similar use case, specifically using standard-version tooling on a JS project. The conventional commit settings such as allowed types just gets added to the existing package.json file:

sile-typesetter/sile@master/package.json#L36-L85

It could be useful in the future. I'd like to focus on Cargo.toml first though.

So I think custom metadata can be placed in Cargo.toml. One example from cargo-release:

https://github.com/crate-ci/cargo-release/blob/8908982c5b86ebc394047ca288c7a2a0abfe25d6/Cargo.toml#L20

I'll try to come up with an example for a similar situation using Cargo.toml and adapt it far what it would look like with git-cliff settings.

Do you have any updates on this?

@alerque
Copy link
Contributor Author

alerque commented Jan 29, 2022

Do you have any updates on this?

Nope, I've been distracted down other rabbit holes.

But yes that example from cargo-release is similar to what I remember seeing.

@orhun
Copy link
Owner

orhun commented Mar 27, 2022

I pushed f48d207 which means git-cliff can be configured inside Cargo.toml now! 🥳

For more information, see README.md.

@orhun orhun removed the question Further information is requested label Mar 27, 2022
@orhun orhun closed this as completed Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants