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: Improve parsing of conventional commit messages #332

Merged
merged 3 commits into from
May 19, 2022

Conversation

maelle
Copy link
Member

@maelle maelle commented May 19, 2022

No description provided.

@maelle maelle marked this pull request as ready for review May 19, 2022 11:42
@maelle maelle mentioned this pull request May 19, 2022
5 tasks
@krlmlr krlmlr changed the title Improve parsing of conventional commit messages feat: Improve parsing of conventional commit messages May 19, 2022
Copy link
Contributor

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

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

Neat! I wonder if rematch2 would help simplify parse_conventional_commit(), this is not a blocker though. Let's rack up more technical debt for now.

Comment on lines +153 to +157
if (type %in% conventional_commit_types()) {
names(conventional_commit_types())[conventional_commit_types() == type]
} else {
type
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If we swap names and values in conventional_commit_types():

Suggested change
if (type %in% conventional_commit_types()) {
names(conventional_commit_types())[conventional_commit_types() == type]
} else {
type
}
conventional_commit_types()[type] %|% type

@krlmlr krlmlr merged commit 660bf74 into main May 19, 2022
@krlmlr krlmlr deleted the conventional-parsing branch May 19, 2022 23:49
@krlmlr
Copy link
Contributor

krlmlr commented May 19, 2022

Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants