mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-19 20:26:26 +08:00

* Enable blank issue * chore(README.md): update docs (temporally) * Update FUNDING.yml * chore: purge README.md * chore: change module name to OpenListTeam/OpenList * fix: fix link errors * chore: remove v3 in module name * fix: resolve some conficts * fix: resolve conficts * docs: update with latest file --------- Co-authored-by: ShenLin <773933146@qq.com> Co-authored-by: Hantong Chen <cxwdyx620@gmail.com> Co-authored-by: joshua <i@joshua.su> Co-authored-by: Hantong Chen <70561268+cxw620@users.noreply.github.com>
40 lines
1.9 KiB
Go
40 lines
1.9 KiB
Go
package github
|
|
|
|
import (
|
|
"github.com/OpenListTeam/OpenList/internal/driver"
|
|
"github.com/OpenListTeam/OpenList/internal/op"
|
|
)
|
|
|
|
type Addition struct {
|
|
driver.RootPath
|
|
Token string `json:"token" type:"string" required:"true"`
|
|
Owner string `json:"owner" type:"string" required:"true"`
|
|
Repo string `json:"repo" type:"string" required:"true"`
|
|
Ref string `json:"ref" type:"string" help:"A branch, a tag or a commit SHA, main branch by default."`
|
|
GitHubProxy string `json:"gh_proxy" type:"string" help:"GitHub proxy, e.g. https://ghproxy.net/raw.githubusercontent.com or https://gh-proxy.com/raw.githubusercontent.com"`
|
|
GPGPrivateKey string `json:"gpg_private_key" type:"text"`
|
|
GPGKeyPassphrase string `json:"gpg_key_passphrase" type:"string"`
|
|
CommitterName string `json:"committer_name" type:"string"`
|
|
CommitterEmail string `json:"committer_email" type:"string"`
|
|
AuthorName string `json:"author_name" type:"string"`
|
|
AuthorEmail string `json:"author_email" type:"string"`
|
|
MkdirCommitMsg string `json:"mkdir_commit_message" type:"text" default:"{{.UserName}} mkdir {{.ObjPath}}"`
|
|
DeleteCommitMsg string `json:"delete_commit_message" type:"text" default:"{{.UserName}} remove {{.ObjPath}}"`
|
|
PutCommitMsg string `json:"put_commit_message" type:"text" default:"{{.UserName}} upload {{.ObjPath}}"`
|
|
RenameCommitMsg string `json:"rename_commit_message" type:"text" default:"{{.UserName}} rename {{.ObjPath}} to {{.TargetName}}"`
|
|
CopyCommitMsg string `json:"copy_commit_message" type:"text" default:"{{.UserName}} copy {{.ObjPath}} to {{.TargetPath}}"`
|
|
MoveCommitMsg string `json:"move_commit_message" type:"text" default:"{{.UserName}} move {{.ObjPath}} to {{.TargetPath}}"`
|
|
}
|
|
|
|
var config = driver.Config{
|
|
Name: "GitHub API",
|
|
LocalSort: true,
|
|
DefaultRoot: "/",
|
|
}
|
|
|
|
func init() {
|
|
op.RegisterDriver(func() driver.Driver {
|
|
return &Github{}
|
|
})
|
|
}
|