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

Get the signed-off-by and co-authored-by info #1804

Open
tisonkun opened this issue Jan 24, 2025 · 2 comments
Open

Get the signed-off-by and co-authored-by info #1804

tisonkun opened this issue Jan 24, 2025 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tisonkun
Copy link
Contributor

tisonkun commented Jan 24, 2025

Summary 💡

Nowadays, a Git commit can be a squashed one from multiple commits during a pull request. To respect the commit's authors, neither "the commit author" nor "the commit committer" is completed.

Is it considered in the scope of gix to have a method on Commit to return a list of all signed-of-by and/or co-authored-by signatures.

Motivation 🔦

No response

@tisonkun tisonkun added the enhancement New feature or request label Jan 24, 2025
@EliahKagan
Copy link
Member

CommitRef::message_trailers does this, returning a Trailers iterator whose items, of type TrailerRef, represent trailers as token: value.

@Byron
Copy link
Member

Byron commented Jan 25, 2025

Thanks @EliahKagan!

I checked and couldn't see that git2 has a convenience function like that, but I think these special trailers are common enough to make them very easy to retrieve.
My feeling is that Trailers should be used, but that there should be an easy way to case-insensitively search or filter for these common TrailerRefs. Maybe the TrailerRef itself could have functions that allow it to check for is_signed_off(&self) for instance.

@Byron Byron added the help wanted Extra attention is needed label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants