mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-29 20:51:03 +00:00
feat: add deploy tokens (#37306)
Deploy keys only work over SSH. A deploy token is their counterpart for HTTPS: a repository scoped credential, used as the password of a Git request, with read or read and write access. It covers Git operations and LFS, and can be regenerated in place. Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude Mythos <noreply@anthropic.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: bircni <bircni@icloud.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
+13
-10
@@ -24,20 +24,23 @@ const (
|
||||
|
||||
// HookOptions represents the options for the Hook calls
|
||||
type HookOptions struct {
|
||||
OldCommitIDs []string
|
||||
NewCommitIDs []string
|
||||
RefFullNames []git.RefName
|
||||
UserID int64
|
||||
UserName string
|
||||
IsWiki bool
|
||||
|
||||
OldCommitIDs []string
|
||||
NewCommitIDs []string
|
||||
RefFullNames []git.RefName
|
||||
|
||||
GitObjectDirectory string
|
||||
GitAlternativeObjectDirectories string
|
||||
GitQuarantinePath string
|
||||
GitPushOptions GitPushOptions
|
||||
PullRequestID int64
|
||||
PushTrigger repository.PushTrigger
|
||||
DeployKeyID int64 // if the pusher is a DeployKey, then UserID is the repo's org user.
|
||||
IsWiki bool
|
||||
ActionsTaskID int64 // if the pusher is an Actions user, the task ID
|
||||
|
||||
PullRequestID int64
|
||||
PushTrigger repository.PushTrigger
|
||||
|
||||
UserID int64
|
||||
UserName string
|
||||
UserExtDoerData string
|
||||
}
|
||||
|
||||
// SSHLogOption ssh log options
|
||||
|
||||
+12
-10
@@ -33,16 +33,18 @@ func ServNoCommand(ctx context.Context, keyID int64) (*asymkey_model.PublicKey,
|
||||
|
||||
// ServCommandResults are the results of a call to the private route serv
|
||||
type ServCommandResults struct {
|
||||
IsWiki bool
|
||||
DeployKeyID int64
|
||||
KeyID int64 // public key
|
||||
KeyName string // this field is ambiguous, it can be the name of DeployKey, or the name of the PublicKey
|
||||
UserName string
|
||||
UserEmail string
|
||||
UserID int64
|
||||
OwnerName string
|
||||
RepoName string
|
||||
RepoID int64
|
||||
IsWiki bool
|
||||
|
||||
OwnerName string
|
||||
RepoName string
|
||||
RepoID int64
|
||||
|
||||
PublicKeyID int64
|
||||
|
||||
UserName string
|
||||
UserEmail string
|
||||
UserID int64
|
||||
UserExtDoerData string
|
||||
|
||||
RepoStoragePath string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user