This commit is contained in:
9 files changed
+633
-114
No files matched your search
@@ -250,3 +250,20 @@ var ErrBadWebhook = errors.New("undecodable webhook payload")
|
||||
type WebhookParser interface {
|
||||
ParseWebhook(ctx context.Context, headers map[string]string, body []byte) (WebhookEvent, error)
|
||||
}
|
||||
|
||||
// GitCredential is a short-lived git credential for one repository and the
|
||||
// identity commits through it carry.
|
||||
type GitCredential struct {
|
||||
Username string
|
||||
Token string
|
||||
ExpiresAt time.Time
|
||||
CommitName string
|
||||
CommitEmail string
|
||||
}
|
||||
|
||||
// GitCredentialIssuer is a forge that mints per-repository git credentials,
|
||||
// such as an app installation token. It returns errors.ErrUnsupported when
|
||||
// git should use the connection's stored token.
|
||||
type GitCredentialIssuer interface {
|
||||
GitCredential(ctx context.Context, owner, repo string) (GitCredential, error)
|
||||
}
|
||||
Reference in new issue
Block a user