-
Notifications
You must be signed in to change notification settings - Fork 11
Extract signatures from commits, fixes #56 #84
Conversation
Picked this one up as it looked like a good place to start getting involved. As far as I can tell the build failure is due to the build server having run out of space? |
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.
So I'd like to keep the TryFrom
instance for git2::Commit
to our own Commit
, so I think we shouldn't add Signature
to the data structure itself.
I think the best thing to do here is adding a signature
function on our version of git::Repository
and git::Browser
in turn could call that function. On top of that, keeping the same interface of the function would be cool, I think signature_field
will become useful if we plan on allowing other types of commit signatures.
So I envision the use of it as something like:
let signature = browser.signature(commit.id, Some("rad"))?;
I hope this helps and thanks for the PR! :)
Ya it looks like it. I'll figure this out for you in the meantime :) |
9acf209
to
114811d
Compare
I went for |
Makes total sense 👌
We figured out the cache volume issue. Just need to put a fix in place :) |
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.
This is awesome! There's one last thing I want to do. We should add a couple of unit tests.
We use https://github.com/radicle-dev/git-platinum as a golden file suite. So we could add doc test, the same as the rest where we look at two different commits to extract the signature. Currently git-platinum
has branch protection with signed commits only. So let's just do the positive case for now, meanwhile I'll try and set up git-platinum
with a case that has no signature on a commit :)
114811d
to
d1e1101
Compare
Ah I wondered what all that git-platinum stuff was. Doctest added. |
d1e1101
to
d044c77
Compare
Amazing! Sorry for the back-and-forth, here's my last request I PROMISE. We have a commit in Also, I'd like to move the doc tests to use this form https://rust-lang.github.io/api-guidelines/documentation.html#examples-use--not-try-not-unwrap-c-question-mark. So if you could use this form for the one you're adding that'd be awesome :) |
d044c77
to
0b581dc
Compare
No problem, I actually really enjoy the back and forth, it's a similar feeling to the feeling of polishing a finished piece of woodwork, like making everything perfect 🙂 Negative doctest and |
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.
Amazing, thank you! I'm proud of our finished woodwork and glad you enjoyed the experience ❤️
I just need to finish figuring out this build issue ;)
For some reason, this build isn't getting picked up here. But since there's one build on CI passing I'm happy to merge this :) |
No description provided.