Skip to content

Commit

Permalink
Don't expose unused sig fields for now
Browse files Browse the repository at this point in the history
  • Loading branch information
IainSteers committed May 6, 2021
1 parent aff3922 commit 46f36b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
14 changes: 5 additions & 9 deletions pull/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,9 @@ type Reviewer struct {
}

type Signature struct {
Type SignatureType
Email string
IsValid bool
KeyID string
Payload string
Signature string
Signer string
State string
WasSignedByGitHub bool
Type SignatureType
IsValid bool
KeyID string
Signer string
State string
}
26 changes: 9 additions & 17 deletions pull/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -958,26 +958,18 @@ func (s *v4GitSignature) ToSignature() *Signature {
switch SignatureType(s.Type) {
case SignatureGpg:
return &Signature{
Email: s.GPG.Email,
IsValid: s.GPG.IsValid,
KeyID: s.GPG.KeyID,
Payload: s.GPG.Payload,
Signature: s.GPG.Signature,
Signer: s.GPG.Signer.GetV3Login(),
State: s.GPG.State,
Type: SignatureGpg,
WasSignedByGitHub: s.GPG.WasSignedByGitHub,
IsValid: s.GPG.IsValid,
KeyID: s.GPG.KeyID,
Signer: s.GPG.Signer.GetV3Login(),
State: s.GPG.State,
Type: SignatureGpg,
}
case SignatureSmime:
return &Signature{
Email: s.SMIME.Email,
IsValid: s.SMIME.IsValid,
Payload: s.SMIME.Payload,
Signature: s.SMIME.Signature,
Signer: s.SMIME.Signer.GetV3Login(),
State: s.SMIME.State,
Type: SignatureSmime,
WasSignedByGitHub: s.SMIME.WasSignedByGitHub,
IsValid: s.SMIME.IsValid,
Signer: s.SMIME.Signer.GetV3Login(),
State: s.SMIME.State,
Type: SignatureSmime,
}
default:
return nil
Expand Down

0 comments on commit 46f36b5

Please sign in to comment.