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

Provide convinience access to the raw subject #5

Open
epage opened this issue Aug 15, 2019 · 2 comments
Open

Provide convinience access to the raw subject #5

epage opened this issue Aug 15, 2019 · 2 comments
Labels
question Further information is requested

Comments

@epage
Copy link
Contributor

epage commented Aug 15, 2019

When writing committed, I need access both to the actual subject (without prefix) but also the raw subject (for determining line length). Rather than me having to separately parse the commit to get the raw subject, it'd be nice if the conventional parser did it for me.

@JeanMertz
Copy link
Member

If you have the commit string, doesn't "feat: description\n\nbody".lines().next() give you what you need?

I guess we could add a header() accessor, to go alongside the body() accessor.

@JeanMertz JeanMertz added the question Further information is requested label Aug 17, 2019
@epage
Copy link
Contributor Author

epage commented Aug 17, 2019

Technically yes, "feat: description\n\nbody".lines().next().unwrap() works but nicer to have that abstracted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants