-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove openpgp and change CreateCommit signature #2935
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2935 +/- ##
=======================================
Coverage 98.17% 98.17%
=======================================
Files 143 143
Lines 12597 12602 +5
=======================================
+ Hits 12367 12372 +5
Misses 156 156
Partials 74 74
|
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.
Awesome, @WillAbides !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
opts.Signer = github.MessageSignerFunc(func(w io.Writer, r io.Reader) error { | ||
return openpgp.ArmoredDetachSign(w, key, r, nil) | ||
}) |
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.
TIL that you can wrap a single func
in a type cast that can then be used as a receiver in order to satisfy an interface...
so cool, @WillAbides - thank you!
Thank you, @valbeat ! |
closes #2932
In #2932 we discussed removing the dependency on openpgp and replacing Commit.SigningKey with an interface.
While I was working on it, I realized that this should be an option to CreateCommit instead of a Commit field. I was going to just ignore this, but adding an interface field to Commit caused issues with Stringify and the generated string tests. Instead of unwinding all that, I'm doing the easy thing first and adding a CreateCommitOptions struct. I can change approaches if necessary.