Rename CommitGPGSignature to ObjectSignature

`CommitGPGSignature` was originally made to store information about a
commit's GPG signature. Nowadays, it is used to store information about
SSH signatures too, and not just commit signatures, but tag signatures
too.

As such, rename it to `ObjectSignature`, because that describes what it
does a whole lot better.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2024-02-29 09:44:35 +01:00 committed by oliverpool
parent 8fdffc94ca
commit 40c357bbc5
9 changed files with 26 additions and 21 deletions

View file

@ -13,7 +13,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/object"
)
func convertPGPSignature(c *object.Commit) *CommitGPGSignature {
func convertPGPSignature(c *object.Commit) *ObjectSignature {
if c.PGPSignature == "" {
return nil
}
@ -51,7 +51,7 @@ func convertPGPSignature(c *object.Commit) *CommitGPGSignature {
return nil
}
return &CommitGPGSignature{
return &ObjectSignature{
Signature: c.PGPSignature,
Payload: w.String(),
}