-
-
Notifications
You must be signed in to change notification settings - Fork 63
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: add git-cliff GitHub integration #1305
base: main
Are you sure you want to change the base?
Conversation
@@ -37,6 +37,7 @@ impl ChangelogCfg { | |||
} | |||
|
|||
/// Used for modifying commit messages. | |||
// TODO: why re-define this instead using it from git-cliff? | |||
#[derive(Serialize, Deserialize, Default, PartialEq, Eq, Debug, Clone, JsonSchema)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these structs don't have all the derives release-plz needs. That's the main reason why I duplicated them.
E.g. TextProcessor has #[derive(Debug, Clone, Serialize, Deserialize)]
.
git-cliff TextProcessor has pattern: Regex
, which makes it difficult to implement Eq
for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I'm down to implement the necessary traits for these types!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm down to implement the necessary traits for these types!
Definitely not urgent. Plus, there are some pros to have these structs in release-plz. E.g. I can document them in the context of release-plz and have the json schema update accordingly.
No. We might have them when running
Yes 🚀 |
I see, can you give me an example of how you retrieve the GitHub commits/PRs? I think then I can just map them to |
Here. However as I was saying this is only available in EDIT: I realized that here I only parse the commits of the release PR itself. So to go back to your question:
Not at the moment. But we would need them to implement #1084 |
I think it would be best to pair-program this when you have time 🐻 |
Sure Orhun, let's do it! |
Sounds awesome, let's do that! |
In the meantime, we could upgrade to git-cliff-core 2 without the github feature, so that release-plz uses git-cliff latest version at least |
Sure, I did that in another PR (#1361) to not lose the discussion here. |
This PR aims to bump
git-cliff-core
to the latest version to take advantage of the latest features: https://git-cliff.org/blog/2.0.0There are a couple of todos that I want to resolve and I added comments regarding them. Mainly:
update_github_metadata
function for the GitHub integration. I'm wondering if we already have access to GitHub PRs/commits at the point where this needs to be called.git-cliff-core
definitions. I suggest we use them from upstream instead.Also see: orhun/git-cliff#468 (I think it would be better if we can get a simple GitHub integration going without cache as the first step)