Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit author/co-author distinction #95

Open
cloudhead opened this issue Apr 9, 2020 · 4 comments
Open

Commit author/co-author distinction #95

cloudhead opened this issue Apr 9, 2020 · 4 comments

Comments

@cloudhead
Copy link
Contributor

When a commit is merged by a different person than the author, this information is usually preserved in the commit body. Eg. see this commit:

commit 3cf62b6aa73322152209d195e4be0390e18dd8a3
Author: Merle Breitkreuz <[email protected]>
Date:   Tue Apr 7 13:17:29 2020 +0200

    feat: implement transaction center and detail view (#242)

    Co-authored-by: Alexander Simmerl <[email protected]>

We would like to present this information in the UI, in this case the co-author, in a similar way that GitHub does, and so would need surf to provide it in some way or form.

@xla
Copy link
Contributor

xla commented Apr 9, 2020

AFAIK surf just reexports git2::Commit which carries the author and committer signature. Is that enough for the use-case?

@cloudhead
Copy link
Contributor Author

Oh interesting, that may be enough then, will have a look.

@cloudhead
Copy link
Contributor Author

Ok, I've managed to get committer information, however it's not what I expected, ie. it's not the co-author, but the signer. Take the above commit for example: if we look at the signature we get:

commit 3cf62b6aa73322152209d195e4be0390e18dd8a3
gpg: Signature made Tue 07 Apr 2020 01:17:29 PM CEST
gpg:                using RSA key 4AEE18F83AFDEB23
gpg: Good signature from "GitHub (web-flow commit signing) <[email protected]>" [unknown]
Primary key fingerprint: 5DE3 E050 9C47 EA3C F04A  42D3 4AEE 18F8 3AFD EB23
Author: Merle Breitkreuz <[email protected]>
Date:   Tue Apr 7 13:17:29 2020 +0200

    feat: implement transaction center and detail view (#242)

    Co-authored-by: Alexander Simmerl <[email protected]>

The committer here is actually "GitHub", as provided by libgit/surf. I think for now this is good enough, but perhaps this is something we can look into in the next iteration, as ideally we would be a bit smarter about it.

@kim
Copy link
Contributor

kim commented Apr 9, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants