commit 568662fc448d1f23aacbb0778941b9fe7496fdd9 Author: TylerByte Date: Thu Jan 30 08:18:08 2020 +0200 Got the latest template files diff --git a/admin/auth/edit.tmpl b/admin/auth/edit.tmpl new file mode 100644 index 0000000..6a176a4 --- /dev/null +++ b/admin/auth/edit.tmpl @@ -0,0 +1,262 @@ +{{template "base/head" .}} +
+ {{template "admin/navbar" .}} +
+ {{template "base/alert" .}} +

+ {{.i18n.Tr "admin.auths.edit"}} +

+
+
+ {{.CsrfTokenHtml}} + +
+ + + {{.Source.TypeName}} +
+
+ + +
+ + + {{if or .Source.IsLDAP .Source.IsDLDAP}} + {{ $cfg:=.Source.LDAP }} +
+ + +
+
+ + +
+
+ + +
+ {{if .Source.IsLDAP}} +
+ + +
+ +
+ + +

{{.i18n.Tr "admin.auths.bind_password_helper"}}

+
+ {{end}} +
+ + +
+ {{if .Source.IsDLDAP}} +
+ + +
+ {{end}} +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ {{if .Source.IsLDAP}} +
+
+ + +
+
+
+ + +
+
+
+ + +
+
+ {{end}} + {{end}} + + + {{if .Source.IsSMTP}} + {{ $cfg:=.Source.SMTP }} +
+ + +
+
+ + +
+
+ + +
+
+ + +

{{.i18n.Tr "admin.auths.allowed_domains_helper"}}

+
+ {{end}} + + + {{if .Source.IsPAM}} + {{ $cfg:=.Source.PAM }} +
+ + +
+ {{end}} + + + {{if .Source.IsOAuth2}} + {{ $cfg:=.Source.OAuth2 }} +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ {{if .OAuth2DefaultCustomURLMappings}}{{range $key, $value := .OAuth2DefaultCustomURLMappings}} + + + + + {{end}}{{end}} + {{end}} + +
+
+ + +
+
+
+
+ + +
+
+ {{if .Source.IsLDAP}} +
+
+ + +
+
+ {{end}} +
+
+ + +
+
+ +
+ +
{{.i18n.Tr "admin.auths.delete"}}
+
+
+
+
+
+ + +{{template "base/footer" .}} diff --git a/admin/auth/list.tmpl b/admin/auth/list.tmpl new file mode 100644 index 0000000..60b8f6f --- /dev/null +++ b/admin/auth/list.tmpl @@ -0,0 +1,42 @@ +{{template "base/head" .}} +
+ {{template "admin/navbar" .}} +
+ {{template "base/alert" .}} +

+ {{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) + +

+
+ + + + + + + + + + + + + + {{range .Sources}} + + + + + + + + + + {{end}} + +
ID{{.i18n.Tr "admin.auths.name"}}{{.i18n.Tr "admin.auths.type"}}{{.i18n.Tr "admin.auths.enabled"}}{{.i18n.Tr "admin.auths.updated"}}{{.i18n.Tr "admin.users.created"}}{{.i18n.Tr "admin.users.edit"}}
{{.ID}}{{.Name}}{{.TypeName}}{{.UpdatedUnix.FormatShort}}{{.CreatedUnix.FormatShort}}
+
+
+
+{{template "base/footer" .}} diff --git a/admin/auth/new.tmpl b/admin/auth/new.tmpl new file mode 100644 index 0000000..e759ec0 --- /dev/null +++ b/admin/auth/new.tmpl @@ -0,0 +1,119 @@ +{{template "base/head" .}} +
+ {{template "admin/navbar" .}} +
+ {{template "base/alert" .}} +

+ {{.i18n.Tr "admin.auths.new"}} +

+
+
+ {{.CsrfTokenHtml}} + +
+ + +
+
+ + +
+ + + {{ template "admin/auth/source/ldap" . }} + + + {{ template "admin/auth/source/smtp" . }} + + +
+ + +
+ + + {{ template "admin/auth/source/oauth" . }} + +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+ +
+
+
+ +

+ {{.i18n.Tr "admin.auths.tips"}} +

+
+
GMail Settings:
+

Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true

+ +
{{.i18n.Tr "admin.auths.tips.oauth2.general"}}:
+

{{.i18n.Tr "admin.auths.tips.oauth2.general.tip"}}

+ +
{{.i18n.Tr "admin.auths.tip.oauth2_provider"}}
+
+
  • Bitbucket
  • + {{.i18n.Tr "admin.auths.tip.bitbucket"}} +
  • Dropbox
  • + {{.i18n.Tr "admin.auths.tip.dropbox"}} +
  • Facebook
  • + {{.i18n.Tr "admin.auths.tip.facebook"}} +
  • GitHub
  • + {{.i18n.Tr "admin.auths.tip.github"}} +
  • GitLab
  • + {{.i18n.Tr "admin.auths.tip.gitlab"}} +
  • Google
  • + {{.i18n.Tr "admin.auths.tip.google_plus"}} +
  • OpenID Connect
  • + {{.i18n.Tr "admin.auths.tip.openid_connect"}} +
  • Twitter
  • + {{.i18n.Tr "admin.auths.tip.twitter"}} +
  • Discord
  • + {{.i18n.Tr "admin.auths.tip.discord"}} +
  • Gitea
  • + {{.i18n.Tr "admin.auths.tip.gitea"}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/admin/auth/source/ldap.tmpl b/admin/auth/source/ldap.tmpl new file mode 100644 index 0000000..3386884 --- /dev/null +++ b/admin/auth/source/ldap.tmpl @@ -0,0 +1,79 @@ +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    + + +

    {{.i18n.Tr "admin.auths.bind_password_helper"}}

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    diff --git a/admin/auth/source/oauth.tmpl b/admin/auth/source/oauth.tmpl new file mode 100644 index 0000000..5d585c0 --- /dev/null +++ b/admin/auth/source/oauth.tmpl @@ -0,0 +1,58 @@ +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + {{if .OAuth2DefaultCustomURLMappings}} + {{range $key, $value := .OAuth2DefaultCustomURLMappings}} + + + + + {{end}} + {{end}} +
    \ No newline at end of file diff --git a/admin/auth/source/smtp.tmpl b/admin/auth/source/smtp.tmpl new file mode 100644 index 0000000..d4c83c1 --- /dev/null +++ b/admin/auth/source/smtp.tmpl @@ -0,0 +1,28 @@ +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +

    {{.i18n.Tr "admin.auths.allowed_domains_helper"}}

    +
    +
    diff --git a/admin/base/search.tmpl b/admin/base/search.tmpl new file mode 100644 index 0000000..b817a8a --- /dev/null +++ b/admin/base/search.tmpl @@ -0,0 +1,23 @@ + +
    +
    + + +
    +
    diff --git a/admin/config.tmpl b/admin/config.tmpl new file mode 100644 index 0000000..c2793ec --- /dev/null +++ b/admin/config.tmpl @@ -0,0 +1,420 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "admin.config.server_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.app_name"}}
    +
    {{AppName}}
    +
    {{.i18n.Tr "admin.config.app_ver"}}
    +
    {{AppVer}}{{AppBuiltWith}}
    +
    {{.i18n.Tr "admin.config.custom_conf"}}
    +
    {{.CustomConf}}
    +
    {{.i18n.Tr "admin.config.app_url"}}
    +
    {{.AppUrl}}
    +
    {{.i18n.Tr "admin.config.domain"}}
    +
    {{.Domain}}
    +
    {{.i18n.Tr "admin.config.offline_mode"}}
    +
    +
    {{.i18n.Tr "admin.config.disable_router_log"}}
    +
    + +
    + +
    {{.i18n.Tr "admin.config.run_user"}}
    +
    {{.RunUser}}
    +
    {{.i18n.Tr "admin.config.run_mode"}}
    +
    {{.RunMode}}
    + +
    + +
    {{.i18n.Tr "admin.config.git_version"}}
    +
    {{.GitVersion}}
    + +
    + +
    {{.i18n.Tr "admin.config.repo_root_path"}}
    +
    {{.RepoRootPath}}
    +
    {{.i18n.Tr "admin.config.static_file_root_path"}}
    +
    {{.StaticRootPath}}
    +
    {{.i18n.Tr "admin.config.custom_file_root_path"}}
    +
    {{.CustomRootPath}}
    +
    {{.i18n.Tr "admin.config.log_file_root_path"}}
    +
    {{.LogRootPath}}
    +
    {{.i18n.Tr "admin.config.script_type"}}
    +
    {{.ScriptType}}
    +
    {{.i18n.Tr "admin.config.reverse_auth_user"}}
    +
    {{.ReverseProxyAuthUser}}
    + + {{if .EnvVars }} +
    + {{range .EnvVars}} +
    {{.Name}}
    +
    {{.Value}}
    + {{end}} + {{end}} + +
    +
    + +

    + {{.i18n.Tr "admin.config.ssh_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.ssh_enabled"}}
    +
    + {{if not .SSH.Disabled}} +
    {{.i18n.Tr "admin.config.ssh_start_builtin_server"}}
    +
    +
    {{.i18n.Tr "admin.config.ssh_domain"}}
    +
    {{.SSH.Domain}}
    +
    {{.i18n.Tr "admin.config.ssh_port"}}
    +
    {{.SSH.Port}}
    +
    {{.i18n.Tr "admin.config.ssh_listen_port"}}
    +
    {{.SSH.ListenPort}}
    + + {{if not .SSH.StartBuiltinServer}} +
    {{.i18n.Tr "admin.config.ssh_root_path"}}
    +
    {{.SSH.RootPath}}
    +
    {{.i18n.Tr "admin.config.ssh_key_test_path"}}
    +
    {{.SSH.KeyTestPath}}
    +
    {{.i18n.Tr "admin.config.ssh_keygen_path"}}
    +
    {{.SSH.KeygenPath}}
    +
    {{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}
    +
    + {{if .SSH.MinimumKeySizeCheck}} +
    {{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}
    +
    {{.SSH.MinimumKeySizes}}
    + {{end}} + {{end}} + {{end}} +
    +
    + +

    + {{.i18n.Tr "admin.config.lfs_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.lfs_enabled"}}
    +
    + {{if .LFS.StartServer}} +
    {{.i18n.Tr "admin.config.lfs_content_path"}}
    +
    {{.LFS.ContentPath}}
    +
    {{.i18n.Tr "admin.config.lfs_http_auth_expiry"}}
    +
    {{.LFS.HTTPAuthExpiry}}
    + {{end}} +
    +
    + +

    + {{.i18n.Tr "admin.config.db_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.db_type"}}
    +
    {{.DbCfg.Type}}
    + {{if not (or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb"))}} +
    {{.i18n.Tr "admin.config.db_host"}}
    +
    {{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}
    +
    {{.i18n.Tr "admin.config.db_name"}}
    +
    {{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}
    +
    {{.i18n.Tr "admin.config.db_user"}}
    +
    {{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}
    + {{end}} + {{if eq .DbCfg.Type "postgres"}} +
    {{.i18n.Tr "admin.config.db_ssl_mode"}}
    +
    {{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}
    + {{end}} + {{if or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb")}} +
    {{.i18n.Tr "admin.config.db_path"}}
    +
    {{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}
    + {{end}} +
    +
    + +

    + {{.i18n.Tr "admin.config.service_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.register_email_confirm"}}
    +
    +
    {{.i18n.Tr "admin.config.disable_register"}}
    +
    +
    {{.i18n.Tr "admin.config.allow_only_external_registration"}}
    +
    +
    {{.i18n.Tr "admin.config.show_registration_button"}}
    +
    +
    {{.i18n.Tr "admin.config.enable_openid_signup"}}
    +
    +
    {{.i18n.Tr "admin.config.enable_openid_signin"}}
    +
    +
    {{.i18n.Tr "admin.config.require_sign_in_view"}}
    +
    +
    {{.i18n.Tr "admin.config.mail_notify"}}
    +
    + {{/*
    {{.i18n.Tr "admin.config.disable_key_size_check"}}
    +
    */}} +
    {{.i18n.Tr "admin.config.enable_captcha"}}
    +
    +
    {{.i18n.Tr "admin.config.default_keep_email_private"}}
    +
    +
    {{.i18n.Tr "admin.config.default_allow_create_organization"}}
    +
    +
    {{.i18n.Tr "admin.config.enable_timetracking"}}
    +
    + {{if .Service.EnableTimetracking}} +
    {{.i18n.Tr "admin.config.default_enable_timetracking"}}
    +
    +
    {{.i18n.Tr "admin.config.default_allow_only_contributors_to_track_time"}}
    +
    + {{end}} +
    {{.i18n.Tr "admin.config.default_visibility_organization"}}
    +
    {{.Service.DefaultOrgVisibility}}
    + +
    {{.i18n.Tr "admin.config.no_reply_address"}}
    +
    {{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}
    +
    {{.i18n.Tr "admin.config.default_enable_dependencies"}}
    +
    +
    +
    {{.i18n.Tr "admin.config.active_code_lives"}}
    +
    {{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}
    +
    {{.i18n.Tr "admin.config.reset_password_code_lives"}}
    +
    {{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}
    +
    +
    + +

    + {{.i18n.Tr "admin.config.webhook_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.queue_length"}}
    +
    {{.Webhook.QueueLength}}
    +
    {{.i18n.Tr "admin.config.deliver_timeout"}}
    +
    {{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.i18n.Tr "admin.config.skip_tls_verify"}}
    +
    +
    +
    + +

    + {{.i18n.Tr "admin.config.mailer_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.mailer_enabled"}}
    +
    + {{if .MailerEnabled}} +
    {{.i18n.Tr "admin.config.mailer_name"}}
    +
    {{.Mailer.Name}}
    + {{if eq .Mailer.MailerType "smtp"}} +
    {{.i18n.Tr "admin.config.mailer_disable_helo"}}
    +
    +
    {{.i18n.Tr "admin.config.mailer_host"}}
    +
    {{.Mailer.Host}}
    + {{else if eq .Mailer.MailerType "sendmail"}} +
    {{.i18n.Tr "admin.config.mailer_use_sendmail"}}
    +
    +
    {{.i18n.Tr "admin.config.mailer_sendmail_path"}}
    +
    {{.Mailer.SendmailPath}}
    +
    {{.i18n.Tr "admin.config.mailer_sendmail_args"}}
    +
    {{.Mailer.SendmailArgs}}
    + {{end}} +
    {{.i18n.Tr "admin.config.mailer_user"}}
    +
    {{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}

    +
    + {{.CsrfTokenHtml}} +
    +
    + +
    +
    + +
    + {{end}} +
    +
    + +

    + {{.i18n.Tr "admin.config.cache_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.cache_adapter"}}
    +
    {{.CacheAdapter}}
    + {{if eq .CacheAdapter "memory"}} +
    {{.i18n.Tr "admin.config.cache_interval"}}
    +
    {{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}
    + {{end}} + {{if .CacheConn}} +
    {{.i18n.Tr "admin.config.cache_conn"}}
    +
    {{.CacheConn}}
    +
    {{.i18n.Tr "admin.config.cache_item_ttl"}}
    +
    {{.CacheItemTTL}}
    + {{end}} +
    +
    + +

    + {{.i18n.Tr "admin.config.session_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.session_provider"}}
    +
    {{.SessionConfig.Provider}}
    +
    {{.i18n.Tr "admin.config.provider_config"}}
    +
    {{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}
    +
    {{.i18n.Tr "admin.config.cookie_name"}}
    +
    {{.SessionConfig.CookieName}}
    +
    {{.i18n.Tr "admin.config.gc_interval_time"}}
    +
    {{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.i18n.Tr "admin.config.session_life_time"}}
    +
    {{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.i18n.Tr "admin.config.https_only"}}
    +
    +
    {{.i18n.Tr "admin.config.cookie_life_time"}}
    +
    {{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    +
    + +

    + {{.i18n.Tr "admin.config.picture_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.disable_gravatar"}}
    +
    +
    +
    {{.i18n.Tr "admin.config.enable_federated_avatar"}}
    +
    +
    +
    + +

    + {{.i18n.Tr "admin.config.git_config"}} +

    +
    +
    +
    {{.i18n.Tr "admin.config.git_disable_diff_highlight"}}
    +
    +
    {{.i18n.Tr "admin.config.git_max_diff_lines"}}
    +
    {{.Git.MaxGitDiffLines}}
    +
    {{.i18n.Tr "admin.config.git_max_diff_line_characters"}}
    +
    {{.Git.MaxGitDiffLineCharacters}}
    +
    {{.i18n.Tr "admin.config.git_max_diff_files"}}
    +
    {{.Git.MaxGitDiffFiles}}
    +
    {{.i18n.Tr "admin.config.git_gc_args"}}
    +
    {{.Git.GCArgs}}
    +
    +
    {{.i18n.Tr "admin.config.git_migrate_timeout"}}
    +
    {{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.i18n.Tr "admin.config.git_mirror_timeout"}}
    +
    {{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.i18n.Tr "admin.config.git_clone_timeout"}}
    +
    {{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.i18n.Tr "admin.config.git_pull_timeout"}}
    +
    {{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.i18n.Tr "admin.config.git_gc_timeout"}}
    +
    {{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    +
    + +

    + {{.i18n.Tr "admin.config.log_config"}} +

    +
    +
    + {{range .Loggers.default.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.log_mode"}}
    +
    {{.Name}} ({{.Provider}})
    +
    {{$.i18n.Tr "admin.config.log_config"}}
    +
    {{.Config | JsonPrettyPrint}}
    + {{end}} +
    +
    {{$.i18n.Tr "admin.config.macaron_log_mode"}}
    + {{if .RedirectMacaronLog}} + {{if .Loggers.macaron.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.own_named_logger"}}
    + {{range .Loggers.macaron.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.log_mode"}}
    +
    {{.Name}} ({{.Provider}})
    +
    {{$.i18n.Tr "admin.config.log_config"}}
    +
    {{.Config | JsonPrettyPrint}}
    + {{end}} + {{else}} +
    {{$.i18n.Tr "admin.config.routes_to_default_logger"}}
    + {{end}} + {{else}} +
    {{$.i18n.Tr "admin.config.go_log"}}
    + {{end}} +
    +
    {{$.i18n.Tr "admin.config.router_log_mode"}}
    + {{if .DisableRouterLog}} +
    {{$.i18n.Tr "admin.config.disabled_logger"}}
    + {{else}} + {{if .RedirectMacaronLog}} + {{if .Loggers.router.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.own_named_logger"}}
    + {{range .Loggers.router.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.log_mode"}}
    +
    {{.Name}} ({{.Provider}})
    +
    {{$.i18n.Tr "admin.config.log_config"}}
    +
    {{.Config | JsonPrettyPrint}}
    + {{end}} + {{else}} +
    {{$.i18n.Tr "admin.config.routes_to_default_logger"}}
    + {{end}} + {{else}} +
    {{$.i18n.Tr "admin.config.go_log"}}
    + {{end}} + {{end}} +
    +
    {{$.i18n.Tr "admin.config.access_log_mode"}}
    + {{if .EnableAccessLog}} + {{if .Loggers.access.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.own_named_logger"}}
    + {{range .Loggers.access.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.log_mode"}}
    +
    {{.Name}} ({{.Provider}})
    +
    {{$.i18n.Tr "admin.config.log_config"}}
    +
    {{.Config | JsonPrettyPrint}}
    + {{end}} + {{else}} +
    {{$.i18n.Tr "admin.config.routes_to_default_logger"}}
    + {{end}} +
    {{$.i18n.Tr "admin.config.access_log_template"}}
    +
    {{$.AccessLogTemplate}}
    + {{else}} +
    {{$.i18n.Tr "admin.config.disabled_logger"}}
    + {{end}} +
    +
    {{$.i18n.Tr "admin.config.xorm_log_mode"}}
    + {{if .EnableXORMLog}} + {{if .Loggers.xorm.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.own_named_logger"}}
    + {{range .Loggers.xorm.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.log_mode"}}
    +
    {{.Name}} ({{.Provider}})
    +
    {{$.i18n.Tr "admin.config.log_config"}}
    +
    {{.Config | JsonPrettyPrint}}
    + {{end}} + {{else}} +
    {{$.i18n.Tr "admin.config.routes_to_default_logger"}}
    + {{end}} +
    {{$.i18n.Tr "admin.config.xorm_log_sql"}}
    +
    + {{else}} +
    {{$.i18n.Tr "admin.config.disabled_logger"}}
    + {{end}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/admin/dashboard.tmpl b/admin/dashboard.tmpl new file mode 100644 index 0000000..262db04 --- /dev/null +++ b/admin/dashboard.tmpl @@ -0,0 +1,133 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "admin.dashboard.statistic"}} +

    +
    +

    + {{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}} +

    +
    +

    + {{.i18n.Tr "admin.dashboard.operations"}} +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    {{.i18n.Tr "admin.dashboard.delete_repo_archives"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    {{.i18n.Tr "admin.dashboard.delete_missing_repos"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    {{.i18n.Tr "admin.dashboard.git_gc_repos"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    {{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    {{.i18n.Tr "admin.dashboard.resync_all_hooks"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    {{.i18n.Tr "admin.dashboard.reinit_missing_repos"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    {{.i18n.Tr "admin.dashboard.sync_external_users"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    {{.i18n.Tr "admin.dashboard.git_fsck"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    {{.i18n.Tr "admin.dashboard.delete_generated_repository_avatars"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
    +
    + +

    + {{.i18n.Tr "admin.dashboard.system_status"}} +

    +
    +
    +
    {{.i18n.Tr "admin.dashboard.server_uptime"}}
    +
    {{.SysStatus.Uptime}}
    +
    {{.i18n.Tr "admin.dashboard.current_goroutine"}}
    +
    {{.SysStatus.NumGoroutine}}
    +
    +
    {{.i18n.Tr "admin.dashboard.current_memory_usage"}}
    +
    {{.SysStatus.MemAllocated}}
    +
    {{.i18n.Tr "admin.dashboard.total_memory_allocated"}}
    +
    {{.SysStatus.MemTotal}}
    +
    {{.i18n.Tr "admin.dashboard.memory_obtained"}}
    +
    {{.SysStatus.MemSys}}
    +
    {{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}
    +
    {{.SysStatus.Lookups}}
    +
    {{.i18n.Tr "admin.dashboard.memory_allocate_times"}}
    +
    {{.SysStatus.MemMallocs}}
    +
    {{.i18n.Tr "admin.dashboard.memory_free_times"}}
    +
    {{.SysStatus.MemFrees}}
    +
    +
    {{.i18n.Tr "admin.dashboard.current_heap_usage"}}
    +
    {{.SysStatus.HeapAlloc}}
    +
    {{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}
    +
    {{.SysStatus.HeapSys}}
    +
    {{.i18n.Tr "admin.dashboard.heap_memory_idle"}}
    +
    {{.SysStatus.HeapIdle}}
    +
    {{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}
    +
    {{.SysStatus.HeapInuse}}
    +
    {{.i18n.Tr "admin.dashboard.heap_memory_released"}}
    +
    {{.SysStatus.HeapReleased}}
    +
    {{.i18n.Tr "admin.dashboard.heap_objects"}}
    +
    {{.SysStatus.HeapObjects}}
    +
    +
    {{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}
    +
    {{.SysStatus.StackInuse}}
    +
    {{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}
    +
    {{.SysStatus.StackSys}}
    +
    {{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}
    +
    {{.SysStatus.MSpanInuse}}
    +
    {{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}
    +
    {{.SysStatus.MSpanSys}}
    +
    {{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}
    +
    {{.SysStatus.MCacheInuse}}
    +
    {{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}
    +
    {{.SysStatus.MCacheSys}}
    +
    {{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}
    +
    {{.SysStatus.BuckHashSys}}
    +
    {{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}
    +
    {{.SysStatus.GCSys}}
    +
    {{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}
    +
    {{.SysStatus.OtherSys}}
    +
    +
    {{.i18n.Tr "admin.dashboard.next_gc_recycle"}}
    +
    {{.SysStatus.NextGC}}
    +
    {{.i18n.Tr "admin.dashboard.last_gc_time"}}
    +
    {{.SysStatus.LastGC}}
    +
    {{.i18n.Tr "admin.dashboard.total_gc_pause"}}
    +
    {{.SysStatus.PauseTotalNs}}
    +
    {{.i18n.Tr "admin.dashboard.last_gc_pause"}}
    +
    {{.SysStatus.PauseNs}}
    +
    {{.i18n.Tr "admin.dashboard.gc_times"}}
    +
    {{.SysStatus.NumGC}}
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/admin/hook_new.tmpl b/admin/hook_new.tmpl new file mode 100644 index 0000000..c047efe --- /dev/null +++ b/admin/hook_new.tmpl @@ -0,0 +1,43 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{if .PageIsAdminHooksNew}} + {{.i18n.Tr "admin.hooks.add_webhook"}} + {{else}} + {{.i18n.Tr "admin.hooks.update_webhook"}} + {{end}} +
    + {{if eq .HookType "gitea"}} + + {{else if eq .HookType "gogs"}} + + {{else if eq .HookType "slack"}} + + {{else if eq .HookType "discord"}} + + {{else if eq .HookType "dingtalk"}} + + {{else if eq .HookType "telegram"}} + + {{else if eq .HookType "msteams"}} + + {{end}} +
    +

    +
    + {{template "repo/settings/webhook/gitea" .}} + {{template "repo/settings/webhook/gogs" .}} + {{template "repo/settings/webhook/slack" .}} + {{template "repo/settings/webhook/discord" .}} + {{template "repo/settings/webhook/dingtalk" .}} + {{template "repo/settings/webhook/telegram" .}} + {{template "repo/settings/webhook/msteams" .}} +
    + + {{template "repo/settings/webhook/history" .}} +
    +
    +{{template "base/footer" .}} diff --git a/admin/hooks.tmpl b/admin/hooks.tmpl new file mode 100644 index 0000000..3265a1d --- /dev/null +++ b/admin/hooks.tmpl @@ -0,0 +1,8 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "repo/settings/webhook/list" .}} +
    +
    +{{template "base/footer" .}} diff --git a/admin/monitor.tmpl b/admin/monitor.tmpl new file mode 100644 index 0000000..6cc927d --- /dev/null +++ b/admin/monitor.tmpl @@ -0,0 +1,61 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "admin.monitor.cron"}} +

    +
    + + + + + + + + + + + + {{range .Entries}} + + + + + + + + {{end}} + +
    {{.i18n.Tr "admin.monitor.name"}}{{.i18n.Tr "admin.monitor.schedule"}}{{.i18n.Tr "admin.monitor.next"}}{{.i18n.Tr "admin.monitor.previous"}}{{.i18n.Tr "admin.monitor.execute_times"}}
    {{.Description}}{{.Spec}}{{DateFmtLong .Next}}{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}{{.ExecTimes}}
    +
    + +

    + {{.i18n.Tr "admin.monitor.process"}} +

    +
    + + + + + + + + + + + {{range .Processes}} + + + + + + + {{end}} + +
    Pid{{.i18n.Tr "admin.monitor.desc"}}{{.i18n.Tr "admin.monitor.start"}}{{.i18n.Tr "admin.monitor.execute_time"}}
    {{.PID}}{{.Description}}{{DateFmtLong .Start}}{{TimeSince .Start $.Lang}}
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/admin/nav.tmpl b/admin/nav.tmpl new file mode 100644 index 0000000..d95a0d7 --- /dev/null +++ b/admin/nav.tmpl @@ -0,0 +1,16 @@ +
    +

    {{.i18n.Tr "admin_panel"}}

    + +
    diff --git a/admin/navbar.tmpl b/admin/navbar.tmpl new file mode 100644 index 0000000..caa8c1f --- /dev/null +++ b/admin/navbar.tmpl @@ -0,0 +1,29 @@ + diff --git a/admin/notice.tmpl b/admin/notice.tmpl new file mode 100644 index 0000000..93fc8cc --- /dev/null +++ b/admin/notice.tmpl @@ -0,0 +1,80 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}}) +

    +
    + + + + + + + + + + + + + {{range .Notices}} + + + + + + + + + {{end}} + + {{ if .Notices }} + + + + + + + {{ end }} +
    ID{{.i18n.Tr "admin.notices.type"}}{{.i18n.Tr "admin.notices.desc"}}{{.i18n.Tr "admin.users.created"}}{{.i18n.Tr "admin.notices.op"}}
    +
    + +
    +
    {{.ID}}{{$.i18n.Tr .TrStr}}{{SubStr .Description 0 120}}...{{.CreatedUnix.FormatShort}}
    + + +
    + {{.i18n.Tr "admin.notices.delete_selected"}} +
    +
    +
    + + {{ template "base/paginate" . }} +
    +
    + + +{{template "base/footer" .}} diff --git a/admin/org/list.tmpl b/admin/org/list.tmpl new file mode 100644 index 0000000..e9dbc7f --- /dev/null +++ b/admin/org/list.tmpl @@ -0,0 +1,52 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) + +

    +
    + {{template "admin/base/search" .}} +
    +
    + + + + + + + + + + + + + + {{range .Users}} + + + + + + + + + + {{end}} + +
    ID{{.i18n.Tr "admin.orgs.name"}}{{.i18n.Tr "admin.orgs.teams"}}{{.i18n.Tr "admin.orgs.members"}}{{.i18n.Tr "admin.users.repos"}}{{.i18n.Tr "admin.users.created"}}{{.i18n.Tr "admin.users.edit"}}
    {{.ID}} + {{.Name}} + {{if .Visibility.IsPrivate}} + + {{end}} + {{.NumTeams}}{{.NumMembers}}{{.NumRepos}}{{.CreatedUnix.FormatShort}}
    +
    + + {{template "base/paginate" .}} +
    +
    +{{template "base/footer" .}} diff --git a/admin/repo/list.tmpl b/admin/repo/list.tmpl new file mode 100644 index 0000000..793d9c6 --- /dev/null +++ b/admin/repo/list.tmpl @@ -0,0 +1,70 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) +

    +
    + {{template "admin/repo/search" .}} +
    +
    + + + + + + + + + + + + + + + + + + {{range .Repos}} + + + + + + + + + + + + + + {{end}} + +
    ID{{.i18n.Tr "admin.repos.owner"}}{{.i18n.Tr "admin.repos.name"}}{{.i18n.Tr "admin.repos.private"}}{{.i18n.Tr "admin.repos.watches"}}{{.i18n.Tr "admin.repos.stars"}}{{.i18n.Tr "admin.repos.forks"}}{{.i18n.Tr "admin.repos.issues"}}{{.i18n.Tr "admin.repos.size"}}{{.i18n.Tr "admin.users.created"}}{{.i18n.Tr "admin.notices.op"}}
    {{.ID}} + {{.Owner.Name}} + {{if .Owner.Visibility.IsPrivate}} + + {{end}} + {{.Name}}{{.NumWatches}}{{.NumStars}}{{.NumForks}}{{.NumIssues}}{{SizeFmt .Size}}{{.CreatedUnix.FormatShort}}
    +
    + + {{template "base/paginate" .}} +
    +
    + + +{{template "base/footer" .}} diff --git a/admin/repo/search.tmpl b/admin/repo/search.tmpl new file mode 100644 index 0000000..8e69f7c --- /dev/null +++ b/admin/repo/search.tmpl @@ -0,0 +1,29 @@ + +
    +
    + + +
    +
    diff --git a/admin/user/edit.tmpl b/admin/user/edit.tmpl new file mode 100644 index 0000000..b2ec622 --- /dev/null +++ b/admin/user/edit.tmpl @@ -0,0 +1,128 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "admin.users.edit_account"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + {{.User.Name}} +
    + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    + + +

    {{.i18n.Tr "admin.users.password_helper"}}

    +
    +
    + + +
    +
    + + +
    + +
    + +
    + + +

    {{.i18n.Tr "admin.users.max_repo_creation_desc"}}

    +
    + +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + {{if not .DisableRegularOrgCreation}} +
    +
    + + +
    +
    + {{end}} + +
    + +
    + +
    {{.i18n.Tr "admin.users.delete_account"}}
    +
    +
    +
    +
    +
    + + +{{template "base/footer" .}} diff --git a/admin/user/list.tmpl b/admin/user/list.tmpl new file mode 100644 index 0000000..d590526 --- /dev/null +++ b/admin/user/list.tmpl @@ -0,0 +1,55 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) + +

    +
    + {{template "admin/base/search" .}} +
    +
    + + + + + + + + + + + + + + + + {{range .Users}} + + + + + + + + + {{if .LastLoginUnix}} + + {{else}} + + {{end}} + + + {{end}} + +
    ID{{.i18n.Tr "admin.users.name"}}{{.i18n.Tr "email"}}{{.i18n.Tr "admin.users.activated"}}{{.i18n.Tr "admin.users.admin"}}{{.i18n.Tr "admin.users.repos"}}{{.i18n.Tr "admin.users.created"}}{{.i18n.Tr "admin.users.last_login"}}{{.i18n.Tr "admin.users.edit"}}
    {{.ID}}{{.Name}}{{.NumRepos}}{{.CreatedUnix.FormatShort}}{{.LastLoginUnix.FormatShort}}{{$.i18n.Tr "admin.users.never_login"}}
    +
    + + {{template "base/paginate" .}} +
    +
    +{{template "base/footer" .}} diff --git a/admin/user/new.tmpl b/admin/user/new.tmpl new file mode 100644 index 0000000..06b7d70 --- /dev/null +++ b/admin/user/new.tmpl @@ -0,0 +1,69 @@ +{{template "base/head" .}} +
    + {{template "admin/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "admin.users.new_account"}} +

    +
    +
    + {{.CsrfTokenHtml}} + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    + + +
    + +
    +
    + + +
    +
    + + + {{if .CanSendEmail}} +
    +
    + + +
    +
    + {{end}} + +
    + +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/base/alert.tmpl b/base/alert.tmpl new file mode 100644 index 0000000..61b9948 --- /dev/null +++ b/base/alert.tmpl @@ -0,0 +1,15 @@ +{{if .Flash.ErrorMsg}} +
    +

    {{.Flash.ErrorMsg | Str2html}}

    +
    +{{end}} +{{if .Flash.SuccessMsg}} +
    +

    {{.Flash.SuccessMsg | Str2html}}

    +
    +{{end}} +{{if .Flash.InfoMsg}} +
    +

    {{.Flash.InfoMsg | Str2html}}

    +
    +{{end}} diff --git a/base/delete_modal_actions.tmpl b/base/delete_modal_actions.tmpl new file mode 100644 index 0000000..a889c67 --- /dev/null +++ b/base/delete_modal_actions.tmpl @@ -0,0 +1,10 @@ +
    +
    + + {{.i18n.Tr "modal.no"}} +
    +
    + + {{.i18n.Tr "modal.yes"}} +
    +
    diff --git a/base/footer.tmpl b/base/footer.tmpl new file mode 100644 index 0000000..2a4b895 --- /dev/null +++ b/base/footer.tmpl @@ -0,0 +1,136 @@ +{{/* + + +
    +*/}} + + {{template "custom/body_inner_post" .}} + +
    + + {{template "custom/body_outer_post" .}} + + {{template "base/footer_content" .}} + + + + +{{if .RequireSimpleMDE}} + + + + +{{end}} +{{if .RequireGitGraph}} + + + +{{end}} + + +{{if .RequireHighlightJS}} + +{{end}} +{{if .RequireMinicolors}} + +{{end}} +{{if .RequireDatetimepicker}} + +{{end}} +{{if .RequireDropzone}} + +{{end}} +{{if .RequireU2F}} + +{{end}} +{{if .EnableCaptcha}} + {{if eq .CaptchaType "recaptcha"}} + + {{end}} +{{end}} +{{if .RequireTribute}} + + + +{{end}} + + + + + + + +{{if .EnableHeatmap}} + + + +{{end}} +{{template "custom/footer" .}} + + diff --git a/base/footer_content.tmpl b/base/footer_content.tmpl new file mode 100644 index 0000000..6f680d4 --- /dev/null +++ b/base/footer_content.tmpl @@ -0,0 +1,25 @@ + diff --git a/base/head.tmpl b/base/head.tmpl new file mode 100644 index 0000000..7cdfdd3 --- /dev/null +++ b/base/head.tmpl @@ -0,0 +1,177 @@ + + + + + + + {{if .Title}}{{.Title}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} + + + + + + + + + + + + {{if .IsSigned}} + + {{end}} + {{if .ContextUser}} + + {{end}} + {{if .SearchLimit}} + + {{end}} +{{if .GoGetImport}} + + +{{end}} + + + + + + + + + +{{if .RequireSimpleMDE}} + +{{end}} + +{{if .RequireGitGraph}} + + +{{end}} + +{{if .RequireTribute}} + +{{end}} + + + + + + +{{if .RequireHighlightJS}} + +{{end}} +{{if .RequireMinicolors}} + +{{end}} +{{if .RequireDatetimepicker}} + +{{end}} +{{if .RequireDropzone}} + +{{end}} +{{if .EnableHeatmap}} + +{{end}} + + + + + +{{if .PageIsUserProfile}} + + + + + +{{else if .Repository}} + + + + + {{if .Repository.Description}} + + {{end}} + +{{else}} + + + + + +{{end}} +{{if .IsSigned }} + {{ if ne .SignedUser.Theme "gitea" }} + + {{end}} +{{else if ne DefaultTheme "gitea"}} + +{{end}} +{{template "custom/header" .}} + + + {{template "custom/body_outer_pre" .}} + +
    + + + {{template "custom/body_inner_pre" .}} + + {{if not .PageIsInstall}} + + {{end}} +{{/* +
    + + +*/}} diff --git a/base/head_navbar.tmpl b/base/head_navbar.tmpl new file mode 100644 index 0000000..390a1fe --- /dev/null +++ b/base/head_navbar.tmpl @@ -0,0 +1,134 @@ + diff --git a/base/paginate.tmpl b/base/paginate.tmpl new file mode 100644 index 0000000..da07fd2 --- /dev/null +++ b/base/paginate.tmpl @@ -0,0 +1,24 @@ +{{$paginationLink := .Page.GetParams}} +{{with .Page.Paginater}} + {{if gt .TotalPages 1}} +
    + +
    + {{end}} +{{end}} diff --git a/custom/body_inner_post.tmpl b/custom/body_inner_post.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/custom/body_inner_pre.tmpl b/custom/body_inner_pre.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/custom/body_outer_post.tmpl b/custom/body_outer_post.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/custom/body_outer_pre.tmpl b/custom/body_outer_pre.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/custom/extra_links.tmpl b/custom/extra_links.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/custom/extra_tabs.tmpl b/custom/extra_tabs.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/custom/footer.tmpl b/custom/footer.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/custom/header.tmpl b/custom/header.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/explore/code.tmpl b/explore/code.tmpl new file mode 100644 index 0000000..742ed59 --- /dev/null +++ b/explore/code.tmpl @@ -0,0 +1,55 @@ +{{template "base/head" .}} +
    + {{template "explore/navbar" .}} +
    +
    +
    + + + +
    +
    +
    + +
    + {{if .SearchResults}} +

    + {{.i18n.Tr "explore.code_search_results" (.Keyword|Escape) | Str2html }} +

    + + {{else}} +
    {{$.i18n.Tr "explore.code_no_results"}}
    + {{end}} +
    + + {{template "base/paginate" .}} +
    +
    +{{template "base/footer" .}} + diff --git a/explore/navbar.tmpl b/explore/navbar.tmpl new file mode 100644 index 0000000..3bd5264 --- /dev/null +++ b/explore/navbar.tmpl @@ -0,0 +1,16 @@ + diff --git a/explore/organizations.tmpl b/explore/organizations.tmpl new file mode 100644 index 0000000..4e2bfc9 --- /dev/null +++ b/explore/organizations.tmpl @@ -0,0 +1,38 @@ +{{template "base/head" .}} +
    + {{template "explore/navbar" .}} +
    + {{template "explore/search" .}} + +
    + {{range .Users}} +
    + +
    + + {{.Name}} {{.FullName}} + {{if .Visibility.IsPrivate}} + + {{end}} + +
    + {{if .Location}} + {{.Location}} + {{end}} + {{if and .Website}} + + {{.Website}} + {{end}} + {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}} +
    +
    +
    + {{else}} +
    {{$.i18n.Tr "explore.org_no_results"}}
    + {{end}} +
    + + {{template "base/paginate" .}} +
    +
    +{{template "base/footer" .}} diff --git a/explore/repo_list.tmpl b/explore/repo_list.tmpl new file mode 100644 index 0000000..8c7ba51 --- /dev/null +++ b/explore/repo_list.tmpl @@ -0,0 +1,45 @@ +
    + {{range .Repos}} +
    +
    + {{if .RelAvatarLink}} + + {{end}} + + {{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} + {{if .IsArchived}}{{end}} + + {{if .IsPrivate}} + + {{else if .IsFork}} + + {{else if .IsMirror}} + + {{else if .Owner}} + {{if .Owner.Visibility.IsPrivate}} + + {{end}} + {{end}} +
    + {{.NumStars}} + {{.NumForks}} +
    +
    +
    + {{if .DescriptionHTML}}

    {{.DescriptionHTML}}

    {{end}} + {{if .Topics }} +
    + {{range .Topics}} + {{if ne . "" }}
    {{.}}
    {{end}} + {{end}} +
    + {{end}} +

    {{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}

    +
    +
    + {{else}} +
    + {{$.i18n.Tr "explore.repo_no_results"}} +
    + {{end}} +
    diff --git a/explore/repo_search.tmpl b/explore/repo_search.tmpl new file mode 100644 index 0000000..62bb5ea --- /dev/null +++ b/explore/repo_search.tmpl @@ -0,0 +1,30 @@ + +
    +
    + + + + +
    +
    +
    diff --git a/explore/repos.tmpl b/explore/repos.tmpl new file mode 100644 index 0000000..c728219 --- /dev/null +++ b/explore/repos.tmpl @@ -0,0 +1,10 @@ +{{template "base/head" .}} +
    + {{template "explore/navbar" .}} +
    + {{template "explore/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} +
    +
    +{{template "base/footer" .}} diff --git a/explore/search.tmpl b/explore/search.tmpl new file mode 100644 index 0000000..906dd06 --- /dev/null +++ b/explore/search.tmpl @@ -0,0 +1,25 @@ + +
    +
    + + + +
    +
    +
    diff --git a/explore/users.tmpl b/explore/users.tmpl new file mode 100644 index 0000000..32a3693 --- /dev/null +++ b/explore/users.tmpl @@ -0,0 +1,33 @@ +{{template "base/head" .}} +
    + {{template "explore/navbar" .}} +
    + {{template "explore/search" .}} + +
    + {{range .Users}} +
    + +
    + {{.Name}} {{.FullName}} +
    + {{if .Location}} + {{.Location}} + {{end}} + {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}} + + {{.Email}} + {{end}} + {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}} +
    +
    +
    + {{else}} +
    {{$.i18n.Tr "explore.user_no_results"}}
    + {{end}} +
    + + {{template "base/paginate" .}} +
    +
    +{{template "base/footer" .}} diff --git a/home.tmpl b/home.tmpl new file mode 100644 index 0000000..d31094a --- /dev/null +++ b/home.tmpl @@ -0,0 +1,474 @@ +{{template "base/head" .}} +
    +
    +
    +
    + +
    +
    +

    + {{AppName}} +

    +

    {{.i18n.Tr "app_desc"}}

    +
    +
    +
    + {{if eq .Lang "de-DE"}} +
    +
    +

    + Einfach zu installieren +

    +

    + Starte einfach die Anwendung für deine Plattform. Gitea gibt es auch für Docker, Vagrant oder als Installationspaket. +

    +
    +
    +

    + Plattformübergreifend +

    +

    + Gitea läuft überall. Go kompiliert für: Windows, macOS, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt! +

    +
    +
    +
    +
    +

    + Leichtgewicht +

    +

    + Gitea hat minimale Systemanforderungen und kann selbst auf einem günstigen und stromsparenden Raspberry Pi betrieben werden. +

    +
    +
    +

    + Quelloffen +

    +

    + Der komplette Code befindet sich auf GitHub! Unterstütze uns bei der Verbesserung dieses Projekts. Trau dich! +

    +
    +
    + {{else if eq .Lang "zh-TW"}} +
    +
    +

    + 易安裝 +

    +

    + 直接用 執行檔安裝,還可以透過 DockerVagrant,以及 套件安装。 +

    +
    +
    +

    + 跨平台 +

    +

    + Gitea 可以運作在任何 Go 語言能夠編譯的平台: Windows, macOS, Linux, ARM 等等。挑一個您喜歡的就好。 +

    +
    +
    +
    +
    +

    + 輕量級 +

    +

    + 一個便宜的樹莓派 Raspberry Pi 就可以滿足 Gitea 的最低系統需求,節省機器資源! +

    +
    +
    +

    + 開源化 +

    +

    + 所有程式碼都在 GitHub 上,加入我們讓 Gitea 更好,別害羞,你可以做到的。 +

    +
    +
    + {{else if eq .Lang "zh-CN"}} +
    +
    +

    + 易安装 +

    +

    + 您除了可以根据操作系统平台通过 二进制运行,还可以通过 DockerVagrant,以及 包管理 安装。 +

    +
    +
    +

    + 跨平台 +

    +

    + 任何 Go 语言 支持的平台都可以运行 Gitea,包括 Windows、Mac、Linux 以及 ARM。挑一个您喜欢的就行! +

    +
    +
    +
    +
    +

    + 轻量级 +

    +

    + 一个廉价的树莓派的配置足以满足 Gitea 的最低系统硬件要求。最大程度上节省您的服务器资源! +

    +
    +
    +

    + 开源化 +

    +

    + 所有的代码都开源在 GitHub 上,赶快加入我们来共同发展这个伟大的项目!还等什么?成为贡献者吧! +

    +
    +
    + {{else if eq .Lang "fr-FR"}} +
    +
    +

    + Facile à installer +

    +

    + Il suffit de lancer l'exécutable correspondant à votre système. + Ou d'utiliser Gitea avec Docker ou + Vagrant + ou en l'installant depuis un package. +

    +
    +
    +

    + Multi-plateforme +

    +

    + Gitea tourne partout où Go peut être compilé : Windows, macOS, Linux, ARM, etc. Choisissez votre préféré ! +

    +
    +
    +
    +
    +

    + Léger +

    +

    + Gitea utilise peu de ressources. Il peut même tourner sur un Raspberry Pi très bon marché. Économisez l'énergie de vos serveurs ! +

    +
    +
    +

    + Open Source +

    +

    + Toutes les sources sont sur GitHub ! Rejoignez-nous et contribuez à rendre ce projet encore meilleur. +

    +
    +
    + {{else if eq .Lang "es-ES"}} +
    +
    +

    + Fácil de instalar +

    +

    + Simplemente arranca el binario para tu plataforma. O usa Gitea con Docker o Vagrant, o utilice el paquete. +

    +
    +
    +

    + Multiplatforma +

    +

    + Gitea funciona en cualquier parte, Go puede compilarse en: Windows, macOS, Linux, ARM, etc. !Elige tu favorita! +

    +
    +
    +
    +
    +

    + Ligero +

    +

    + Gitea tiene pocos requisitos y puede funcionar en una Raspberry Pi barata. !Ahorra energía! +

    +
    +
    +

    + Open Source +

    +

    + ¡Está todo en GitHub! Uniros contribuyendo a hacer este proyecto todavía mejor. ¡No seas tímido y colabora! +

    +
    +
    + {{else if eq .Lang "pt-BR"}} +
    +
    +

    + Fácil de instalar +

    +

    + Simplesmente rode o executável para o seu sistema operacional. Ou obtenha o Gitea com o Docker ou Vagrant, ou baixe o pacote. +

    +
    +
    +

    + Multi-plataforma +

    +

    + Gitea roda em qualquer sistema operacional em que Go consegue compilar: Windows, macOS, Linux, ARM, etc. Escolha qual você gosta mais! +

    +
    +
    +
    +
    +

    + Leve e rápido +

    +

    + Gitea utiliza poucos recursos e consegue mesmo rodar no barato Raspberry Pi. Economize energia elétrica da sua máquina! +

    +
    +
    +

    + Código aberto +

    +

    + Está tudo no GitHub! Contribua e torne este projeto ainda melhor. Não tenha vergonha de contribuir! +

    +
    +
    + {{else if eq .Lang "ru-RU"}} +
    +
    +

    + Простой в установке +

    +

    + Просто запустите исполняемый файл для вашей платформы. Иcпользуйте Gitea с Docker или Vagrant, или загрузите пакет. +

    +
    +
    +

    + Кроссплатформенный +

    +

    + Gitea работает на любой операционной системе, которая может компилировать Go: Windows, macOS, Linux, ARM и т. д. Выбирайте, что вам больше нравится! +

    +
    +
    +
    +
    +

    + Легковесный +

    +

    + Gitea имеет низкие системные требования и может работать на недорогом Raspberry Pi. Экономьте энергию вашей машины! +

    +
    +
    +

    + Открытый исходный код +

    +

    + Всё это на GitHub! Присоединяйтесь к нам, внося вклад, чтобы сделать этот проект еще лучше. Не бойтесь помогать! +

    +
    +
    + {{else if eq .Lang "nl-NL"}} +
    +
    +

    + Makkelijk te installeren +

    +

    + Je hoeft alleen maar de binary uit te voeren. Of gebruik Gitea met Docker, Vagrant, of download een installatiepakket. +

    +
    +
    +

    + Cross-platform +

    +

    + Gitea werkt op alles waar Go op kan compileren: Windows, macOS, Linux, ARM, etc. Kies het platform dat bij je past! +

    +
    +
    +
    +
    +

    + Lichtgewicht +

    +

    + Gitea heeft hele lage systeemeisen, je kunt Gitea al draaien op een goedkope Raspberry Pi. +

    +
    +
    +

    + Open Source +

    +

    + Alles staat op GitHub! Help ons door mee te bouwen aan Gitea, samen maken we dit project nog beter. Aarzel dus niet om een bijdrage te leveren! +

    +
    +
    + {{else if eq .Lang "cs-CZ"}} +
    +
    +

    + Jednoduchá na instalaci +

    +

    + Jednoduše spusťte binárku pro vaší platformu. Je také k dispozici pro Docker nebo Vagrant, nebo ji získejte z balíčku. +

    +
    +
    +

    + Multiplatformní +

    +

    + Gitea běží všude, kde Go může kompilovat: Windows, macOS, Linux, ARM, atd. Vyberte si ten, který milujete! +

    +
    +
    +
    +
    +

    + Lehká +

    +

    + Gitea má minimální požadavky a může běžet na Raspberry Pi. Šetřete energii vašeho stroje! +

    +
    +
    +

    + Open Source +

    +

    + Vše je na GitHubu! Připojte se tím, že přispějete a uděláte tento projekt ještě lepší. Nestyďte se být přispěvatel! +

    +
    +
    + {{else if eq .Lang "it-IT"}} +
    +
    +

    + Facile da installare +

    +

    + Semplicemente avvia l'eseguibile per la tua piattaforma. Oppure avvia Gitea con Docker o con Vagrant, oppure ottienilo pacchettizzato. +

    +
    +
    +

    + Multipiattaforma +

    +

    + Gitea funziona ovunque Go possa essere compilato: Windows, macOS, Linux, ARM, etc. Scegli ciò che ami! +

    +
    +
    +
    +
    +

    + Leggero +

    +

    + Gitea ha requisiti minimi bassi e può funzionare su un economico Raspberry Pi. Risparmia l'energia della tua macchina! +

    +
    +
    +

    + Open Source +

    +

    +Ottieni code.gitea.io/gitea! +Partecipa per contribuire +a rendere questo progetto ancora migliore. +Non aver paura di diventare un collaboratore! +

    +
    +
    + {{else if eq .Lang "lv-LV"}} +
    +
    +

    + Vienkārši instalējams +

    +

    + Nepieciešams tikai palaist izpildāmo failu vajadzīgajai platformai. Vai izmantot Docker vai Vagrant, vai izmantot pakotni. +

    +
    +
    +

    + Pieejama dažādām platformām +

    +

    + Gitea iespējams uzstādīt jebkur, kam Go var nokompilēt: Windows, macOS, Linux, ARM utt. Izvēlies to, kas tev patīk! +

    +
    +
    +
    +
    +

    + Viegla +

    +

    + Gitea ir miminālas prasības un to var darbināt uz nedārga Raspberry Pi datora. Ietaupi savai ierīcei jaudu! +

    +
    +
    +

    + Arvērtā pirmkoda +

    +

    +Iegūsti code.gitea.io/gitea! +Pievienojies un palīdzi uzlabot, +lai padarītu šo projektu vēl labāku! +Nekautrējies un līdzdarbojies! +

    +
    +
    + {{else}} +
    +
    +

    + Easy to install +

    +

    + Simply run the binary for your platform. Or ship Gitea with Docker or Vagrant, or get it packaged. +

    +
    +
    +

    + Cross-platform +

    +

    + Gitea runs anywhere Go can compile for: Windows, macOS, Linux, ARM, etc. Choose the one you love! +

    +
    +
    +
    +
    +

    + Lightweight +

    +

    + Gitea has low minimal requirements and can run on an inexpensive Raspberry Pi. Save your machine energy! +

    +
    +
    +

    + Open Source +

    +

    +Go get code.gitea.io/gitea! +Join us by contributing +to make this project even better. +Don't be shy to be a contributor! +

    +
    +
    + {{end}} +
    +{{template "base/footer" .}} diff --git a/install.tmpl b/install.tmpl new file mode 100644 index 0000000..f8d1ef0 --- /dev/null +++ b/install.tmpl @@ -0,0 +1,305 @@ +{{template "base/head" .}} +
    +
    +
    +

    + {{.i18n.Tr "install.title"}} +

    +
    + {{template "base/alert" .}} + +

    {{.i18n.Tr "install.docker_helper" "https://docs.gitea.io/en-us/install-with-docker/" | Safe}}

    + +
    + +

    {{.i18n.Tr "install.db_title"}}

    +

    {{.i18n.Tr "install.requite_db_desc"}}

    +
    + + +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + + {{.i18n.Tr "install.db_helper"}} +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + + {{.i18n.Tr "install.sqlite_helper" | Safe}} +
    +
    + + +

    {{.i18n.Tr "install.general_title"}}

    +
    + + + {{.i18n.Tr "install.app_name_helper"}} +
    +
    + + + {{.i18n.Tr "install.repo_path_helper"}} +
    +
    + + + {{.i18n.Tr "install.lfs_path_helper"}} +
    +
    + + + {{.i18n.Tr "install.run_user_helper"}} +
    +
    + + + {{.i18n.Tr "install.domain_helper"}} +
    +
    + + + {{.i18n.Tr "install.ssh_port_helper"}} +
    +
    + + + {{.i18n.Tr "install.http_port_helper"}} +
    +
    + + + {{.i18n.Tr "install.app_url_helper"}} +
    +
    + + + {{.i18n.Tr "install.log_root_path_helper"}} +
    + + + +

    {{.i18n.Tr "install.optional_title"}}

    + + +
    +
    + + {{.i18n.Tr "install.email_title"}} +
    +
    +
    + + +
    +
    + + + {{.i18n.Tr "install.smtp_from_helper"}} +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + {{.i18n.Tr "install.server_service_title"}} +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + + {{.i18n.Tr "install.no_reply_address_helper"}} +
    +
    +
    + + +
    +
    + + {{.i18n.Tr "install.admin_title"}} +
    +
    +

    {{.i18n.Tr "install.admin_setting_desc"}}

    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/mail/auth/activate.tmpl b/mail/auth/activate.tmpl new file mode 100644 index 0000000..37fdbd7 --- /dev/null +++ b/mail/auth/activate.tmpl @@ -0,0 +1,15 @@ + + + + + {{.DisplayName}}, please activate your account + + + +

    Hi {{.DisplayName}}, thanks for registering at {{AppName}}!

    +

    Please click the following link to activate your account within {{.ActiveCodeLives}}:

    +

    {{AppUrl}}user/activate?code={{.Code}}

    +

    Not working? Try copying and pasting it to your browser.

    +

    © {{AppName}}

    + + diff --git a/mail/auth/activate_email.tmpl b/mail/auth/activate_email.tmpl new file mode 100644 index 0000000..ebcaa0e --- /dev/null +++ b/mail/auth/activate_email.tmpl @@ -0,0 +1,15 @@ + + + + + {{.DisplayName}}, please verify your e-mail address + + + +

    Hi {{.DisplayName}},

    +

    Please click the following link to verify your email address within {{.ActiveCodeLives}}:

    +

    {{AppUrl}}user/activate_email?code={{.Code}}&email={{.Email}}

    +

    Not working? Try copying and pasting it to your browser.

    +

    © {{AppName}}

    + + diff --git a/mail/auth/register_notify.tmpl b/mail/auth/register_notify.tmpl new file mode 100644 index 0000000..ea18570 --- /dev/null +++ b/mail/auth/register_notify.tmpl @@ -0,0 +1,15 @@ + + + + + {{.DisplayName}}, welcome to {{AppName}} + + + +

    Hi {{.DisplayName}}, this is your registration confirmation email for {{AppName}}!

    +

    You can now login via username: {{.Username}}.

    +

    {{AppUrl}}user/login

    +

    If this account has been created for you, please set your password first.

    +

    © {{AppName}}

    + + diff --git a/mail/auth/reset_passwd.tmpl b/mail/auth/reset_passwd.tmpl new file mode 100644 index 0000000..e01d57c --- /dev/null +++ b/mail/auth/reset_passwd.tmpl @@ -0,0 +1,16 @@ + + + + + {{.DisplayName}}, you have requested to recover your account + + + +

    Hi {{.DisplayName}},

    +

    Please click the following link to recover your account within {{.ResetPwdCodeLives}}:

    + +

    {{AppUrl}}user/recover_account?code={{.Code}}

    +

    Not working? Try copying and pasting it to your browser.

    +

    © {{AppName}}

    + + diff --git a/mail/issue/comment.tmpl b/mail/issue/comment.tmpl new file mode 100644 index 0000000..cc86add --- /dev/null +++ b/mail/issue/comment.tmpl @@ -0,0 +1,16 @@ + + + + + {{.Subject}} + + + +

    {{.Body | Str2html}}

    +

    + --- +
    + View it on Gitea. +

    + + diff --git a/mail/issue/mention.tmpl b/mail/issue/mention.tmpl new file mode 100644 index 0000000..032eea0 --- /dev/null +++ b/mail/issue/mention.tmpl @@ -0,0 +1,17 @@ + + + + + {{.Subject}} + + + +

    @{{.Doer.Name}} mentioned you:

    +

    {{.Body | Str2html}}

    +

    + --- +
    + View it on Gitea. +

    + + diff --git a/mail/notify/collaborator.tmpl b/mail/notify/collaborator.tmpl new file mode 100644 index 0000000..4bbf40b --- /dev/null +++ b/mail/notify/collaborator.tmpl @@ -0,0 +1,16 @@ + + + + + {{.Subject}} + + + +

    You have been added as a collaborator of repository: {{.RepoName}}

    +

    + --- +
    + View it on Gitea. +

    + + diff --git a/org/create.tmpl b/org/create.tmpl new file mode 100644 index 0000000..82c8766 --- /dev/null +++ b/org/create.tmpl @@ -0,0 +1,58 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{.i18n.Tr "new_org"}} +

    +
    + {{template "base/alert" .}} +
    + + + {{.i18n.Tr "org.org_name_helper"}} +
    + +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    + +
    + + + {{.i18n.Tr "cancel"}} +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/org/header.tmpl b/org/header.tmpl new file mode 100644 index 0000000..806682a --- /dev/null +++ b/org/header.tmpl @@ -0,0 +1,26 @@ +{{with .Org}} +
    + +
    +
    +{{end}} diff --git a/org/home.tmpl b/org/home.tmpl new file mode 100644 index 0000000..03bb525 --- /dev/null +++ b/org/home.tmpl @@ -0,0 +1,82 @@ +{{template "base/head" .}} +
    + {{/* overflow: auto is the clearfix - this avoids the image going beyond + the container where it is supposed to stay inside. */}} +
    + +
    +
    + {{.Org.DisplayName}} + {{if .IsOrganizationOwner}}{{end}} +
    + {{if .Org.Description}}

    {{.Org.Description}}

    {{end}} +
    + {{if .Org.Location}}
    {{.Org.Location}}
    {{end}} + {{if .Org.Website}}{{end}} +
    +
    +
    + +
    + +
    +
    +
    + {{if .IsOrganizationOwner}} + +
    + {{end}} + {{template "explore/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} +
    + +
    +

    + {{.i18n.Tr "org.people"}} + {{if .IsOrganizationMember}} + + {{end}} +

    +
    + {{$isMember := .IsOrganizationMember}} + {{range .Members}} + {{if or $isMember (.IsPublicMember $.Org.ID)}} + + {{end}} + {{end}} +
    + + {{if .IsOrganizationMember}} +
    + {{.i18n.Tr "org.teams"}} + +
    + + {{if .IsOrganizationOwner}} + + {{end}} + {{end}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/org/member/members.tmpl b/org/member/members.tmpl new file mode 100644 index 0000000..9db506e --- /dev/null +++ b/org/member/members.tmpl @@ -0,0 +1,62 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    + {{template "base/alert" .}} + +
    + {{ range .Members}} +
    +
    + +
    +
    + +
    {{.FullName}}
    +
    +
    +
    + {{$.i18n.Tr "org.members.membership_visibility"}} +
    +
    + {{ $isPublic := index $.MembersIsPublicMember .ID}} + {{if $isPublic}} + {{$.i18n.Tr "org.members.public"}} + {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}({{$.i18n.Tr "org.members.public_helper"}}){{end}} + {{else}} + {{$.i18n.Tr "org.members.private"}} + {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}({{$.i18n.Tr "org.members.private_helper"}}){{end}} + {{end}} +
    +
    +
    +
    + {{$.i18n.Tr "org.members.member_role"}} +
    +
    + {{if index $.MembersIsUserOrgOwner .ID}} {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}} +
    +
    +
    +
    + 2FA +
    +
    + +
    +
    +
    +
    + {{if eq $.SignedUser.ID .ID}} + {{$.i18n.Tr "org.members.leave"}} + {{else if $.IsOrganizationOwner}} + {{$.i18n.Tr "org.members.remove"}} + {{end}} +
    +
    +
    + {{end}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/org/settings/delete.tmpl b/org/settings/delete.tmpl new file mode 100644 index 0000000..3b0ee09 --- /dev/null +++ b/org/settings/delete.tmpl @@ -0,0 +1,43 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    +
    + {{template "org/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "org.settings.delete_account"}} +

    +
    +
    +

    {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}

    +
    +
    + {{.CsrfTokenHtml}} + +
    + + +
    +
    + {{.i18n.Tr "org.settings.confirm_delete_account"}} +
    +
    +
    +
    +
    +
    +
    + + +{{template "base/footer" .}} diff --git a/org/settings/hook_new.tmpl b/org/settings/hook_new.tmpl new file mode 100644 index 0000000..5db9101 --- /dev/null +++ b/org/settings/hook_new.tmpl @@ -0,0 +1,44 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    +
    + {{template "org/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}} +
    + {{if eq .HookType "gitea"}} + + {{else if eq .HookType "gogs"}} + + {{else if eq .HookType "slack"}} + + {{else if eq .HookType "discord"}} + + {{else if eq .HookType "dingtalk"}} + + {{else if eq .HookType "telegram"}} + + {{else if eq .HookType "msteams"}} + + {{end}} +
    +

    +
    + {{template "repo/settings/webhook/gitea" .}} + {{template "repo/settings/webhook/gogs" .}} + {{template "repo/settings/webhook/slack" .}} + {{template "repo/settings/webhook/discord" .}} + {{template "repo/settings/webhook/dingtalk" .}} + {{template "repo/settings/webhook/telegram" .}} + {{template "repo/settings/webhook/msteams" .}} +
    + + {{template "repo/settings/webhook/history" .}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/org/settings/hooks.tmpl b/org/settings/hooks.tmpl new file mode 100644 index 0000000..825b1e9 --- /dev/null +++ b/org/settings/hooks.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    +
    + {{template "org/settings/navbar" .}} +
    + {{template "repo/settings/webhook/list" .}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/org/settings/navbar.tmpl b/org/settings/navbar.tmpl new file mode 100644 index 0000000..09fca5d --- /dev/null +++ b/org/settings/navbar.tmpl @@ -0,0 +1,14 @@ +
    + +
    diff --git a/org/settings/options.tmpl b/org/settings/options.tmpl new file mode 100644 index 0000000..d58c77a --- /dev/null +++ b/org/settings/options.tmpl @@ -0,0 +1,103 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    +
    + {{template "org/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "org.settings.options"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    + + {{if .SignedUser.IsAdmin}} +
    + +
    + + +

    {{.i18n.Tr "admin.users.max_repo_creation_desc"}}

    +
    + {{end}} + +
    + +
    +
    + +
    + +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    + + {{$.i18n.Tr "settings.delete_current_avatar"}} +
    +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/org/team/members.tmpl b/org/team/members.tmpl new file mode 100644 index 0000000..74e5e19 --- /dev/null +++ b/org/team/members.tmpl @@ -0,0 +1,47 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    + {{template "base/alert" .}} +
    + {{template "org/team/sidebar" .}} +
    + {{template "org/team/navbar" .}} + {{if .IsOrganizationOwner}} +
    +
    + {{.CsrfTokenHtml}} + +
    + +
    + +
    +
    + {{end}} +
    + {{range .Team.Members}} +
    + {{if $.IsOrganizationOwner}} + {{$.i18n.Tr "org.members.remove"}} + {{end}} + + + {{.DisplayName}} + +
    + {{else}} +
    + {{$.i18n.Tr "org.teams.members.none"}} +
    + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/org/team/navbar.tmpl b/org/team/navbar.tmpl new file mode 100644 index 0000000..1a8f108 --- /dev/null +++ b/org/team/navbar.tmpl @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/org/team/new.tmpl b/org/team/new.tmpl new file mode 100644 index 0000000..fb79c9b --- /dev/null +++ b/org/team/new.tmpl @@ -0,0 +1,97 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}} +

    +
    + {{template "base/alert" .}} +
    + + {{if eq .Team.LowerName "owners"}} + + {{end}} + + {{.i18n.Tr "org.team_name_helper"}} +
    +
    + + + {{.i18n.Tr "org.team_desc_helper"}} +
    + {{if not (eq .Team.LowerName "owners")}} +
    + +
    +
    +
    + + + {{.i18n.Tr "org.teams.read_access_helper"}} +
    +
    +
    +
    + + + {{.i18n.Tr "org.teams.write_access_helper"}} +
    +
    +
    +
    + + + {{.i18n.Tr "org.teams.admin_access_helper"}} +
    +
    +
    +
    + + +
    + {{end}} + +
    + {{if .PageIsOrgTeamsNew}} + + {{.i18n.Tr "cancel"}} + {{else}} + + {{if not (eq .Team.LowerName "owners")}} + + {{end}} + {{end}} +
    +
    +
    +
    +
    +
    + + +{{template "base/footer" .}} diff --git a/org/team/repositories.tmpl b/org/team/repositories.tmpl new file mode 100644 index 0000000..eeb8656 --- /dev/null +++ b/org/team/repositories.tmpl @@ -0,0 +1,47 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    + {{template "base/alert" .}} +
    + {{template "org/team/sidebar" .}} +
    + {{template "org/team/navbar" .}} + {{$canAddRemove := and $.IsOrganizationOwner (not (eq $.Team.LowerName "owners"))}} + {{if $canAddRemove}} +
    +
    + {{.CsrfTokenHtml}} +
    + +
    + +
    +
    + {{end}} +
    + {{range .Team.Repos}} + + {{else}} +
    + {{$.i18n.Tr "org.teams.repos.none"}} +
    + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/org/team/sidebar.tmpl b/org/team/sidebar.tmpl new file mode 100644 index 0000000..846613e --- /dev/null +++ b/org/team/sidebar.tmpl @@ -0,0 +1,38 @@ +
    +

    + {{.Team.Name}} +
    + {{if .Team.IsMember $.SignedUser.ID}} + {{$.i18n.Tr "org.teams.leave"}} + {{else if .IsOrganizationOwner}} + {{$.i18n.Tr "org.teams.join"}} + {{end}} +
    +

    +
    +
    + {{if .Team.Description}} + {{.Team.Description}} + {{else}} + {{.i18n.Tr "org.teams.no_desc"}} + {{end}} +
    + +
    + {{if eq .Team.LowerName "owners"}} + {{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}} + {{else if (eq .Team.Authorize 1)}} + {{.i18n.Tr "org.teams.read_permission_desc" | Str2html}} + {{else if (eq .Team.Authorize 2)}} + {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}} + {{else if (eq .Team.Authorize 3)}} + {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}} + {{end}} +
    +
    + {{if .IsOrganizationOwner}} + + {{end}} +
    diff --git a/org/team/teams.tmpl b/org/team/teams.tmpl new file mode 100644 index 0000000..8714181 --- /dev/null +++ b/org/team/teams.tmpl @@ -0,0 +1,41 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    + {{template "base/alert" .}} + {{if .IsOrganizationOwner}} + +
    + {{end}} + +
    + {{range .Teams}} +
    +
    + {{.Name}} +
    + {{if .IsMember $.SignedUser.ID}} + {{$.i18n.Tr "org.teams.leave"}} + {{else if $.IsOrganizationOwner}} + {{$.i18n.Tr "org.teams.join"}} + {{end}} +
    +
    +
    + {{range .Members}} + + + + {{end}} +
    +
    +

    {{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}

    +
    +
    + {{end}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/pwa/manifest_json.tmpl b/pwa/manifest_json.tmpl new file mode 100644 index 0000000..557bee5 --- /dev/null +++ b/pwa/manifest_json.tmpl @@ -0,0 +1,31 @@ +{ + "short_name": "Gitea", + "name": "Gitea - Git with a cup of tea", + "icons": [ + { + "src": "{{AppSubUrl}}/img/gitea-lg.png", + "type": "image/png", + "sizes": "880x880" + }, + { + "src": "{{AppSubUrl}}/img/gitea-sm.png", + "type": "image/png", + "sizes": "120x120" + }, + { + "src": "{{AppSubUrl}}/img/gitea-512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "{{AppSubUrl}}/img/gitea-192.png", + "type": "image/png", + "sizes": "192x192" + } + ], + "start_url": "{{AppSubUrl}}/", + "scope": "{{AppSubUrl}}/", + "background_color": "#FAFAFA", + "display": "standalone", + "theme_color": "{{ThemeColorMetaTag}}" + } \ No newline at end of file diff --git a/pwa/serviceworker_js.tmpl b/pwa/serviceworker_js.tmpl new file mode 100644 index 0000000..ee96cd5 --- /dev/null +++ b/pwa/serviceworker_js.tmpl @@ -0,0 +1,77 @@ +var STATIC_CACHE = 'static-cache-v1'; +var urlsToCache = [ + // js + '{{AppSubUrl}}/vendor/plugins/jquery.areyousure/jquery.are-you-sure.js', + '{{AppSubUrl}}/vendor/plugins/jquery/jquery.min.js?v=3.4.1', + '{{AppSubUrl}}/vendor/plugins/jquery-migrate/jquery-migrate.min.js?v=3.0.1', + '{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.js', + '{{AppSubUrl}}/js/index.js?v={{MD5 AppVer}}', + '{{AppSubUrl}}/js/draw.js', + '{{AppSubUrl}}/vendor/plugins/clipboard/clipboard.min.js', + '{{AppSubUrl}}/vendor/plugins/gitgraph/gitgraph.js', + '{{AppSubUrl}}/vendor/plugins/vue/vue.min.js', + '{{AppSubUrl}}/vendor/plugins/emojify/emojify.min.js', + '{{AppSubUrl}}/vendor/plugins/cssrelpreload/loadCSS.min.js', + '{{AppSubUrl}}/vendor/plugins/cssrelpreload/cssrelpreload.min.js', + '{{AppSubUrl}}/vendor/plugins/dropzone/dropzone.js', + '{{AppSubUrl}}/vendor/plugins/highlight/highlight.pack.js', + '{{AppSubUrl}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.js', + '{{AppSubUrl}}/vendor/plugins/jquery.minicolors/jquery.minicolors.min.js', + '{{AppSubUrl}}/vendor/plugins/codemirror/addon/mode/loadmode.js', + '{{AppSubUrl}}/vendor/plugins/codemirror/mode/meta.js', + '{{AppSubUrl}}/vendor/plugins/simplemde/simplemde.min.js', + + // css + '{{AppSubUrl}}/vendor/assets/font-awesome/css/font-awesome.min.css', + '{{AppSubUrl}}/vendor/assets/octicons/octicons.min.css', + '{{AppSubUrl}}/vendor/plugins/simplemde/simplemde.min.css', + '{{AppSubUrl}}/vendor/plugins/gitgraph/gitgraph.css', + '{{AppSubUrl}}/vendor/plugins/tribute/tribute.css', + '{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.css', + '{{AppSubUrl}}/css/index.css?v={{MD5 AppVer}}', + '{{AppSubUrl}}/vendor/plugins/highlight/github.css', + '{{AppSubUrl}}/vendor/plugins/jquery.minicolors/jquery.minicolors.css', + '{{AppSubUrl}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.css', + '{{AppSubUrl}}/vendor/plugins/dropzone/dropzone.css', +{{if .IsSigned }} + {{ if ne .SignedUser.Theme "gitea" }} + '{{AppSubUrl}}/css/theme-{{.SignedUser.Theme}}.css', + {{end}} +{{else if ne DefaultTheme "gitea"}} + '{{AppSubUrl}}/css/theme-{{DefaultTheme}}.css', +{{end}} + + // img + '{{AppSubUrl}}/img/gitea-sm.png', + '{{AppSubUrl}}/img/gitea-lg.png', + + // fonts + '{{AppSubUrl}}/vendor/plugins/semantic/themes/default/assets/fonts/icons.woff2', + '{{AppSubUrl}}/vendor/assets/octicons/octicons.woff2?ef21c39f0ca9b1b5116e5eb7ac5eabe6', + '{{AppSubUrl}}/vendor/assets/lato-fonts/lato-v14-latin-regular.woff2', + '{{AppSubUrl}}/vendor/assets/lato-fonts/lato-v14-latin-700.woff2' +]; + +self.addEventListener('install', function (event) { + // Perform install steps + event.waitUntil( + caches.open(STATIC_CACHE) + .then(function (cache) { + return cache.addAll(urlsToCache); + }) + ); +}); + +self.addEventListener('fetch', function (event) { + event.respondWith( + caches.match(event.request) + .then(function (response) { + // Cache hit - return response + if (response) { + return response; + } + return fetch(event.request); + } + ) + ); +}); diff --git a/repo/activity.tmpl b/repo/activity.tmpl new file mode 100644 index 0000000..8ee5b55 --- /dev/null +++ b/repo/activity.tmpl @@ -0,0 +1,220 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +

    {{.DateFrom}} - {{.DateUntil}} + +

    +
    + + {{if (or (.Permission.CanRead $.UnitTypeIssues) (.Permission.CanRead $.UnitTypePullRequests))}} +

    {{.i18n.Tr "repo.activity.overview"}}

    +
    + {{if .Permission.CanRead $.UnitTypePullRequests}} +
    + {{if gt .Activity.ActivePRCount 0}} +
    + + +
    + {{else}} +
    + +
    + {{end}} + {{.i18n.Tr (TrN .i18n.Lang .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n") .Activity.ActivePRCount | Safe }} +
    + {{end}} + {{if .Permission.CanRead $.UnitTypeIssues}} +
    + {{if gt .Activity.ActiveIssueCount 0}} +
    + + +
    + {{else}} +
    + +
    + {{end}} + {{.i18n.Tr (TrN .i18n.Lang .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n") .Activity.ActiveIssueCount | Safe }} +
    + {{end}} +
    + + {{end}} + + {{if .Permission.CanRead $.UnitTypeCode}} + {{if eq .Activity.Code.CommitCountInAllBranches 0}} +
    +

    {{.i18n.Tr "repo.activity.no_git_activity" }}

    +
    + {{end}} + {{if gt .Activity.Code.CommitCountInAllBranches 0}} +
    +
    + {{.i18n.Tr "repo.activity.git_stats_exclude_merges" }} + {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n") .Activity.Code.AuthorCount }} + {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n") }} + {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n") .Activity.Code.CommitCount }} + {{.i18n.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch }} + {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n") .Activity.Code.CommitCountInAllBranches }} + {{.i18n.Tr "repo.activity.git_stats_push_to_all_branches" }} + {{.i18n.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch }} + {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n") .Activity.Code.ChangedFiles }} + {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n") }} + {{.i18n.Tr "repo.activity.git_stats_additions" }} + {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n") .Activity.Code.Additions }} + {{.i18n.Tr "repo.activity.git_stats_and_deletions" }} + {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n") .Activity.Code.Deletions }}. +
    +
    + {{end}} + {{end}} + + {{if gt .Activity.PublishedReleaseCount 0}} +

    + + {{.i18n.Tr "repo.activity.title.releases_published_by" (.i18n.Tr (TrN .i18n.Lang .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n") .Activity.PublishedReleaseCount) (.i18n.Tr (TrN .i18n.Lang .Activity.PublishedReleaseAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.PublishedReleaseAuthorCount) }} +

    +
    + {{range .Activity.PublishedReleases}} +

    +

    {{$.i18n.Tr "repo.activity.published_release_label"}}
    + {{.TagName}} + {{if not .IsTag}} + {{.Title}} + {{end}} + {{TimeSinceUnix .CreatedUnix $.Lang}} +

    + {{end}} +
    + {{end}} + + {{if gt .Activity.MergedPRCount 0}} +

    + + {{.i18n.Tr "repo.activity.title.prs_merged_by" (.i18n.Tr (TrN .i18n.Lang .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n") .Activity.MergedPRCount) (.i18n.Tr (TrN .i18n.Lang .Activity.MergedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.MergedPRAuthorCount) }} +

    +
    + {{range .Activity.MergedPRs}} +

    +

    {{$.i18n.Tr "repo.activity.merged_prs_label"}}
    + #{{.Index}} {{.Issue.Title}} + {{TimeSinceUnix .MergedUnix $.Lang}} +

    + {{end}} +
    + {{end}} + + {{if gt .Activity.OpenedPRCount 0}} +

    + + {{.i18n.Tr "repo.activity.title.prs_opened_by" (.i18n.Tr (TrN .i18n.Lang .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n") .Activity.OpenedPRCount) (.i18n.Tr (TrN .i18n.Lang .Activity.OpenedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.OpenedPRAuthorCount) }} +

    +
    + {{range .Activity.OpenedPRs}} +

    +

    {{$.i18n.Tr "repo.activity.opened_prs_label"}}
    + #{{.Index}} {{.Issue.Title}} + {{TimeSinceUnix .Issue.CreatedUnix $.Lang}} +

    + {{end}} +
    + {{end}} + + {{if gt .Activity.ClosedIssueCount 0}} +

    + + {{.i18n.Tr "repo.activity.title.issues_closed_by" (.i18n.Tr (TrN .i18n.Lang .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n") .Activity.ClosedIssueCount) (.i18n.Tr (TrN .i18n.Lang .Activity.ClosedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.ClosedIssueAuthorCount) }} +

    +
    + {{range .Activity.ClosedIssues}} +

    +

    {{$.i18n.Tr "repo.activity.closed_issue_label"}}
    + #{{.Index}} {{.Title}} + {{TimeSinceUnix .ClosedUnix $.Lang}} +

    + {{end}} +
    + {{end}} + + {{if gt .Activity.OpenedIssueCount 0}} +

    + + {{.i18n.Tr "repo.activity.title.issues_created_by" (.i18n.Tr (TrN .i18n.Lang .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n") .Activity.OpenedIssueCount) (.i18n.Tr (TrN .i18n.Lang .Activity.OpenedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.OpenedIssueAuthorCount) }} +

    +
    + {{range .Activity.OpenedIssues}} +

    +

    {{$.i18n.Tr "repo.activity.new_issue_label"}}
    + #{{.Index}} {{.Title}} + {{TimeSinceUnix .CreatedUnix $.Lang}} +

    + {{end}} +
    + {{end}} + + {{if gt .Activity.UnresolvedIssueCount 0}} +

    + + {{.i18n.Tr (TrN .i18n.Lang .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n") .Activity.UnresolvedIssueCount }} +

    +
    + {{.i18n.Tr "repo.activity.unresolved_conv_desc"}} +
    +
    + {{range .Activity.UnresolvedIssues}} +

    +

    {{$.i18n.Tr "repo.activity.unresolved_conv_label"}}
    + #{{.Index}} + {{if .IsPull}} + {{.Title}} + {{else}} + {{.Title}} + {{end}} + {{TimeSinceUnix .UpdatedUnix $.Lang}} +

    + {{end}} +
    + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/blame.tmpl b/repo/blame.tmpl new file mode 100644 index 0000000..483f8d3 --- /dev/null +++ b/repo/blame.tmpl @@ -0,0 +1,51 @@ +
    + +

    +
    +
    + + {{.FileName}} {{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}} +
    +
    +
    + + {{if .Repository.CanEnableEditor}} + {{if .CanEditFile}} + + {{else}} + + {{end}} + {{if .CanDeleteFile}} + + {{else}} + + {{end}} + {{end}} +
    +
    +
    +

    + +
    +
    + + + + + + + + +
    {{.BlameCommitInfo}}{{.BlameLineNums}}
      {{.BlameContent}}
    +
    +
    + + +
    diff --git a/repo/branch/list.tmpl b/repo/branch/list.tmpl new file mode 100644 index 0000000..7707b3c --- /dev/null +++ b/repo/branch/list.tmpl @@ -0,0 +1,138 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} + {{template "repo/sub_menu" .}} +

    + {{.i18n.Tr "repo.default_branch"}} +

    + +
    + + + + + + + +
    + {{range .Branches}} + {{if eq .Name $.DefaultBranch}} + {{if .IsProtected}} + + {{end}} + {{$.DefaultBranch}} +

    {{ShortSha .Commit.ID.String}} · {{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}} · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}

    + {{end}} + {{end}} +
    + +
    +
    + + {{if gt (len .Branches) 1}} +

    + {{.i18n.Tr "repo.branches"}} +

    +
    + + + {{range .Branches}} + {{if ne .Name $.DefaultBranch}} + + + + + + + {{end}} + {{end}} + +
    + {{if .IsDeleted}} + {{.Name}} +

    {{$.i18n.Tr "repo.branch.deleted_by" .DeletedBranch.DeletedBy.Name}} {{TimeSinceUnix .DeletedBranch.DeletedUnix $.i18n.Lang}}

    + {{else}} + {{if .IsProtected}} + + {{end}} + {{.Name}} +

    {{ShortSha .Commit.ID.String}} · {{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}} · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}

    + {{end}} +
    + {{if not .IsDeleted}} +
    +
    +
    {{.CommitsBehind}}
    +
    +
    +
    +
    {{.CommitsAhead}}
    +
    +
    +
    + {{end}} +
    + {{if not .LatestPullRequest}} + {{if and (not .IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}} + + + + {{end}} + {{else if and .LatestPullRequest.HasMerged .MergeMovedOn}} + {{if and (not .IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}} + + + + {{end}} + {{else}} + #{{.LatestPullRequest.Issue.Index}} + {{if .LatestPullRequest.HasMerged}} + {{$.i18n.Tr "repo.pulls.merged"}} + {{else if .LatestPullRequest.Issue.IsClosed}} + {{$.i18n.Tr "repo.issues.closed_title"}} + {{else}} + {{$.i18n.Tr "repo.issues.open_title"}} + {{end}} + {{end}} + + {{if (not .IsDeleted)}} + + {{end}} + {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}} + {{if .IsDeleted}} + + {{else}} + + {{end}} + {{end}} +
    +
    + {{end}} +
    +
    + + +{{template "base/footer" .}} diff --git a/repo/branch_dropdown.tmpl b/repo/branch_dropdown.tmpl new file mode 100644 index 0000000..b7f4c91 --- /dev/null +++ b/repo/branch_dropdown.tmpl @@ -0,0 +1,65 @@ +
    + +
    diff --git a/repo/commit_page.tmpl b/repo/commit_page.tmpl new file mode 100644 index 0000000..0cfdf51 --- /dev/null +++ b/repo/commit_page.tmpl @@ -0,0 +1,89 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    + + {{.i18n.Tr "repo.diff.browse_source"}} + +

    {{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}

    + {{if IsMultilineCommitMessage .Commit.Message}} +
    {{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}
    + {{end}} + {{.BranchName}} +
    +
    +
    +
    + {{if .Author}} + + {{if .Author.FullName}} + {{.Author.FullName}} {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} + {{else}} + {{.Commit.Author.Name}} {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} + {{end}} + {{else}} + + {{.Commit.Author.Name}} + {{end}} + {{TimeSince .Commit.Author.When $.Lang}} +
    +
    +
    + {{if .Parents}} +
    + {{.i18n.Tr "repo.diff.parent"}} +
    +
    + {{range .Parents}} + {{ShortSha .}} + {{end}} +
    + {{end}} +
    +
    {{.i18n.Tr "repo.diff.commit"}}
    +
    {{ShortSha .CommitID}}
    +
    +
    +
    +
    + {{if .Commit.Signature}} + {{if .Verification.Verified }} +
    + + {{.i18n.Tr "repo.commits.signed_by"}}: + {{.Commit.Committer.Name}} <{{.Commit.Committer.Email}}> + {{.i18n.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.KeyID}} +
    + {{else}} +
    + + {{.i18n.Tr .Verification.Reason}} +
    + {{end}} + {{end}} + {{if .Note}} +
    + + {{.i18n.Tr "repo.diff.git-notes"}}: + {{if .NoteAuthor}} + + {{if .NoteAuthor.FullName}} + {{.NoteAuthor.FullName}} + {{else}} + {{.NoteCommit.Author.Name}} + {{end}} + + {{else}} + {{.NoteCommit.Author.Name}} + {{end}} + {{TimeSince .NoteCommit.Author.When $.Lang}} +
    +
    +
    {{RenderNote .Note $.RepoLink $.Repository.ComposeMetas}}
    +
    + {{end}} + {{template "repo/diff/box" .}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/commit_status.tmpl b/repo/commit_status.tmpl new file mode 100644 index 0000000..638f81e --- /dev/null +++ b/repo/commit_status.tmpl @@ -0,0 +1,15 @@ +{{if eq .State "pending"}} + +{{end}} +{{if eq .State "success"}} + +{{end}} +{{if eq .State "error"}} + +{{end}} +{{if eq .State "failure"}} + +{{end}} +{{if eq .State "warning"}} + +{{end}} diff --git a/repo/commits.tmpl b/repo/commits.tmpl new file mode 100644 index 0000000..32301a0 --- /dev/null +++ b/repo/commits.tmpl @@ -0,0 +1,20 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "repo/sub_menu" .}} + + {{template "repo/commits_table" .}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/commits_table.tmpl b/repo/commits_table.tmpl new file mode 100644 index 0000000..e11bbee --- /dev/null +++ b/repo/commits_table.tmpl @@ -0,0 +1,93 @@ +

    +
    +
    + {{if or .PageIsCommits (gt .CommitCount 0)}} + {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}} + {{else}} + {{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch }} {{if .Branch}}({{.Branch}}){{end}} + {{end}} +
    +
    + {{if .PageIsCommits}} +
    + +   +
    + + +
    + +
    + {{else if .IsDiffCompare}} + {{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{else if .BaseIsTag}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}} + ... + {{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{else if .HeadIsTag}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}} + {{end}} +
    +
    +

    + +{{if and .Commits (gt .CommitCount 0)}} +
    + + + + + + + + + + + {{ $r:= List .Commits}} + {{range $r}} + + + + + + + {{end}} + +
    {{.i18n.Tr "repo.commits.author"}}SHA1{{.i18n.Tr "repo.commits.message"}}{{.i18n.Tr "repo.commits.date"}}
    + {{if .User}} + {{if .User.FullName}} +   {{.User.FullName}} + {{else}} +   {{.Author.Name}} + {{end}} + {{else}} +   {{.Author.Name}} + {{end}} + + + {{ShortSha .ID.String}} + {{if .Signature}} +
    + {{if .Verification.Verified}} + + {{else}} + + {{end}} +
    + {{end}} +
    +
    + + {{ $commitLink:= printf "%s/%s/%s/commit/%s" AppSubUrl $.Username $.Reponame .ID }} + {{RenderCommitMessageLinkSubject .Message $.RepoLink $commitLink $.Repository.ComposeMetas}} + + {{if IsMultilineCommitMessage .Message}} + + {{end}} + {{template "repo/commit_status" .Status}} + {{if IsMultilineCommitMessage .Message}} + + {{end}} + {{TimeSince .Author.When $.Lang}}
    +
    +{{end}} + +{{template "base/paginate" .}} diff --git a/repo/create.tmpl b/repo/create.tmpl new file mode 100644 index 0000000..1a53e3c --- /dev/null +++ b/repo/create.tmpl @@ -0,0 +1,132 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{.i18n.Tr "new_repo"}} +

    +
    + {{template "base/alert" .}} +
    + + +
    + +
    + + + {{.i18n.Tr "repo.repo_name_helper"}} +
    +
    + +
    + {{if .IsForcedPrivate}} + + + {{else}} + + + {{end}} +
    + {{.i18n.Tr "repo.visibility_description"}} +
    +
    + + +
    + +
    + + +
    + +
    + +
    + + +
    +
    + + +
    + +
    + + +
    +
    +
    + + +
    +
    + +
    + + + {{.i18n.Tr "cancel"}} +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/diff/box.tmpl b/repo/diff/box.tmpl new file mode 100644 index 0000000..604b83c --- /dev/null +++ b/repo/diff/box.tmpl @@ -0,0 +1,239 @@ +{{if .DiffNotAvailable}} +
    +
    +
    + {{if .PageIsPullFiles}} + {{template "repo/diff/whitespace_dropdown" .}} + {{else}} + {{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}} + {{end}} + {{.i18n.Tr "repo.diff.show_diff_stats"}} + {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} + {{template "repo/diff/new_review" .}} + {{end}} +
    +
    +
    +

    {{.i18n.Tr "repo.diff.data_not_available"}}

    +{{else}} +
    +
    + + {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} +
    + {{if .PageIsPullFiles}} + {{template "repo/diff/whitespace_dropdown" .}} + {{else}} + {{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}} + {{end}} + {{.i18n.Tr "repo.diff.show_diff_stats"}} + {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} + {{template "repo/diff/new_review" .}} + {{end}} +
    +
    +
      + {{range .Diff.Files}} +
    1. +
      + {{if not .IsBin}} + +{{.Addition}} + +
      +
      +
      + -{{.Deletion}} + {{else}} + {{$.i18n.Tr "repo.diff.bin"}} + {{end}} +
      + +   + {{.Name}} +
    2. + {{end}} +
    + {{range $i, $file := .Diff.Files}} + {{if $file.IsIncomplete}} +
    +

    +
    + {{if not $file.IsRenamed}} + + {{.Addition}} + +
    +
    +
    + - {{.Deletion}} + {{end}} +
    + {{$file.Name}} +
    {{$.i18n.Tr "repo.diff.file_suppressed"}}
    + {{if not $file.IsSubmodule}} + {{if $file.IsDeleted}} + {{$.i18n.Tr "repo.diff.view_file"}} + {{else}} + {{$.i18n.Tr "repo.diff.view_file"}} + {{end}} + {{end}} +

    +
    + {{else}} +
    +

    +
    + {{if $file.IsBin}} + {{$.i18n.Tr "repo.diff.bin"}} + {{else if not $file.IsRenamed}} + + {{.Addition}} + +
    +
    +
    + - {{.Deletion}} + {{end}} +
    + {{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.i18n.Tr "repo.stored_lfs"}}){{end}} + {{if not $file.IsSubmodule}} + {{if $file.IsDeleted}} + {{$.i18n.Tr "repo.diff.view_file"}} + {{else}} + {{$.i18n.Tr "repo.diff.view_file"}} + {{end}} + {{end}} +

    +
    + {{if ne $file.Type 4}} + {{$isImage := false}} + {{if $file.IsDeleted}} + {{$isImage = (call $.IsImageFileInBase $file.Name)}} + {{else}} + {{$isImage = (call $.IsImageFileInHead $file.Name)}} + {{end}} +
    + + + {{if $isImage}} + {{template "repo/diff/image_diff" dict "file" . "root" $}} + {{else}} + {{if $.IsSplitStyle}} + {{$highlightClass := $file.GetHighlightClass}} + {{range $j, $section := $file.Sections}} + {{range $k, $line := $section.Lines}} + + + + + + + + + {{if gt (len $line.Comments) 0}} + + + + + + + + + {{end}} + {{end}} + {{end}} + {{else}} + {{template "repo/diff/section_unified" dict "file" . "root" $}} + {{end}} + {{end}} + +
    {{if $line.LeftIdx}}{{end}}{{if and $.SignedUserID $line.CanComment $.PageIsPullFiles (not (eq .GetType 2))}}+{{end}}{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}{{if $line.RightIdx}}{{end}}{{if and $.SignedUserID $line.CanComment $.PageIsPullFiles (not (eq .GetType 3))}}+{{end}}{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
    + {{if eq $line.GetCommentSide "previous"}} +
    +
    + + {{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}} + +
    + {{template "repo/diff/comment_form_datahandler" dict "reply" (index $line.Comments 0).ReviewID "hidden" true "root" $ "comment" (index $line.Comments 0)}} +
    + {{end}} +
    + {{if eq $line.GetCommentSide "proposed"}} +
    +
    + + {{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}} + +
    + {{template "repo/diff/comment_form_datahandler" dict "reply" (index $line.Comments 0).ReviewID "hidden" true "root" $ "comment" (index $line.Comments 0)}} +
    + {{end}} +
    +
    + {{end}} +
    +
    + {{end}} +
    + {{end}} + + {{if .Diff.IsIncomplete}} +
    +

    + {{$.i18n.Tr "repo.diff.too_many_files"}} +

    +
    + {{end}} + + {{if not $.Repository.IsArchived}} +
    + {{template "repo/diff/new_comment" dict "root" .}} +
    +
    +
    + +
    + +
    +
    + {{$.i18n.Tr "loading"}} +
    +
    +
    {{.i18n.Tr "repo.issues.cancel"}}
    +
    {{.i18n.Tr "repo.issues.save"}}
    +
    +
    +
    + {{end}} + + {{if .IsSplitStyle}} + + {{end}} +
    +{{end}} diff --git a/repo/diff/comment_form.tmpl b/repo/diff/comment_form.tmpl new file mode 100644 index 0000000..38fd3fa --- /dev/null +++ b/repo/diff/comment_form.tmpl @@ -0,0 +1,47 @@ +{{if and $.root.SignedUserID (not $.Repository.IsArchived)}} + {{if $.hidden}} + + {{end}} +
    + {{$.root.CsrfTokenHtml}} + + + + + + + +
    +
    + +
    +
    +
    + {{.i18n.Tr "loading"}} +
    + +
    +{{end}} diff --git a/repo/diff/comment_form_datahandler.tmpl b/repo/diff/comment_form_datahandler.tmpl new file mode 100644 index 0000000..9656944 --- /dev/null +++ b/repo/diff/comment_form_datahandler.tmpl @@ -0,0 +1,7 @@ +{{if $.comment}} + {{ template "repo/diff/comment_form" dict "root" $.root "hidden" $.hidden "reply" $.reply "Line" $.comment.UnsignedLine "File" $.comment.TreePath "Side" $.comment.DiffSide "HasComments" true}} +{{else if $.root}} + {{ template "repo/diff/comment_form" $}} +{{else}} + {{ template "repo/diff/comment_form" dict "root" $}} +{{end}} diff --git a/repo/diff/comments.tmpl b/repo/diff/comments.tmpl new file mode 100644 index 0000000..1288886 --- /dev/null +++ b/repo/diff/comments.tmpl @@ -0,0 +1,51 @@ +{{range .comments}} + +{{ $createdStr:= TimeSinceUnix .CreatedUnix $.root.Lang }} +
    + + + +
    +
    + {{.Poster.GetDisplayName}} {{$.root.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}} +
    + {{if and .Review}} + {{if eq .Review.Type 0}} +
    + {{$.root.i18n.Tr "repo.issues.review.pending"}} +
    + {{else}} +
    + {{$.root.i18n.Tr "repo.issues.review.review"}} +
    + {{end}} + {{end}} + {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) }} + {{if or $.root.Permission.IsAdmin (eq .Poster.ID $.root.SignedUserID)}} +
    + + +
    + {{end}} +
    +
    +
    +
    + {{if .RenderedContent}} + {{.RenderedContent|Str2html}} + {{else}} + {{$.root.i18n.Tr "repo.issues.no_content"}} + {{end}} +
    +
    {{.Content}}
    +
    +
    + {{$reactions := .Reactions.GroupByType}} + {{if $reactions}} +
    + {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) "Reactions" $reactions }} +
    + {{end}} +
    +
    +{{end}} diff --git a/repo/diff/compare.tmpl b/repo/diff/compare.tmpl new file mode 100644 index 0000000..50a51c4 --- /dev/null +++ b/repo/diff/compare.tmpl @@ -0,0 +1,89 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + + {{if .PageIsComparePull}} +

    + {{if not .Repository.IsArchived}} + {{.i18n.Tr "repo.pulls.compare_changes"}} +
    {{.i18n.Tr "repo.pulls.compare_changes_desc"}}
    + {{ else }} + {{.i18n.Tr "action.compare_commits_general"}} + {{ end }} +

    +
    + + + ... + +
    + {{end}} + + {{if .IsNothingToCompare}} +
    {{.i18n.Tr "repo.pulls.nothing_to_compare"}}
    + {{else if .PageIsComparePull}} + {{if .HasPullRequest}} +
    + {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} +
    + {{else}} + {{if not .Repository.IsArchived}} +
    + +
    + {{ else }} +
    + {{.i18n.Tr "repo.archive.title"}} +
    + {{ end }} + + {{template "repo/commits_table" .}} + {{template "repo/diff/box" .}} + {{end}} + {{else}} + {{template "repo/commits_table" .}} + {{template "repo/diff/box" .}} + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/diff/image_diff.tmpl b/repo/diff/image_diff.tmpl new file mode 100644 index 0000000..6afb985 --- /dev/null +++ b/repo/diff/image_diff.tmpl @@ -0,0 +1,79 @@ +{{ $imagePathOld := printf "%s/%s" .root.BeforeRawPath (EscapePound .file.OldName) }} +{{ $imagePathNew := printf "%s/%s" .root.RawPath (EscapePound .file.Name) }} + + + + {{.root.i18n.Tr "repo.diff.file_before"}} + + + {{.root.i18n.Tr "repo.diff.file_after"}} + + + + + {{if or .file.IsDeleted (not .file.IsCreated)}} + + + + {{end}} + + + {{if or .file.IsCreated (not .file.IsDeleted)}} + + + + {{end}} + + +{{ $imageInfoBase := (call .root.ImageInfoBase .file.OldName) }} +{{ $imageInfoHead := (call .root.ImageInfo .file.Name) }} +{{if or $imageInfoBase $imageInfoHead }} + + + {{if $imageInfoBase }} + {{ $classWidth := "" }} + {{ $classHeight := "" }} + {{ $classByteSize := "" }} + {{if $imageInfoHead}} + {{if not (eq $imageInfoBase.Width $imageInfoHead.Width)}} + {{ $classWidth = "red" }} + {{end}} + {{if not (eq $imageInfoBase.Height $imageInfoHead.Height)}} + {{ $classHeight = "red" }} + {{end}} + {{if not (eq $imageInfoBase.ByteSize $imageInfoHead.ByteSize)}} + {{ $classByteSize = "red" }} + {{end}} + {{end}} + {{.root.i18n.Tr "repo.diff.file_image_width"}}: {{$imageInfoBase.Width}} +  |  + {{.root.i18n.Tr "repo.diff.file_image_height"}}: {{$imageInfoBase.Height}} +  |  + {{.root.i18n.Tr "repo.diff.file_byte_size"}}: {{FileSize $imageInfoBase.ByteSize}} + {{end}} + + + {{if $imageInfoHead }} + {{ $classWidth := "" }} + {{ $classHeight := "" }} + {{ $classByteSize := "" }} + {{if $imageInfoBase}} + {{if not (eq $imageInfoBase.Width $imageInfoHead.Width)}} + {{ $classWidth = "green" }} + {{end}} + {{if not (eq $imageInfoBase.Height $imageInfoHead.Height)}} + {{ $classHeight = "green" }} + {{end}} + {{if not (eq $imageInfoBase.ByteSize $imageInfoHead.ByteSize)}} + {{ $classByteSize = "green" }} + {{end}} + {{end}} + {{.root.i18n.Tr "repo.diff.file_image_width"}}: {{$imageInfoHead.Width}} +  |  + {{.root.i18n.Tr "repo.diff.file_image_height"}}: {{$imageInfoHead.Height}} +  |  + {{.root.i18n.Tr "repo.diff.file_byte_size"}}: {{FileSize $imageInfoHead.ByteSize}} + {{end}} + + +{{end}} diff --git a/repo/diff/new_comment.tmpl b/repo/diff/new_comment.tmpl new file mode 100644 index 0000000..d8b6ccb --- /dev/null +++ b/repo/diff/new_comment.tmpl @@ -0,0 +1,3 @@ +
    + {{template "repo/diff/comment_form_datahandler" .}} +
    diff --git a/repo/diff/new_review.tmpl b/repo/diff/new_review.tmpl new file mode 100644 index 0000000..68d8f89 --- /dev/null +++ b/repo/diff/new_review.tmpl @@ -0,0 +1,28 @@ + diff --git a/repo/diff/section_unified.tmpl b/repo/diff/section_unified.tmpl new file mode 100644 index 0000000..9a60c23 --- /dev/null +++ b/repo/diff/section_unified.tmpl @@ -0,0 +1,34 @@ +{{$file := .file}} +{{$highlightClass := $file.GetHighlightClass}} +{{range $j, $section := $file.Sections}} + {{range $k, $line := $section.Lines}} + + {{if eq .GetType 4}} + + {{/* {{if gt $j 0}}{{end}} */}} + + {{else}} + + + {{end}} + + {{if and $.root.SignedUserID $line.CanComment $.root.PageIsPullFiles}}+{{end}}{{$section.GetComputedInlineDiffFor $line}} + + {{if gt (len $line.Comments) 0}} + + + + +
    +
    + + {{ template "repo/diff/comments" dict "root" $.root "comments" $line.Comments}} + +
    + {{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $line.Comments 0).ReviewID "root" $.root "comment" (index $line.Comments 0)}} +
    + + + {{end}} + {{end}} +{{end}} diff --git a/repo/diff/whitespace_dropdown.tmpl b/repo/diff/whitespace_dropdown.tmpl new file mode 100644 index 0000000..65fd871 --- /dev/null +++ b/repo/diff/whitespace_dropdown.tmpl @@ -0,0 +1,23 @@ + +{{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}} diff --git a/repo/editor/commit_form.tmpl b/repo/editor/commit_form.tmpl new file mode 100644 index 0000000..2ff08e3 --- /dev/null +++ b/repo/editor/commit_form.tmpl @@ -0,0 +1,53 @@ +
    + +
    +

    {{.i18n.Tr "repo.editor.commit_changes"}}

    +
    + +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    + {{$pullRequestEnabled := .Repository.UnitEnabled $.UnitTypePullRequests}} + {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}} +
    + {{if $pullRequestEnabled}} + + {{else}} + + {{end}} + +
    +
    +
    +
    + + + +
    +
    +
    +
    + + {{.i18n.Tr "repo.editor.cancel"}} +
    diff --git a/repo/editor/delete.tmpl b/repo/editor/delete.tmpl new file mode 100644 index 0000000..10eca8f --- /dev/null +++ b/repo/editor/delete.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} + + {{template "repo/editor/commit_form" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/editor/diff_preview.tmpl b/repo/editor/diff_preview.tmpl new file mode 100644 index 0000000..b663e4e --- /dev/null +++ b/repo/editor/diff_preview.tmpl @@ -0,0 +1,11 @@ +
    +
    +
    + + + {{template "repo/diff/section_unified" dict "file" .File "root" $}} + +
    +
    +
    +
    diff --git a/repo/editor/edit.tmpl b/repo/editor/edit.tmpl new file mode 100644 index 0000000..134dc81 --- /dev/null +++ b/repo/editor/edit.tmpl @@ -0,0 +1,57 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} + + +
    + +
    + +
    +
    + {{.i18n.Tr "loading"}} +
    +
    + {{.i18n.Tr "loading"}} +
    +
    + {{template "repo/editor/commit_form" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/editor/upload.tmpl b/repo/editor/upload.tmpl new file mode 100644 index 0000000..23fdc8b --- /dev/null +++ b/repo/editor/upload.tmpl @@ -0,0 +1,36 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} + +
    +
    +
    +
    + {{template "repo/editor/commit_form" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/empty.tmpl b/repo/empty.tmpl new file mode 100644 index 0000000..07c01fe --- /dev/null +++ b/repo/empty.tmpl @@ -0,0 +1,78 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    +
    + {{template "base/alert" .}} + {{if .Repository.IsArchived}} +
    + {{.i18n.Tr "repo.archive.title"}} +
    + {{end}} + {{if .CanWriteCode}} +

    + {{.i18n.Tr "repo.quick_guide"}} +

    +
    +
    +

    {{.i18n.Tr "repo.clone_this_repo"}} {{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}

    +
    + {{if not $.DisableHTTP}} + + {{end}} + {{if not $.DisableSSH}} + + {{end}} + {{if not $.DisableHTTP}} + + {{else}} + + {{end}} + {{if not (and $.DisableHTTP $.DisableSSH)}} + + {{end}} +
    +
    + + {{if not .Repository.IsArchived}} +
    + +
    +

    {{.i18n.Tr "repo.create_new_repo_command"}}

    +
    +
    touch README.md
    +git init
    +git add README.md
    +git commit -m "first commit"
    +git remote add origin {{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}
    +git push -u origin master
    +
    +
    +
    + +
    +

    {{.i18n.Tr "repo.push_exist_repo"}}

    +
    +
    git remote add origin {{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}
    +git push -u origin master
    +
    +
    + {{end}} + {{else}} +
    + {{.i18n.Tr "repo.empty_message"}} +
    + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/forks.tmpl b/repo/forks.tmpl new file mode 100644 index 0000000..461ac89 --- /dev/null +++ b/repo/forks.tmpl @@ -0,0 +1,22 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +

    + {{.i18n.Tr "repo.forks"}} +

    +
    + {{range .Forks}} +
    + + +
    + {{end}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/graph.tmpl b/repo/graph.tmpl new file mode 100644 index 0000000..2e8d0b5 --- /dev/null +++ b/repo/graph.tmpl @@ -0,0 +1,40 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    +

    {{.i18n.Tr "repo.commit_graph"}}

    +
    + +
      + {{ range .Graph }} +
    • {{ .GraphAcii -}}
    • + {{ end }} +
    +
    +
    +
    +
      + {{ range .Graph }} +
    • + {{ if .OnlyRelation }} + + {{ else }} + + {{ .ShortRev}} + + {{.Branch}} + {{RenderCommitMessage .Subject $.RepoLink $.Repository.ComposeMetas}} by + + {{.Author}} + + {{.Date}} + {{ end }} +
    • + {{ end }} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/header.tmpl b/repo/header.tmpl new file mode 100644 index 0000000..111609e --- /dev/null +++ b/repo/header.tmpl @@ -0,0 +1,110 @@ +
    +{{with .Repository}} +
    +
    + + {{if not .IsBeingCreated}} + + {{end}} +
    +
    +{{end}} +
    + {{if not .Repository.IsBeingCreated}} + + {{end}} +
    +
    +
    diff --git a/repo/home.tmpl b/repo/home.tmpl new file mode 100644 index 0000000..b23e851 --- /dev/null +++ b/repo/home.tmpl @@ -0,0 +1,142 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    +
    + {{if .Repository.DescriptionHTML}}{{.Repository.DescriptionHTML}}{{else if .IsRepositoryAdmin}}{{.i18n.Tr "repo.no_desc"}}{{end}} + {{.Repository.Website}} +
    + {{if .RepoSearchEnabled}} + + {{end}} +
    +
    + {{range .Topics}}{{.Name}}{{end}} + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}{{.i18n.Tr "repo.topic.manage_topics"}}{{end}} +
    + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} + + {{end}} +
    + {{.i18n.Tr "repo.topic.count_prompt"}} + {{.i18n.Tr "repo.topic.format_prompt"}} +
    + {{if .Repository.IsArchived}} +
    + {{.i18n.Tr "repo.archive.title"}} +
    + {{end}} + {{template "repo/sub_menu" .}} + + {{if .IsViewFile}} + {{template "repo/view_file" .}} + {{else if .IsBlame}} + {{template "repo/blame" .}} + {{else}} + {{template "repo/view_list" .}} + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/issue/branch_selector_field.tmpl b/repo/issue/branch_selector_field.tmpl new file mode 100644 index 0000000..8758be4 --- /dev/null +++ b/repo/issue/branch_selector_field.tmpl @@ -0,0 +1,43 @@ +{{if and (not .Issue.IsPull) (not .PageIsComparePull)}} + + + +
    +{{end}} \ No newline at end of file diff --git a/repo/issue/comment_tab.tmpl b/repo/issue/comment_tab.tmpl new file mode 100644 index 0000000..be113e5 --- /dev/null +++ b/repo/issue/comment_tab.tmpl @@ -0,0 +1,17 @@ +
    + +
    + +
    +
    + {{.i18n.Tr "loading"}} +
    +
    +{{if .IsAttachmentEnabled}} +
    +
    +{{end}} diff --git a/repo/issue/label_precolors.tmpl b/repo/issue/label_precolors.tmpl new file mode 100644 index 0000000..d0e1650 --- /dev/null +++ b/repo/issue/label_precolors.tmpl @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/repo/issue/labels.tmpl b/repo/issue/labels.tmpl new file mode 100644 index 0000000..1763042 --- /dev/null +++ b/repo/issue/labels.tmpl @@ -0,0 +1,182 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + + {{if not .Repository.IsArchived}} +
    +
    + {{.CsrfTokenHtml}} +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + {{template "repo/issue/label_precolors"}} +
    +
    +
    {{.i18n.Tr "repo.milestones.cancel"}}
    + +
    +
    +
    +
    + {{end}} +
    + + + {{template "base/alert" .}} +
    {{.i18n.Tr "repo.issues.label_count" .NumLabels}}
    +
    + {{if and (or $.CanWriteIssues $.CanWritePulls) (eq .NumLabels 0) (not $.Repository.IsArchived) }} +
    +
    +
    + +

    {{.i18n.Tr "repo.issues.label_templates.info"}}

    +
    +
    + {{.CsrfTokenHtml}} +
    + +
    + +
    +
    +
    +
    + {{end}} + +
    + + {{range .Labels}} +
  • +
    +
    +
    {{.Name}}
    +
    +
    + {{.Description}} +
    + +
    + {{if and (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}} + {{$.i18n.Tr "repo.issues.label_delete"}} + {{$.i18n.Tr "repo.issues.label_edit"}} + {{end}} +
    +
    +
  • + {{end}} +
    +
    +
    + +{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} + + + +{{end}} +{{template "base/footer" .}} diff --git a/repo/issue/list.tmpl b/repo/issue/list.tmpl new file mode 100644 index 0000000..5572df6 --- /dev/null +++ b/repo/issue/list.tmpl @@ -0,0 +1,276 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    +
    + {{template "repo/issue/navbar" .}} +
    +
    + {{template "repo/issue/search" .}} +
    + {{if not .Repository.IsArchived}} +
    + {{if .PageIsIssueList}} + {{.i18n.Tr "repo.issues.new"}} + {{else}} + {{.i18n.Tr "repo.pulls.new"}} + {{end}} +
    + {{else}} + {{if not .PageIsIssueList}} + + {{end}} + {{end}} +
    +
    + +
    + + {{/* Ten wide does not cope well and makes the columns stack. + This seems to be related to jQuery's hide/show: in fact, switching + issue-actions and issue-filters and having this ten wide will show + this one correctly, but not the other one. */}} +
    + +
    +
    + +
    + {{range .Issues}} +
  • + {{if $.CanWriteIssuesOrPulls}} +
    + +
    + {{end}} +
    #{{.Index}}
    + {{.Title}} + + {{if .IsPull }} + {{if (index $.CommitStatus .PullRequest.ID)}} + {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}} + {{end}} + {{end}} + + {{range .Labels}} + {{.Name}} + {{end}} + + {{if .NumComments}} + {{.NumComments}} + {{end}} + + {{if .TotalTrackedTime}} + {{.TotalTrackedTime | Sec2Time}} + {{end}} + +

    + {{ $timeStr := TimeSinceUnix .GetLastEventTimestamp $.Lang }} + {{if .OriginalAuthor }} + {{$.i18n.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor | Safe}} + {{else if gt .Poster.ID 0}} + {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink (.Poster.GetDisplayName | Escape) | Safe}} + {{else}} + {{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}} + {{end}} + + {{if .Milestone}} + + {{.Milestone.Name}} + + {{end}} + {{if .Ref}} + + {{.Ref}} + + {{end}} + {{$tasks := .GetTasks}} + {{if gt $tasks 0}} + {{$tasksDone := .GetTasksDone}} + + {{$tasksDone}} / {{$tasks}} + + {{end}} + {{if ne .DeadlineUnix 0}} + + {{.DeadlineUnix.FormatShort}} + {{end}} + {{range .Assignees}} + + + + {{end}} +

    +
  • + {{end}} + + {{template "base/paginate" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/issue/milestone_issues.tmpl b/repo/issue/milestone_issues.tmpl new file mode 100644 index 0000000..f5c6e17 --- /dev/null +++ b/repo/issue/milestone_issues.tmpl @@ -0,0 +1,237 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    +
    +

    {{.Milestone.Name}}

    +
    +
    + +
    + {{if not .Repository.IsArchived}} +
    + {{if or .CanWriteIssues .CanWritePulls}} + {{.i18n.Tr "repo.milestones.edit"}} + {{end}} + {{.i18n.Tr "repo.issues.new"}} +
    + {{end}} +
    +
    +
    + {{ $closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.Lang }} + {{if .IsClosed}} + {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}} + {{else}} + + {{if .Milestone.DeadlineString}} + {{.Milestone.DeadlineString}} + {{else}} + {{$.i18n.Tr "repo.milestones.no_due_date"}} + {{end}} + {{end}} +   + {{.i18n.Tr "repo.milestones.completeness" .Milestone.Completeness}} +
    +
    +
    + +
    + + + {{/* Ten wide does not cope well and makes the columns stack. + This seems to be related to jQuery's hide/show: in fact, switching + issue-actions and issue-filters and having this ten wide will show + this one correctly, but not the other one. */}} +
    + +
    +
    + +
    + {{range .Issues}} + {{ $timeStr:= TimeSinceUnix .CreatedUnix $.Lang }} +
  • + {{if or (and $.CanWriteIssues (not .IsPull)) (and $.CanWritePulls .IsPull)}} +
    + +
    + {{end}} +
    #{{.Index}}
    + {{.Title}} + + {{range .Labels}} + {{.Name}} + {{end}} + + {{if .NumComments}} + {{.NumComments}} + {{end}} + + {{if .TotalTrackedTime}} + {{.TotalTrackedTime | Sec2Time}} + {{end}} + +

    + {{if gt .Poster.ID 0}} + {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink (.Poster.GetDisplayName|Escape) | Safe}} + {{else}} + {{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName|Escape) | Safe}} + {{end}} + {{if .Ref}} + + {{.Ref}} + + {{end}} + {{$tasks := .GetTasks}} + {{if gt $tasks 0}} + {{$tasksDone := .GetTasksDone}} + + {{$tasksDone}} / {{$tasks}} + + {{end}} + {{if ne .DeadlineUnix 0}} + + {{.DeadlineUnix.FormatShort}} + {{end}} + {{range .Assignees}} + + + + {{end}} +

    +
  • + {{end}} + + {{template "base/paginate" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/issue/milestone_new.tmpl b/repo/issue/milestone_new.tmpl new file mode 100644 index 0000000..ea704c0 --- /dev/null +++ b/repo/issue/milestone_new.tmpl @@ -0,0 +1,68 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + +
    +

    + {{if .PageIsEditMilestone}} + {{.i18n.Tr "repo.milestones.edit"}} +
    {{.i18n.Tr "repo.milestones.edit_subheader"}}
    + {{else}} + {{.i18n.Tr "repo.milestones.new"}} +
    {{.i18n.Tr "repo.milestones.new_subheader"}}
    + {{end}} +

    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +
    +
    +
    +
    + {{if .PageIsEditMilestone}} + + {{.i18n.Tr "repo.milestones.cancel"}} + + + {{else}} + + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/issue/milestones.tmpl b/repo/issue/milestones.tmpl new file mode 100644 index 0000000..ef5eece --- /dev/null +++ b/repo/issue/milestones.tmpl @@ -0,0 +1,115 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + +
    + {{template "base/alert" .}} + + + +
    + {{range .Milestones}} +
  • + {{.Name}} +
    +
    +
    +
    +
    +
    + {{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.Lang }} + {{if .IsClosed}} + {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}} + {{else}} + + {{if .DeadlineString}} + {{.DeadlineString}} + {{else}} + {{$.i18n.Tr "repo.milestones.no_due_date"}} + {{end}} + {{end}} + + {{$.i18n.Tr "repo.issues.open_tab" .NumOpenIssues}} + {{$.i18n.Tr "repo.issues.close_tab" .NumClosedIssues}} + {{if .TotalTrackedTime}} {{.TotalTrackedTime|Sec2Time}}{{end}} + +
    + {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} + + {{end}} + {{if .Content}} +
    + {{.RenderedContent|Str2html}} +
    + {{end}} +
  • + {{end}} + + {{template "base/paginate" .}} +
    +
    +
    + +{{if or .CanWriteIssues .CanWritePulls}} + +{{end}} +{{template "base/footer" .}} diff --git a/repo/issue/navbar.tmpl b/repo/issue/navbar.tmpl new file mode 100644 index 0000000..1e86445 --- /dev/null +++ b/repo/issue/navbar.tmpl @@ -0,0 +1,4 @@ + diff --git a/repo/issue/new.tmpl b/repo/issue/new.tmpl new file mode 100644 index 0000000..3c6bc05 --- /dev/null +++ b/repo/issue/new.tmpl @@ -0,0 +1,12 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + +
    + {{template "repo/issue/new_form" .}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/issue/new_form.tmpl b/repo/issue/new_form.tmpl new file mode 100644 index 0000000..6777ec7 --- /dev/null +++ b/repo/issue/new_form.tmpl @@ -0,0 +1,159 @@ +
    + {{.CsrfTokenHtml}} + {{if .Flash}} +
    + {{template "base/alert" .}} +
    + {{end}} +
    +
    +
    + + + +
    +
    + + {{if .PageIsComparePull}} + {{.i18n.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}} + {{end}} +
    + {{template "repo/issue/comment_tab" .}} +
    + +
    +
    +
    +
    +
    + +
    +
    + {{template "repo/issue/branch_selector_field" .}} + + + +
    + {{.i18n.Tr "repo.issues.new.no_label"}} + {{range .Labels}} + {{.Name}} + {{end}} +
    + +
    + + + +
    + {{.i18n.Tr "repo.issues.new.no_milestone"}} +
    + {{if .Milestone}} + {{.Milestone.Name}} + {{end}} +
    +
    + +
    + + + +
    + + {{.i18n.Tr "repo.issues.new.no_assignees"}} + + {{range .Assignees}} + +  {{.GetDisplayName}} + + {{end}} +
    + + +
    +
    +
    +{{if .PageIsComparePull}} + +{{end}} + diff --git a/repo/issue/search.tmpl b/repo/issue/search.tmpl new file mode 100644 index 0000000..522bced --- /dev/null +++ b/repo/issue/search.tmpl @@ -0,0 +1,13 @@ +
    +
    + + + + + + + +
    +
    diff --git a/repo/issue/view.tmpl b/repo/issue/view.tmpl new file mode 100644 index 0000000..7fcc1f2 --- /dev/null +++ b/repo/issue/view.tmpl @@ -0,0 +1,33 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    +
    + {{template "repo/issue/navbar" .}} +
    + {{if not .Repository.IsArchived}} +
    + {{if .PageIsIssueList}} + {{.i18n.Tr "repo.issues.new"}} + {{else}} + {{.i18n.Tr "repo.pulls.new"}} + {{end}} +
    + {{end}} +
    +
    + {{if .Issue.IsPull}} + {{template "repo/issue/view_title" .}} + {{template "repo/pulls/tab_menu" .}} +
    + {{template "repo/issue/view_content" .}} +
    + {{else}} +
    + {{template "repo/issue/view_content" .}} +
    + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/issue/view_content.tmpl b/repo/issue/view_content.tmpl new file mode 100644 index 0000000..a68f4e4 --- /dev/null +++ b/repo/issue/view_content.tmpl @@ -0,0 +1,205 @@ +
    + {{if .Flash}} +
    + {{template "base/alert" .}} +
    + {{end}} + {{if not .Issue.IsPull}} + {{template "repo/issue/view_title" .}} + {{end}} + + {{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.Lang }} +
    + +
    + {{if .Issue.OriginalAuthor }} + + {{else}} + + + + {{end}} +
    +
    + {{if .Issue.OriginalAuthor }} + {{ .Issue.OriginalAuthor }} {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if .Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname | Safe }}){{end}} + {{else}} + {{.Issue.Poster.GetDisplayName}} {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} + {{end}} + {{if not $.Repository.IsArchived}} +
    + {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) }} + {{if or .IsIssueWriter .IsIssuePoster}} +
    + +
    + {{end}} +
    + {{end}} +
    +
    +
    + {{if .Issue.RenderedContent}} + {{.Issue.RenderedContent|Str2html}} + {{else}} + {{.i18n.Tr "repo.issues.no_content"}} + {{end}} +
    +
    {{.Issue.Content}}
    +
    +
    + {{$reactions := .Issue.Reactions.GroupByType}} + {{if $reactions}} +
    + {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions }} +
    + {{end}} + {{if .Issue.Attachments}} +
    +
    + {{range .Issue.Attachments}} + + {{if FilenameIsImage .Name}} + + {{else}} + + {{end}} + + {{end}} +
    +
    + {{end}} +
    +
    + + {{ template "repo/issue/view_content/comments" . }} + + {{if and .Issue.IsPull (not $.Repository.IsArchived)}} + {{ template "repo/issue/view_content/pull". }} + {{end}} + {{if .IsSigned}} + {{ if and (or .IsRepoAdmin .IsRepoIssuesWriter (or (not .Issue.IsLocked))) (not .Repository.IsArchived) }} +
    + + + +
    +
    + {{template "repo/issue/comment_tab" .}} + {{.CsrfTokenHtml}} + +
    + {{if and (or .IsIssueWriter .IsIssuePoster) (not .DisableStatusChange)}} + {{if .Issue.IsClosed}} +
    + {{.i18n.Tr "repo.issues.reopen_issue"}} +
    + {{else}} +
    + {{.i18n.Tr "repo.issues.close_issue"}} +
    + {{end}} + {{end}} + +
    +
    +
    +
    + {{ else if .Repository.IsArchived }} +
    + {{if .Issue.IsPull}} + {{.i18n.Tr "repo.archive.pull.nocomment"}} + {{else}} + {{.i18n.Tr "repo.archive.issue.nocomment"}} + {{end}} +
    + {{ end }} + {{else}} + {{if .Repository.IsArchived}} +
    + {{if .Issue.IsPull}} + {{.i18n.Tr "repo.archive.pull.nocomment"}} + {{else}} + {{.i18n.Tr "repo.archive.issue.nocomment"}} + {{end}} +
    + {{else}} + {{if .IsSigned}} + {{if .Repository.IsArchived}} +
    + + + +
    +
    + {{template "repo/issue/comment_tab" .}} + {{.CsrfTokenHtml}} + +
    + {{if and (or .IsIssueWriter .IsIssuePoster) (not .DisableStatusChange)}} + {{if .Issue.IsClosed}} +
    + {{.i18n.Tr "repo.issues.reopen_issue"}} +
    + {{else}} +
    + {{.i18n.Tr "repo.issues.close_issue"}} +
    + {{end}} + {{end}} + +
    +
    +
    +
    + {{end}} + {{else}} +
    + {{.i18n.Tr "repo.issues.sign_in_require_desc" .SignInLink | Safe}} +
    + {{end}} + {{end}} + {{end}} +
    +
    + + {{ template "repo/issue/view_content/sidebar" . }} +
    + +
    +
    + +
    + +
    +
    + {{$.i18n.Tr "loading"}} +
    +
    +
    {{.i18n.Tr "repo.issues.cancel"}}
    +
    {{.i18n.Tr "repo.issues.save"}}
    +
    +
    +
    + +
    + {{.i18n.Tr "repo.issues.no_content"}} +
    + + diff --git a/repo/issue/view_content/add_reaction.tmpl b/repo/issue/view_content/add_reaction.tmpl new file mode 100644 index 0000000..626db5c --- /dev/null +++ b/repo/issue/view_content/add_reaction.tmpl @@ -0,0 +1,18 @@ +{{if .ctx.IsSigned}} + +{{end}} diff --git a/repo/issue/view_content/comments.tmpl b/repo/issue/view_content/comments.tmpl new file mode 100644 index 0000000..a5f2595 --- /dev/null +++ b/repo/issue/view_content/comments.tmpl @@ -0,0 +1,427 @@ +{{ template "base/alert" }} +{{range .Issue.Comments}} + {{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }} + + + {{if eq .Type 0}} +
    + {{if .OriginalAuthor }} + + {{else}} + + + + {{end}} +
    +
    + {{if .OriginalAuthor }} + {{ .OriginalAuthor }} {{$.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if $.Repository.OriginalURL}}({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}} + {{else}} + {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}} + {{end}} + {{if not $.Repository.IsArchived}} +
    + {{if gt .ShowTag 0}} +
    + {{if eq .ShowTag 1}} + {{$.i18n.Tr "repo.issues.poster"}} + {{else if eq .ShowTag 2}} + {{$.i18n.Tr "repo.issues.collaborator"}} + {{else if eq .ShowTag 3}} + {{$.i18n.Tr "repo.issues.owner"}} + {{end}} +
    + {{end}} + {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) }} + {{if or $.Permission.IsAdmin (eq .Poster.ID $.SignedUserID)}} +
    + + +
    + {{end}} +
    + {{end}} +
    +
    +
    + {{if .RenderedContent}} + {{.RenderedContent|Str2html}} + {{else}} + {{$.i18n.Tr "repo.issues.no_content"}} + {{end}} +
    +
    {{.Content}}
    +
    +
    + {{$reactions := .Reactions.GroupByType}} + {{if $reactions}} +
    + {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions }} +
    + {{end}} + {{if .Attachments}} +
    + +
    + {{end}} +
    +
    + {{else if eq .Type 1}} +
    + + + + + {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}} +
    + {{else if eq .Type 2}} +
    + + + + + {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}} +
    + {{else if or (eq .Type 3) (eq .Type 5) (eq .Type 6)}} +
    + + + + + {{if eq .RefAction 3}}{{end}} + {{.Poster.GetDisplayName}} + {{if (eq .RefRepoID .Issue.RepoID)}} + {{if .Issue.IsPull}} + {{$.i18n.Tr "repo.issues.ref_pull_at" $createdStr | Safe}} + {{else}} + {{$.i18n.Tr "repo.issues.ref_issue_at" $createdStr | Safe}} + {{end}} + {{else}} + {{if .Issue.IsPull}} + {{$.i18n.Tr "repo.issues.ref_pull_ext_at" .RefRepo.FullName $createdStr | Safe}} + {{else}} + {{$.i18n.Tr "repo.issues.ref_issue_ext_at" .RefRepo.FullName $createdStr | Safe}} + {{end}} + {{end}} + + {{if eq .RefAction 3}}{{end}} + + +
    + {{else if eq .Type 4}} +
    + + + + + {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}} + +
    + + {{.Content | Str2html}} +
    +
    + {{else if eq .Type 7}} + {{if .Label}} +
    + + + + + {{.Poster.GetDisplayName}} + {{if .Content}}{{$.i18n.Tr "repo.issues.add_label_at" .Label.ForegroundColor .Label.Color (.Label.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_label_at" .Label.ForegroundColor .Label.Color (.Label.Name|Escape) $createdStr | Safe}}{{end}} +
    + {{end}} + {{else if eq .Type 8}} +
    + + + + + {{.Poster.GetDisplayName}} + {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}} +
    + {{else if eq .Type 9}} +
    + + {{if gt .AssigneeID 0}} + {{if .RemovedAssignee}} + + + + + {{.Assignee.GetDisplayName}} + {{ if eq .Poster.ID .Assignee.ID }} + {{$.i18n.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}} + {{ else }} + {{$.i18n.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}} + {{ end }} + + {{else}} + + + + + {{.Assignee.GetDisplayName}} + {{if eq .Poster.ID .AssigneeID}} + {{$.i18n.Tr "repo.issues.self_assign_at" $createdStr | Safe}} + {{else}} + {{$.i18n.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}} + {{end}} + + {{end}} + {{end}} +
    + {{else if eq .Type 10}} +
    + + + + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.change_title_at" (.OldTitle|Escape) (.NewTitle|Escape) $createdStr | Safe}} + +
    + {{else if eq .Type 11}} +
    + + + + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.delete_branch_at" (.CommitSHA|Escape) $createdStr | Safe}} + +
    + {{else if eq .Type 12}} +
    + + + + + {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.start_tracking_history" $createdStr | Safe}} +
    + {{else if eq .Type 13}} +
    + + + + + {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}} + +
    + + {{.Content}} +
    +
    + {{else if eq .Type 14}} +
    + + + + + {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.add_time_history" $createdStr | Safe}} +
    + + {{.Content}} +
    +
    + {{else if eq .Type 15}} +
    + + + + + {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}} +
    + {{else if eq .Type 16}} +
    + + + + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}} + +
    + {{else if eq .Type 17}} +
    + + + + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.due_date_modified" (.Content | ParseDeadline) $createdStr | Safe}} + +
    + {{else if eq .Type 18}} +
    + + + + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}} + +
    + {{else if eq .Type 19}} +
    + + + + + + {{$.i18n.Tr "repo.issues.dependency.added_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}} + + +
    + {{else if eq .Type 20}} +
    + + + + + + {{$.i18n.Tr "repo.issues.dependency.removed_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}} + + +
    + {{else if eq .Type 22}} +
    + + + + + {{.Poster.GetDisplayName}} + {{if eq .Review.Type 1}} + {{$.i18n.Tr "repo.issues.review.approve" $createdStr | Safe}} + {{else if eq .Review.Type 2}} + {{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}} + {{else if eq .Review.Type 3}} + {{$.i18n.Tr "repo.issues.review.reject" $createdStr | Safe}} + {{else}} + {{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}} + {{end}} + + {{if .Content}} +
    + + {{.Content}} +
    + {{end}} + {{ range $filename, $lines := .Review.CodeComments}} + {{range $line, $comms := $lines}} +
    +
    + {{$invalid := (index $comms 0).Invalidated}} + {{if $invalid}} + + + {{end}} + {{$filename}} +
    + {{$diff := (CommentMustAsDiff (index $comms 0))}} + {{if $diff}} + {{$file := (index $diff.Files 0)}} +
    +
    +
    + + + {{template "repo/diff/section_unified" dict "file" $file "root" $}} + +
    +
    +
    +
    + {{end}} +
    +
    + {{range $comms}} + {{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }} +
    + + + +
    + {{.Poster.GetDisplayName}} + +
    +
    + {{if .RenderedContent}} + {{.RenderedContent|Str2html}} + {{else}} + {{$.i18n.Tr "repo.issues.no_content"}} + {{end}} +
    +
    {{.Content}}
    +
    +
    +
    + {{end}} +
    + {{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $comms 0).ReviewID "root" $ "comment" (index $comms 0)}} +
    +
    + {{end}} + {{end}} +
    + {{else if eq .Type 23}} +
    + + + + + + {{ if .Content }} + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}} + + {{ else }} + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.lock_no_reason" $createdStr | Safe}} + + {{ end }} +
    + {{else if eq .Type 24}} +
    + + + + + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.unlock_comment" $createdStr | Safe}} + +
    + {{end}} +{{end}} diff --git a/repo/issue/view_content/pull.tmpl b/repo/issue/view_content/pull.tmpl new file mode 100644 index 0000000..a5c6712 --- /dev/null +++ b/repo/issue/view_content/pull.tmpl @@ -0,0 +1,266 @@ +{{if gt (len .PullReviewersWithType) 0}} +
    +
    +
    +

    {{$.i18n.Tr "repo.issues.review.reviewers"}}

    + {{range .PullReviewersWithType}} + {{ $createdStr:= TimeSinceUnix .ReviewUpdatedUnix $.Lang }} +
    +
    + + + + + + + {{.Name}} + {{if eq .Type 1}} + {{$.i18n.Tr "repo.issues.review.approve" $createdStr | Safe}} + {{else if eq .Type 2}} + {{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}} + {{else if eq .Type 3}} + {{$.i18n.Tr "repo.issues.review.reject" $createdStr | Safe}} + {{else}} + {{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}} + {{end}} + +
    + {{end}} +
    +
    +
    +{{end}} +
    + +
    + {{template "repo/pulls/status" .}} +
    + {{if .Issue.PullRequest.HasMerged}} +
    + {{if .Issue.PullRequest.MergedCommitID}} + {{$link := printf "%s/commit/%s" $.Repository.HTMLURL .Issue.PullRequest.MergedCommitID}} + {{$.i18n.Tr "repo.pulls.merged_as" $link (ShortSha .Issue.PullRequest.MergedCommitID) | Safe}} + {{else}} + {{$.i18n.Tr "repo.pulls.has_merged"}} + {{end}} +
    + {{if .IsPullBranchDeletable}} +
    +
    + {{$.i18n.Tr "repo.branch.delete" .HeadTarget}} +
    + {{end}} + {{else if .Issue.IsClosed}} +
    + {{if .IsPullRequestBroken}} + {{$.i18n.Tr "repo.pulls.cant_reopen_deleted_branch"}} + {{else}} + {{$.i18n.Tr "repo.pulls.reopen_to_merge"}} + {{end}} +
    + {{if and .IsPullBranchDeletable ( not .IsPullRequestBroken )}} +
    +
    + {{$.i18n.Tr "repo.branch.delete" .HeadTarget}} +
    + {{end}} + {{else if .IsPullFilesConflicted}} +
    + + {{$.i18n.Tr "repo.pulls.files_conflicted"}} + {{range .ConflictedFiles}} +
    {{.}}
    + {{end}} +
    + {{else if .IsPullRequestBroken}} +
    + + {{$.i18n.Tr "repo.pulls.data_broken"}} +
    + {{else if .IsPullWorkInProgress}} +
    + + {{$.i18n.Tr "repo.pulls.cannot_merge_work_in_progress" .WorkInProgressPrefix | Str2html}} +
    + {{else if .IsBlockedByApprovals}} +
    + + {{$.i18n.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .Issue.PullRequest.ProtectedBranch.RequiredApprovals}} +
    + {{else if .Issue.PullRequest.IsChecking}} +
    + + {{$.i18n.Tr "repo.pulls.is_checking"}} +
    + {{else if and (not .Issue.PullRequest.CanAutoMerge) .EnableStatusCheck (not .IsRequiredStatusCheckSuccess)}} +
    + + {{$.i18n.Tr "repo.pulls.required_status_check_failed"}} +
    + {{else if .Issue.PullRequest.CanAutoMerge}} + {{if and .EnableStatusCheck (not .IsRequiredStatusCheckSuccess)}} +
    + + {{$.i18n.Tr "repo.pulls.required_status_check_failed"}} +
    + {{end}} + {{if or $.IsRepoAdmin (not .EnableStatusCheck) .IsRequiredStatusCheckSuccess}} + {{if and $.IsRepoAdmin .EnableStatusCheck (not .IsRequiredStatusCheckSuccess)}} +
    + + {{$.i18n.Tr "repo.pulls.required_status_check_administrator"}} +
    + {{else}} +
    + + {{$.i18n.Tr "repo.pulls.can_auto_merge_desc"}} +
    + {{end}} + {{if .AllowMerge}} + {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}} + {{if or $prUnit.PullRequestsConfig.AllowMerge $prUnit.PullRequestsConfig.AllowRebase $prUnit.PullRequestsConfig.AllowRebaseMerge $prUnit.PullRequestsConfig.AllowSquash}} +
    + {{if $prUnit.PullRequestsConfig.AllowMerge}} + + {{end}} + {{if $prUnit.PullRequestsConfig.AllowRebase}} + + {{end}} + {{if $prUnit.PullRequestsConfig.AllowRebaseMerge}} + + {{end}} + {{if $prUnit.PullRequestsConfig.AllowSquash}} + + {{end}} +
    + + +
    + {{else}} +
    + + {{$.i18n.Tr "repo.pulls.no_merge_desc"}} +
    +
    + + {{$.i18n.Tr "repo.pulls.no_merge_helper"}} +
    + {{end}} + {{end}} + {{end}} + {{else}} +
    + + {{$.i18n.Tr "repo.pulls.cannot_auto_merge_desc"}} +
    +
    + + {{$.i18n.Tr "repo.pulls.cannot_auto_merge_helper"}} +
    + {{end}} +
    +
    +
    diff --git a/repo/issue/view_content/reactions.tmpl b/repo/issue/view_content/reactions.tmpl new file mode 100644 index 0000000..f4810f4 --- /dev/null +++ b/repo/issue/view_content/reactions.tmpl @@ -0,0 +1,15 @@ +{{range $key, $value := .Reactions}} + + {{if eq $key "hooray"}} + :tada: + {{else}} + {{if eq $key "laugh"}} + :laughing: + {{else}} + :{{$key}}: + {{end}} + {{end}} + {{len $value}} + +{{end}} +{{template "repo/issue/view_content/add_reaction" Dict "ctx" $.ctx "ActionURL" .ActionURL }} diff --git a/repo/issue/view_content/sidebar.tmpl b/repo/issue/view_content/sidebar.tmpl new file mode 100644 index 0000000..c42d8af --- /dev/null +++ b/repo/issue/view_content/sidebar.tmpl @@ -0,0 +1,459 @@ +
    +
    + {{template "repo/issue/branch_selector_field" .}} + + +
    + {{.i18n.Tr "repo.issues.new.no_label"}} + {{range .Labels}} +
    + {{.Name}} +
    + + {{end}} +
    + +
    + + +
    + {{.i18n.Tr "repo.issues.new.no_milestone"}} +
    + {{if .Issue.Milestone}} + {{.Issue.Milestone.Name}} + {{end}} +
    +
    + +
    + + + +
    + {{.i18n.Tr "repo.issues.new.no_assignees"}} +
    + {{range .Issue.Assignees}} + + {{end}} +
    +
    + +
    + +
    + {{.i18n.Tr "repo.issues.num_participants" .NumParticipants}} +
    + {{range .Participants}} + + + + {{end}} +
    +
    + + {{if and $.IssueWatch (not .Repository.IsArchived)}} +
    + +
    + {{.i18n.Tr "notification.notifications"}} +
    +
    + + {{$.CsrfTokenHtml}} + +
    +
    +
    + {{end}} + {{if .Repository.IsTimetrackerEnabled }} + {{if and .CanUseTimetracker (not .Repository.IsArchived)}} +
    +
    + {{.i18n.Tr "repo.issues.tracker"}} +
    +
    + {{$.CsrfTokenHtml}} +
    +
    + {{$.CsrfTokenHtml}} +
    + {{if $.IsStopwatchRunning}} +
    + + +
    + {{else}} + {{if .HasUserStopwatch}} +
    + {{.i18n.Tr "repo.issues.tracking_already_started" .OtherStopwatchURL | Safe}} +
    + {{end}} +
    + + + +
    + {{end}} +
    +
    + {{end}} + {{if gt (len .WorkingUsers) 0}} +
    +
    + {{.i18n.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}} +
    + {{range $user, $trackedtime := .WorkingUsers}} +
    + + + +
    + {{$user.DisplayName}} +
    + {{$trackedtime}} +
    +
    +
    + {{end}} +
    +
    + {{end}} + {{end}} + +
    + {{.i18n.Tr "repo.issues.due_date"}} +
    + + {{if ne .Issue.DeadlineUnix 0}} +

    + + {{.Issue.DeadlineUnix.FormatShort}} + {{if .Issue.IsOverdue}} + {{.i18n.Tr "repo.issues.due_date_overdue"}} + {{end}} + {{if and .IsIssueWriter (not .Repository.IsArchived)}} +
    + {{$.i18n.Tr "repo.issues.due_date_form_edit"}} - + {{$.i18n.Tr "repo.issues.due_date_form_remove"}} + {{end}} +

    + {{else}} +

    {{.i18n.Tr "repo.issues.due_date_not_set"}}

    + {{end}} + + {{if and .IsIssueWriter (not .Repository.IsArchived)}} + + {{end}} +
    + + {{if .Repository.IsDependenciesEnabled}} +
    + +
    + {{if (and (not .BlockedByDependencies) (not .BlockingDependencies))}} + {{.i18n.Tr "repo.issues.dependency.title"}} +
    +

    {{if .Issue.IsPull}} + {{.i18n.Tr "repo.issues.dependency.pr_no_dependencies"}} + {{else}} + {{.i18n.Tr "repo.issues.dependency.issue_no_dependencies"}} + {{end}}

    + {{end}} + + {{if .BlockingDependencies}} + + {{.i18n.Tr "repo.issues.dependency.blocks_short"}} + +
    + {{range .BlockingDependencies}} +
    +
    #{{.Index}}
    + {{.Title}} +
    + {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} + + + + {{end}} +
    +
    + {{end}} +
    + {{end}} + + {{if .BlockedByDependencies}} + + {{.i18n.Tr "repo.issues.dependency.blocked_by_short"}} + +
    + {{range .BlockedByDependencies}} +
    +
    #{{.Index}}
    + {{.Title}} +
    + {{if and $.CanCreateIssueDependencies (not $.IsArchived)}} + + + + {{end}} +
    +
    + {{end}} +
    + {{end}} + + {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} +
    +
    + {{$.CsrfTokenHtml}} +
    + + +
    +
    +
    + {{end}} +
    + + {{ if and .IsRepoAdmin (not .Repository.IsArchived) }} +
    +
    +
    + + +
    +
    + + + + {{ end }} + +
    +
    +{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} + + + + + +{{end}} + {{end}} diff --git a/repo/issue/view_title.tmpl b/repo/issue/view_title.tmpl new file mode 100644 index 0000000..e97ca32 --- /dev/null +++ b/repo/issue/view_title.tmpl @@ -0,0 +1,61 @@ +
    +
    +

    + #{{.Issue.Index}} {{.Issue.Title}} + +

    + {{if and (or .IsIssueWriter .IsIssuePoster) (not .Repository.IsArchived)}} +
    +
    +
    {{.i18n.Tr "repo.issues.edit"}}
    + + +
    +
    + {{end}} +
    + {{if .HasMerged}} +
    {{.i18n.Tr "repo.pulls.merged"}}
    + {{else if .Issue.IsClosed}} +
    {{.i18n.Tr "repo.issues.closed_title"}}
    + {{else}} +
    {{.i18n.Tr "repo.issues.open_title"}}
    + {{end}} + + {{if .Issue.IsPull}} + {{if .Issue.PullRequest.HasMerged}} + {{ $mergedStr:= TimeSinceUnix .Issue.PullRequest.MergedUnix $.Lang }} + {{if .Issue.OriginalAuthor }} + {{.Issue.OriginalAuthor}} + {{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2html}} + {{else}} + {{.Issue.PullRequest.Merger.GetDisplayName}} + {{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2html}} + {{end}} + {{else}} + {{if .Issue.OriginalAuthor }} + {{.Issue.OriginalAuthor}} + {{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}} + {{else}} + {{.Issue.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}} + {{end}} + {{end}} + {{else}} + {{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.Lang }} + + {{if .Issue.OriginalAuthor }} + {{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.OriginalAuthor | Safe}} + {{else if gt .Issue.Poster.ID 0}} + {{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink (.Issue.Poster.GetDisplayName|Escape) | Safe}} + {{else}} + {{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape) | Safe}} + {{end}} + · + {{$.i18n.Tr "repo.issues.num_comments" .Issue.NumComments}} + + {{end}} +
    +
    diff --git a/repo/migrate.tmpl b/repo/migrate.tmpl new file mode 100644 index 0000000..f30b59d --- /dev/null +++ b/repo/migrate.tmpl @@ -0,0 +1,140 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{.i18n.Tr "new_migrate"}} +

    +
    + {{template "base/alert" .}} +
    + + + + {{.i18n.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.i18n.Tr "repo.migrate.clone_local_path"}}{{end}} +
    {{.i18n.Tr "repo.migrate.migrate_items_options"}} + {{if .LFSActive}}
    {{.i18n.Tr "repo.migrate.lfs_mirror_unsupported"}}{{end}} +
    +
    +
    +
    + + {{.i18n.Tr "repo.need_auth"}} +
    +
    +
    + + +
    + +
    + + +
    +
    +
    + +
    + +
    + + +
    + +
    + + +
    +
    + +
    + {{if .IsForcedPrivate}} + + + {{else}} + + + {{end}} +
    +
    +
    + +
    + + +
    +
    +
    +
    + +
    + + +
    +
    + + +
    +
    +
    + +
    + + +
    +
    + + +
    +
    +
    + +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    + +
    + + + {{.i18n.Tr "cancel"}} +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/migrating.tmpl b/repo/migrating.tmpl new file mode 100644 index 0000000..34031d5 --- /dev/null +++ b/repo/migrating.tmpl @@ -0,0 +1,31 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    +
    + {{template "base/alert" .}} +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +

    {{.i18n.Tr "repo.migrate.migrating" .CloneAddr | Safe}}

    +
    +
    +

    {{.i18n.Tr "repo.migrate.migrating_failed" .CloneAddr | Safe}}

    +
    +
    +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/pulls/commits.tmpl b/repo/pulls/commits.tmpl new file mode 100644 index 0000000..d084f9b --- /dev/null +++ b/repo/pulls/commits.tmpl @@ -0,0 +1,19 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + +
    + {{template "repo/issue/view_title" .}} + {{template "repo/pulls/tab_menu" .}} +
    + {{template "repo/commits_table" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/pulls/files.tmpl b/repo/pulls/files.tmpl new file mode 100644 index 0000000..c882c0c --- /dev/null +++ b/repo/pulls/files.tmpl @@ -0,0 +1,20 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + +
    + {{template "repo/issue/view_title" .}} + {{template "repo/pulls/tab_menu" .}} + {{template "base/alert" .}} +
    + {{template "repo/diff/box" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/pulls/fork.tmpl b/repo/pulls/fork.tmpl new file mode 100644 index 0000000..c7ad0f0 --- /dev/null +++ b/repo/pulls/fork.tmpl @@ -0,0 +1,71 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{.i18n.Tr "new_fork"}} +

    +
    + {{template "base/alert" .}} +
    + + +
    + +
    + + {{.ForkFrom}} +
    +
    + + +
    +
    + +
    + + +
    + {{.i18n.Tr "repo.fork_visibility_helper"}} +
    +
    + + +
    + +
    + + + {{.i18n.Tr "cancel"}} +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/pulls/status.tmpl b/repo/pulls/status.tmpl new file mode 100644 index 0000000..76a4eb5 --- /dev/null +++ b/repo/pulls/status.tmpl @@ -0,0 +1,26 @@ +{{if $.LatestCommitStatus}} +
    + {{if eq .LatestCommitStatus.State "pending"}} + {{$.i18n.Tr "repo.pulls.status_checking"}} + {{else if eq .LatestCommitStatus.State "success"}} + {{$.i18n.Tr "repo.pulls.status_checks_success"}} + {{else if eq .LatestCommitStatus.State "error"}} + {{$.i18n.Tr "repo.pulls.status_checks_error"}} + {{else}} + {{$.i18n.Tr "repo.pulls.status_checking"}} + {{end}} +
    + + {{range $.LatestCommitStatuses}} +
    + {{template "repo/commit_status" .}} + {{.Context}} {{.Description}} +
    + {{if $.is_context_required}} + {{if (call $.is_context_required .Context)}}
    Required
    {{end}} + {{end}} + {{if .TargetURL}}Details{{end}} +
    +
    + {{end}} +{{end}} diff --git a/repo/pulls/tab_menu.tmpl b/repo/pulls/tab_menu.tmpl new file mode 100644 index 0000000..e3f39e8 --- /dev/null +++ b/repo/pulls/tab_menu.tmpl @@ -0,0 +1,17 @@ + diff --git a/repo/release/list.tmpl b/repo/release/list.tmpl new file mode 100644 index 0000000..777d3a2 --- /dev/null +++ b/repo/release/list.tmpl @@ -0,0 +1,105 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "repo.release.releases"}} + {{if .CanCreateRelease}} + + {{end}} +

    + + {{template "base/paginate" .}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/release/new.tmpl b/repo/release/new.tmpl new file mode 100644 index 0000000..01af6ed --- /dev/null +++ b/repo/release/new.tmpl @@ -0,0 +1,109 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +

    + {{if .PageIsEditRelease}} + {{.i18n.Tr "repo.release.edit_release"}} +
    {{.i18n.Tr "repo.release.edit_subheader"}}
    + {{else}} + {{.i18n.Tr "repo.release.new_release"}} +
    {{.i18n.Tr "repo.release.new_subheader"}}
    + {{end}} +

    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} +
    +
    + {{if .PageIsEditRelease}} + {{.tag_name}}@{{.tag_target}} + {{else}} + + @ + + {{.i18n.Tr "repo.release.tag_helper"}} + {{end}} +
    +
    +
    +
    + + +
    +
    + + +
    + {{if .IsAttachmentEnabled}} +
    +
    + {{end}} +
    +
    +
    +
    +
    +
    + + +
    +
    + {{.i18n.Tr "repo.release.prerelease_helper"}} +
    + {{if .PageIsEditRelease}} + + {{.i18n.Tr "repo.release.cancel"}} + + {{if .IsDraft}} + + + {{else}} + + {{end}} + + {{$.i18n.Tr "repo.release.delete_release"}} + + {{else}} + + + {{end}} +
    +
    +
    +
    +
    +
    + +{{if .PageIsEditRelease}} + +{{end}} +{{template "base/footer" .}} diff --git a/repo/search.tmpl b/repo/search.tmpl new file mode 100644 index 0000000..c4413e7 --- /dev/null +++ b/repo/search.tmpl @@ -0,0 +1,49 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + + {{if .Keyword}} +

    + {{.i18n.Tr "repo.search.results" (.Keyword|Escape) .RepoLink .RepoName | Str2html }} +

    + + {{template "base/paginate" .}} + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/settings/branches.tmpl b/repo/settings/branches.tmpl new file mode 100644 index 0000000..c7f2c9c --- /dev/null +++ b/repo/settings/branches.tmpl @@ -0,0 +1,83 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} +
    + {{template "base/alert" .}} + {{if .Repository.IsArchived}} +
    + {{.i18n.Tr "repo.settings.archive.branchsettings_unavailable"}} +
    + {{else}} +

    + {{.i18n.Tr "repo.default_branch"}} +

    +
    +

    + {{.i18n.Tr "repo.settings.default_branch_desc"}} +

    +
    + {{.CsrfTokenHtml}} + + {{if not .Repository.IsEmpty}} +
    + + +
    + {{end}} +
    +
    + +

    + {{.i18n.Tr "repo.settings.protected_branch"}} +

    + +
    +
    +
    + +
    +
    + +
    +
    + + + {{range .ProtectedBranches}} + + + + + {{else}} + + {{end}} + +
    {{.BranchName}}
    {{$.i18n.Tr "repo.settings.edit_protected_branch"}}
    {{.i18n.Tr "repo.settings.no_protected_branch"}}
    +
    +
    +
    + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/settings/collaboration.tmpl b/repo/settings/collaboration.tmpl new file mode 100644 index 0000000..c0b444d --- /dev/null +++ b/repo/settings/collaboration.tmpl @@ -0,0 +1,126 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "repo.settings.collaboration"}} +

    + {{if .Collaborators}} +
    + {{range .Collaborators}} +
    + +
    + + +
    +
    + +
    +
    + {{end}} +
    + {{end}} +
    +
    + {{.CsrfTokenHtml}} +
    + +
    + +
    +
    + + {{if .RepoOwnerIsOrganization}} +

    + Teams +

    + {{ $allowedToChangeTeams := ( or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner)) }} + {{if .Teams}} +
    + {{range $t, $team := .Teams}} +
    + +
    + + + {{ if or (eq .Authorize 1) (eq .Authorize 2) }} + {{ $first := true }} +
    + Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $unit.Type) ($team.UnitEnabled $unit.Type)}}{{if $first}}{{ $first = false }}{{else}}, {{end}}{{$.i18n.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}} +
    + {{end}} +
    + {{if $allowedToChangeTeams}} + {{ $globalRepoAccess := (eq .LowerName "owners") }} +
    + +
    + {{end}} +
    + {{end}} +
    + {{end}} +
    + {{if $allowedToChangeTeams}} +
    + {{.CsrfTokenHtml}} +
    + +
    + +
    + {{else}} +
    + Changing team access for repository has been restricted to organization owner +
    + {{end}} +
    + {{end}} +
    +
    + + +{{template "base/footer" .}} diff --git a/repo/settings/deploy_keys.tmpl b/repo/settings/deploy_keys.tmpl new file mode 100644 index 0000000..57477b3 --- /dev/null +++ b/repo/settings/deploy_keys.tmpl @@ -0,0 +1,100 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "repo.settings.deploy_keys"}} +
    + {{if not .DisableSSH}} +
    {{.i18n.Tr "repo.settings.add_deploy_key"}}
    + {{else}} +
    {{.i18n.Tr "settings.ssh_disabled"}}
    + {{end}} +
    +

    +
    + {{if .Deploykeys}} +
    + {{range .Deploykeys}} +
    +
    + +
    + +
    + {{.Name}} +
    + {{.Fingerprint}} +
    +
    + {{$.i18n.Tr "settings.add_on"}} {{.CreatedUnix.FormatShort}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} {{.UpdatedUnix.FormatShort}}{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} - {{$.i18n.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.i18n.Tr "settings.can_write_info"}} {{end}} +
    +
    +
    + {{end}} +
    + {{else}} + {{.i18n.Tr "repo.settings.no_deploy_keys"}} + {{end}} +
    +
    +
    +

    + {{.i18n.Tr "repo.settings.add_deploy_key"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + {{.i18n.Tr "repo.settings.deploy_key_desc"}} +
    +
    + + +
    +
    + + +
    +
    +
    + + + {{$.i18n.Tr "repo.settings.is_writable_info" | Str2html}} +
    +
    + +
    +
    +
    +
    +
    + + +{{template "base/footer" .}} diff --git a/repo/settings/githook_edit.tmpl b/repo/settings/githook_edit.tmpl new file mode 100644 index 0000000..04833cf --- /dev/null +++ b/repo/settings/githook_edit.tmpl @@ -0,0 +1,32 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "repo.settings.githooks"}} +

    +
    +

    {{.i18n.Tr "repo.settings.githook_edit_desc"}}

    +
    + {{.CsrfTokenHtml}} + {{with .Hook}} +
    + + {{.Name}} +
    +
    + + +
    + +
    + +
    + {{end}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/settings/githooks.tmpl b/repo/settings/githooks.tmpl new file mode 100644 index 0000000..2af6678 --- /dev/null +++ b/repo/settings/githooks.tmpl @@ -0,0 +1,26 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "repo.settings.githooks"}} +

    +
    +
    +
    + {{.i18n.Tr "repo.settings.githooks_desc" | Str2html}} +
    + {{range .Hooks}} +
    + + {{.Name}} + +
    + {{end}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/settings/nav.tmpl b/repo/settings/nav.tmpl new file mode 100644 index 0000000..5cc77e1 --- /dev/null +++ b/repo/settings/nav.tmpl @@ -0,0 +1,15 @@ +
    +

    {{.i18n.Tr "repo.settings"}}

    + +
    diff --git a/repo/settings/navbar.tmpl b/repo/settings/navbar.tmpl new file mode 100644 index 0000000..2408200 --- /dev/null +++ b/repo/settings/navbar.tmpl @@ -0,0 +1,24 @@ + diff --git a/repo/settings/options.tmpl b/repo/settings/options.tmpl new file mode 100644 index 0000000..a93efb8 --- /dev/null +++ b/repo/settings/options.tmpl @@ -0,0 +1,565 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "repo.settings.basic_settings"}} +

    +
    +
    + {{.CsrfTokenHtml}} + +
    + + +
    + {{if not .Repository.IsFork}} +
    + +
    + {{if .IsAdmin}} + + {{else}} + + {{end}} + +
    +
    + {{end}} +
    + + +
    +
    + + +
    + +
    + +
    +
    + +
    + +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    + + {{$.i18n.Tr "settings.delete_current_avatar"}} +
    +
    + +
    + + {{if .Repository.IsMirror}} +

    + {{.i18n.Tr "repo.settings.mirror_settings"}} +

    +
    +
    + {{.CsrfTokenHtml}} + +
    + +
    + + +
    +
    +
    + + +
    +
    + + +

    {{.i18n.Tr "repo.mirror_address_desc"}}

    +
    +
    + +
    +
    + + +
    + +
    + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    + {{.CsrfTokenHtml}} + +
    + + {{.Mirror.UpdatedUnix.AsTime}} +
    +
    + +
    +
    +
    + {{end}} + +

    + {{.i18n.Tr "repo.settings.advanced_settings"}} +

    +
    +
    + {{.CsrfTokenHtml}} + + + {{$isWikiEnabled := or (.Repository.UnitEnabled $.UnitTypeWiki) (.Repository.UnitEnabled $.UnitTypeExternalWiki)}} +
    + +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +

    {{.i18n.Tr "repo.settings.external_wiki_url_desc"}}

    +
    +
    + +
    + + {{$isIssuesEnabled := or (.Repository.UnitEnabled $.UnitTypeIssues) (.Repository.UnitEnabled $.UnitTypeExternalTracker)}} +
    + +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + {{if .Repository.CanEnableTimetracker}} +
    +
    + + +
    +
    +
    +
    + + +
    +
    + {{end}} +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +

    {{.i18n.Tr "repo.settings.external_tracker_url_desc"}}

    +
    +
    + + +

    {{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}

    +
    +
    + +
    +
    + {{$externalTracker := (.Repository.MustGetUnit $.UnitTypeExternalTracker)}} + {{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}} + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + {{if .Repository.CanEnablePulls}} +
    + {{$pullRequestEnabled := .Repository.UnitEnabled $.UnitTypePullRequests}} + {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}} +
    + +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + {{end}} + +
    +
    + +
    +
    +
    + + {{if .IsAdmin}} +

    + {{.i18n.Tr "repo.settings.admin_settings"}} +

    +
    +
    + {{.CsrfTokenHtml}} + +
    +
    + + +
    +
    +
    + + +
    + +
    +
    + +
    +
    +
    + {{end}} + + {{if .Permission.IsOwner}} +

    + {{.i18n.Tr "repo.settings.danger_zone"}} +

    +
    + {{if .Repository.IsMirror}} +
    +
    + +
    +
    +
    {{.i18n.Tr "repo.settings.convert"}}
    +

    {{.i18n.Tr "repo.settings.convert_desc"}}

    +
    +
    + +
    + {{end}} +
    +
    + +
    +
    +
    {{.i18n.Tr "repo.settings.transfer"}}
    +

    {{.i18n.Tr "repo.settings.transfer_desc"}}

    +
    +
    + + {{if .Permission.CanRead $.UnitTypeWiki}} +
    + +
    +
    + +
    +
    +
    {{.i18n.Tr "repo.settings.wiki_delete"}}
    +

    {{.i18n.Tr "repo.settings.wiki_delete_desc"}}

    +
    +
    + {{end}} + +
    + +
    +
    + +
    +
    +
    {{.i18n.Tr "repo.settings.delete"}}
    +

    {{.i18n.Tr "repo.settings.delete_desc"}}

    +
    +
    + + {{if not .Repository.IsMirror}} +
    + +
    +
    + +
    +
    + {{if .Repository.IsArchived}} +
    {{.i18n.Tr "repo.settings.unarchive.header"}}
    +

    {{.i18n.Tr "repo.settings.unarchive.text"}}

    + {{else}} +
    {{.i18n.Tr "repo.settings.archive.header"}}
    +

    {{.i18n.Tr "repo.settings.archive.text"}}

    + {{end}} +
    +
    + {{end}} +
    + {{end}} +
    +
    + +{{if .Permission.IsOwner}} + {{if .Repository.IsMirror}} + + {{end}} + + + + + + {{if .Repository.UnitEnabled $.UnitTypeWiki}} + + {{end}} + + {{if not .Repository.IsMirror}} + + {{end}} +{{end}} + +{{template "base/footer" .}} diff --git a/repo/settings/protected_branch.tmpl b/repo/settings/protected_branch.tmpl new file mode 100644 index 0000000..a433fc5 --- /dev/null +++ b/repo/settings/protected_branch.tmpl @@ -0,0 +1,190 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "repo.settings.branch_protection" .Branch.BranchName | Str2html}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    +
    + + +

    {{.i18n.Tr "repo.settings.protect_this_branch_desc"}}

    +
    +
    +
    +
    +
    + + +

    {{.i18n.Tr "repo.settings.protect_whitelist_committers_desc"}}

    +
    +
    +
    +
    + + +
    + {{if .Owner.IsOrganization}} +
    +
    + + +
    + {{end}} +
    + +
    +
    + + +

    {{.i18n.Tr "repo.settings.protect_merge_whitelist_committers_desc"}}

    +
    +
    +
    +
    + + +
    + {{if .Owner.IsOrganization}} +
    +
    + + +
    + {{end}} +
    + +
    +
    + + +

    {{.i18n.Tr "repo.settings.protect_check_status_contexts_desc"}}

    +
    +
    + +
    +
    + + + + + + + {{range $.branch_status_check_contexts}} + + {{end}} + +
    + {{.i18n.Tr "repo.settings.protect_check_status_contexts_list"}} +
    + + + + {{.}} + {{if $.is_context_required}}{{if call $.is_context_required .}}
    Required
    {{end}}{{end}} +
    +
    +
    + +
    + + +

    {{.i18n.Tr "repo.settings.protect_required_approvals_desc"}}

    +
    +
    +
    + + +
    + {{if .Owner.IsOrganization}} +
    +
    + + +
    + {{end}} +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/settings/webhook/base.tmpl b/repo/settings/webhook/base.tmpl new file mode 100644 index 0000000..6f48613 --- /dev/null +++ b/repo/settings/webhook/base.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} +
    + {{template "repo/settings/webhook/list" .}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/settings/webhook/delete_modal.tmpl b/repo/settings/webhook/delete_modal.tmpl new file mode 100644 index 0000000..2a2a7c8 --- /dev/null +++ b/repo/settings/webhook/delete_modal.tmpl @@ -0,0 +1,19 @@ + diff --git a/repo/settings/webhook/dingtalk.tmpl b/repo/settings/webhook/dingtalk.tmpl new file mode 100644 index 0000000..7a82c03 --- /dev/null +++ b/repo/settings/webhook/dingtalk.tmpl @@ -0,0 +1,11 @@ +{{if eq .HookType "dingtalk"}} +

    {{.i18n.Tr "repo.settings.add_dingtalk_hook_desc" "https://dingtalk.com" | Str2html}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{template "repo/settings/webhook/settings" .}} +
    +{{end}} diff --git a/repo/settings/webhook/discord.tmpl b/repo/settings/webhook/discord.tmpl new file mode 100644 index 0000000..01f6f08 --- /dev/null +++ b/repo/settings/webhook/discord.tmpl @@ -0,0 +1,19 @@ +{{if eq .HookType "discord"}} +

    {{.i18n.Tr "repo.settings.add_discord_hook_desc" "https://discordapp.com" | Str2html}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    + {{template "repo/settings/webhook/settings" .}} +
    +{{end}} diff --git a/repo/settings/webhook/gitea.tmpl b/repo/settings/webhook/gitea.tmpl new file mode 100644 index 0000000..8c2f032 --- /dev/null +++ b/repo/settings/webhook/gitea.tmpl @@ -0,0 +1,40 @@ +{{if eq .HookType "gitea"}} +

    {{.i18n.Tr "repo.settings.add_webhook_desc" "https://docs.gitea.io/en-us/webhooks/" | Str2html}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    + +
    + + +
    + {{template "repo/settings/webhook/settings" .}} +
    +{{end}} diff --git a/repo/settings/webhook/gogs.tmpl b/repo/settings/webhook/gogs.tmpl new file mode 100644 index 0000000..203a0a7 --- /dev/null +++ b/repo/settings/webhook/gogs.tmpl @@ -0,0 +1,28 @@ +{{if eq .HookType "gogs"}} +

    {{.i18n.Tr "repo.settings.add_webhook_desc" "https://docs.gitea.io/en-us/webhooks/" | Str2html}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + +
    + + +
    + {{template "repo/settings/webhook/settings" .}} +
    +{{end}} diff --git a/repo/settings/webhook/history.tmpl b/repo/settings/webhook/history.tmpl new file mode 100644 index 0000000..577f357 --- /dev/null +++ b/repo/settings/webhook/history.tmpl @@ -0,0 +1,73 @@ +{{if .PageIsSettingsHooksEdit}} +

    + {{.i18n.Tr "repo.settings.recent_deliveries"}} + {{if .Permission.IsAdmin}} +
    + +
    + {{end}} +

    +
    +
    + {{range .History}} +
    +
    + {{if .IsSucceed}} + + {{else}} + + {{end}} + {{.UUID}} +
    + + {{.DeliveredString}} + +
    +
    +
    + +
    + {{if .RequestInfo}} +
    {{$.i18n.Tr "repo.settings.webhook.headers"}}
    +
    Request URL: {{.URL}}
    +Request method: {{if .HTTPMethod}}{{.HTTPMethod}}{{else}}POST{{end}}
    +{{ range $key, $val := .RequestInfo.Headers }}{{$key}}: {{$val}}
    +{{end}}
    +
    {{$.i18n.Tr "repo.settings.webhook.payload"}}
    +
    {{.PayloadContent}}
    + {{else}} + N/A + {{end}} +
    +
    + {{if .ResponseInfo}} +
    {{$.i18n.Tr "repo.settings.webhook.headers"}}
    +
    {{ range $key, $val := .ResponseInfo.Headers }}{{$key}}: {{$val}}
    +{{end}}
    +
    {{$.i18n.Tr "repo.settings.webhook.body"}}
    +
    {{.ResponseInfo.Body}}
    + {{else}} + N/A + {{end}} +
    +
    +
    + {{end}} +
    +
    +{{end}} diff --git a/repo/settings/webhook/list.tmpl b/repo/settings/webhook/list.tmpl new file mode 100644 index 0000000..8fdae45 --- /dev/null +++ b/repo/settings/webhook/list.tmpl @@ -0,0 +1,57 @@ +{{template "base/alert" .}} +

    + {{.i18n.Tr "repo.settings.hooks"}} + +

    +
    +
    +
    + {{.Description | Str2html}} +
    + {{range .Webhooks}} +
    + {{if eq .LastStatus 1}} + + {{else if eq .LastStatus 2}} + + {{else}} + + {{end}} + {{.URL}} +
    + + +
    +
    + {{end}} +
    +
    + +{{template "repo/settings/webhook/delete_modal" .}} diff --git a/repo/settings/webhook/msteams.tmpl b/repo/settings/webhook/msteams.tmpl new file mode 100644 index 0000000..146cf53 --- /dev/null +++ b/repo/settings/webhook/msteams.tmpl @@ -0,0 +1,11 @@ +{{if eq .HookType "msteams"}} +

    {{.i18n.Tr "repo.settings.add_msteams_hook_desc" "https://teams.microsoft.com" | Str2html}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{template "repo/settings/webhook/settings" .}} +
    +{{end}} diff --git a/repo/settings/webhook/new.tmpl b/repo/settings/webhook/new.tmpl new file mode 100644 index 0000000..358827c --- /dev/null +++ b/repo/settings/webhook/new.tmpl @@ -0,0 +1,40 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}} +
    + {{if eq .HookType "gitea"}} + + {{else if eq .HookType "gogs"}} + + {{else if eq .HookType "slack"}} + + {{else if eq .HookType "discord"}} + + {{else if eq .HookType "dingtalk"}} + + {{else if eq .HookType "telegram"}} + + {{else if eq .HookType "msteams"}} + + {{end}} +
    +

    +
    + {{template "repo/settings/webhook/gitea" .}} + {{template "repo/settings/webhook/gogs" .}} + {{template "repo/settings/webhook/slack" .}} + {{template "repo/settings/webhook/discord" .}} + {{template "repo/settings/webhook/dingtalk" .}} + {{template "repo/settings/webhook/telegram" .}} + {{template "repo/settings/webhook/msteams" .}} +
    + + {{template "repo/settings/webhook/history" .}} +
    +
    +{{template "base/footer" .}} diff --git a/repo/settings/webhook/settings.tmpl b/repo/settings/webhook/settings.tmpl new file mode 100644 index 0000000..a033ac1 --- /dev/null +++ b/repo/settings/webhook/settings.tmpl @@ -0,0 +1,144 @@ +{{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminHooksNew}} +
    +

    {{.i18n.Tr "repo.settings.event_desc"}}

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    +
    +
    + + + {{.i18n.Tr "repo.settings.event_create_desc"}} +
    +
    +
    + +
    +
    +
    + + + {{.i18n.Tr "repo.settings.event_delete_desc"}} +
    +
    +
    + +
    +
    +
    + + + {{.i18n.Tr "repo.settings.event_fork_desc"}} +
    +
    +
    + +
    +
    +
    + + + {{.i18n.Tr "repo.settings.event_push_desc"}} +
    +
    +
    + +
    +
    +
    + + + {{.i18n.Tr "repo.settings.event_issues_desc"}} +
    +
    +
    + +
    +
    +
    + + + {{.i18n.Tr "repo.settings.event_issue_comment_desc"}} +
    +
    +
    + +
    +
    +
    + + + {{.i18n.Tr "repo.settings.event_pull_request_desc"}} +
    +
    +
    + +
    +
    +
    + + + {{.i18n.Tr "repo.settings.event_repository_desc"}} +
    +
    +
    + +
    +
    +
    + + + {{.i18n.Tr "repo.settings.event_release_desc"}} +
    +
    +
    +
    +
    + + +
    + + + {{.i18n.Tr "repo.settings.branch_filter_desc" | Str2html}} +
    + +
    + +
    +
    + + + {{.i18n.Tr "repo.settings.active_helper"}} +
    +
    +
    + {{if $isNew}} + + {{else}} + + {{.i18n.Tr "repo.settings.delete_webhook"}} + {{end}} +
    + +{{template "repo/settings/webhook/delete_modal" .}} diff --git a/repo/settings/webhook/slack.tmpl b/repo/settings/webhook/slack.tmpl new file mode 100644 index 0000000..d7b6eeb --- /dev/null +++ b/repo/settings/webhook/slack.tmpl @@ -0,0 +1,28 @@ +{{if eq .HookType "slack"}} +

    {{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + +
    + + +
    +
    + + +
    +
    + + +
    + {{template "repo/settings/webhook/settings" .}} +
    +{{end}} diff --git a/repo/settings/webhook/telegram.tmpl b/repo/settings/webhook/telegram.tmpl new file mode 100644 index 0000000..598ac44 --- /dev/null +++ b/repo/settings/webhook/telegram.tmpl @@ -0,0 +1,15 @@ +{{if eq .HookType "telegram"}} +

    {{.i18n.Tr "repo.settings.add_telegram_hook_desc" "https://core.telegram.org/bots" | Str2html}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + {{template "repo/settings/webhook/settings" .}} +
    +{{end}} diff --git a/repo/sub_menu.tmpl b/repo/sub_menu.tmpl new file mode 100644 index 0000000..dabaa8a --- /dev/null +++ b/repo/sub_menu.tmpl @@ -0,0 +1,14 @@ + diff --git a/repo/user_cards.tmpl b/repo/user_cards.tmpl new file mode 100644 index 0000000..3677bab --- /dev/null +++ b/repo/user_cards.tmpl @@ -0,0 +1,27 @@ +
    +

    + {{.CardsTitle}} +

    + + + {{ template "base/paginate" . }} +
    diff --git a/repo/view_file.tmpl b/repo/view_file.tmpl new file mode 100644 index 0000000..e3d346d --- /dev/null +++ b/repo/view_file.tmpl @@ -0,0 +1,101 @@ +
    +

    +
    + {{if .ReadmeInList}} + + {{.FileName}} + {{else}} +
    + {{if .NumLines}} +
    + {{.NumLines}} {{.i18n.Tr (TrN .i18n.Lang .NumLines "repo.line" "repo.lines") }} +
    + {{end}} + {{if .FileSize}} +
    + {{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}} +
    + {{end}} +
    + {{end}} +
    + {{if not .ReadmeInList}} +
    +
    +
    + {{.i18n.Tr "repo.file_raw"}} + {{if not .IsViewCommit}} + {{.i18n.Tr "repo.file_permalink"}} + {{end}} + {{if .IsTextFile}} + {{.i18n.Tr "repo.blame"}} + {{end}} + {{.i18n.Tr "repo.file_history"}} +
    + {{if .Repository.CanEnableEditor}} + {{if .CanEditFile}} + + {{else}} + + {{end}} + {{if .CanDeleteFile}} + + {{else}} + + {{end}} + {{end}} +
    +
    + {{end}} +

    +
    +
    + {{if .IsMarkup}} + {{if .FileContent}}{{.FileContent | Safe}}{{end}} + {{else if .IsRenderedHTML}} +
    {{if .FileContent}}{{.FileContent | Str2html}}{{end}}
    + {{else if not .IsTextFile}} +
    + {{if .IsImageFile}} + + {{else if .IsVideoFile}} + + {{else if .IsAudioFile}} + + {{else if .IsPDFFile}} + + {{else}} + {{.i18n.Tr "repo.file_view_raw"}} + {{end}} +
    + {{else if .FileSize}} + + + + {{if .IsFileTooLarge}} + + {{else}} + + + {{end}} + + +
    {{.i18n.Tr "repo.file_too_large"}}{{.LineNums}}
      {{.FileContent}}
    + {{end}} +
    +
    +
    + + diff --git a/repo/view_list.tmpl b/repo/view_list.tmpl new file mode 100644 index 0000000..4c96109 --- /dev/null +++ b/repo/view_list.tmpl @@ -0,0 +1,97 @@ + + + + + + + + + {{if .HasParentPath}} + + + + {{end}} + {{range $item := .Files}} + {{$entry := index $item 0}} + {{$commit := index $item 1}} + + {{if $entry.IsSubModule}} + + {{else}} + + {{end}} + + + + {{end}} + +
    + {{if .LatestCommitUser}} + + {{if .LatestCommitUser.FullName}} + {{.LatestCommitUser.FullName}} + {{else}} + {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} + {{end}} + {{else}} + {{if .LatestCommit.Author}} + + {{.LatestCommit.Author.Name}} + {{end}} + {{end}} + + {{ShortSha .LatestCommit.ID.String}} + {{if .LatestCommit.Signature}} +
    + {{if .LatestCommitVerification.Verified}} + + {{else}} + + {{end}} +
    + {{end}} +
    + {{template "repo/commit_status" .LatestCommitStatus}} + {{ $commitLink:= printf "%s/commit/%s" .RepoLink .LatestCommit.ID }} + {{RenderCommitMessageLinkSubject .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}} + {{if IsMultilineCommitMessage .LatestCommit.Message}} + + + {{end}} + +
    {{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}
    ..
    + + + {{$refURL := $commit.RefURL AppUrl $.BranchLink}} + {{if $refURL}} + {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{else}} + {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{end}} + + + + {{if $entry.IsDir}} + {{$subJumpablePathName := $entry.GetSubJumpablePathName}} + {{$subJumpablePath := SubJumpablePath $subJumpablePathName}} + + + {{if eq (len $subJumpablePath) 2}} + {{index $subJumpablePath 0}}{{index $subJumpablePath 1}} + {{else}} + {{index $subJumpablePath 0}} + {{end}} + + {{else}} + + {{$entry.Name}} + {{end}} + + + + {{$commit.Summary}} + + {{TimeSince $commit.Committer.When $.Lang}}
    +{{if .ReadmeExist}} + {{template "repo/view_file" .}} +{{end}} diff --git a/repo/watchers.tmpl b/repo/watchers.tmpl new file mode 100644 index 0000000..235ebf2 --- /dev/null +++ b/repo/watchers.tmpl @@ -0,0 +1,6 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{template "repo/user_cards" .}} +
    +{{template "base/footer" .}} diff --git a/repo/wiki/new.tmpl b/repo/wiki/new.tmpl new file mode 100644 index 0000000..bf6c242 --- /dev/null +++ b/repo/wiki/new.tmpl @@ -0,0 +1,33 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{.i18n.Tr "repo.wiki.new_page"}} + {{if .PageIsWikiEdit}} + + {{end}} +
    +
    + {{.CsrfTokenHtml}} +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/wiki/pages.tmpl b/repo/wiki/pages.tmpl new file mode 100644 index 0000000..6190342 --- /dev/null +++ b/repo/wiki/pages.tmpl @@ -0,0 +1,29 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    + {{.i18n.Tr "repo.wiki.pages"}} + {{if and .CanWriteWiki (not .IsRepositoryMirror)}} + + {{end}} +
    + + + {{range .Pages}} + + + {{$timeSince := TimeSinceUnix .UpdatedUnix $.Lang}} + + + {{end}} + +
    + + {{.Name}} + {{$.i18n.Tr "repo.wiki.last_updated" $timeSince | Safe}}
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/wiki/revision.tmpl b/repo/wiki/revision.tmpl new file mode 100644 index 0000000..c3a4f76 --- /dev/null +++ b/repo/wiki/revision.tmpl @@ -0,0 +1,114 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{ $title := .title}} +
    +
    +
    +
    + {{if not $.DisableHTTP}} + + {{end}} + {{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}} + + {{end}} + {{if not $.DisableHTTP}} + + {{else if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}} + + {{end}} + {{if or ((not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)))}} + + {{end}} +
    +
    +
    + {{.revision}} + {{$title}} +
    + {{$timeSince := TimeSince .Author.When $.Lang}} + {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}} +
    +
    +
    +

    {{.i18n.Tr "repo.wiki.wiki_page_revisions"}}

    +
    +

    +
    +
    + {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} +
    +
    +

    + + {{if and .Commits (gt .CommitCount 0)}} +
    + + + + + + + + + + + {{ $r:= List .Commits}} + {{range $r}} + + + + + + + {{end}} + +
    {{.i18n.Tr "repo.commits.author"}}SHA1{{.i18n.Tr "repo.commits.message"}}{{.i18n.Tr "repo.commits.date"}}
    + {{if .User}} + {{if .User.FullName}} +   {{.User.FullName}} + {{else}} +   {{.Author.Name}} + {{end}} + {{else}} +   {{.Author.Name}} + {{end}} + + + + + {{.Summary}} + {{if IsMultilineCommitMessage .Message}} + + + {{end}} + + {{TimeSince .Author.When $.Lang}}
    +
    + {{end}} + + {{template "base/paginate" .}} + +
    +
    +
    + + +{{template "base/footer" .}} diff --git a/repo/wiki/start.tmpl b/repo/wiki/start.tmpl new file mode 100644 index 0000000..0341e80 --- /dev/null +++ b/repo/wiki/start.tmpl @@ -0,0 +1,15 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    + +

    {{.i18n.Tr "repo.wiki.welcome"}}

    +

    {{.i18n.Tr "repo.wiki.welcome_desc"}}

    + {{if and .CanWriteWiki (not .Repository.IsMirror)}} + {{.i18n.Tr "repo.wiki.create_first_page"}} + {{end}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/repo/wiki/view.tmpl b/repo/wiki/view.tmpl new file mode 100644 index 0000000..f775ac9 --- /dev/null +++ b/repo/wiki/view.tmpl @@ -0,0 +1,113 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{ $title := .title}} +
    +
    +
    +
    + +
    +
    +
    +
    + {{if not $.DisableHTTP}} + + {{end}} + {{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}} + + {{end}} + {{if not $.DisableHTTP}} + + {{else if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}} + + {{end}} + {{if or ((not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)))}} + + {{end}} +
    +
    +
    +
    +
    +
    + {{.CommitCount}} + {{$title}} +
    + {{$timeSince := TimeSince .Author.When $.Lang}} + {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}} +
    +
    + +
    +
    + {{if .FormatWarning}} +
    +

    {{.FormatWarning}}

    +
    + {{end}} +
    +
    + {{.content | Str2html}} +
    + {{if .sidebarPresent}} +
    +
    + {{.sidebarContent | Str2html}} +
    +
    + {{end}} +
    + {{if .footerPresent}} +
    + {{.footerContent | Str2html}} +
    + {{end}} +
    +
    + + + +{{template "base/footer" .}} diff --git a/status/404.tmpl b/status/404.tmpl new file mode 100644 index 0000000..8e6a013 --- /dev/null +++ b/status/404.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +{{if .IsRepo}}
    {{template "repo/header" .}}
    {{end}} +
    +

    404

    +
    +
    + {{if .ShowFooterVersion}}

    Application Version: {{AppVer}}

    {{end}} +
    +{{template "base/footer" .}} diff --git a/status/500.tmpl b/status/500.tmpl new file mode 100644 index 0000000..2e01e8a --- /dev/null +++ b/status/500.tmpl @@ -0,0 +1,11 @@ +{{template "base/head" .}} +
    +

    500

    +
    +
    + {{if .ErrorMsg}}

    An error has occurred :

    +
    {{.ErrorMsg}}
    {{end}} + {{if .ShowFooterVersion}}

    Application Version: {{AppVer}}

    {{end}} + {{if .IsAdmin}}

    If you are sure this is Gitea bug, please search for issue on GitHub and open new issue if necessary.

    {{end}} +
    +{{template "base/footer" .}} diff --git a/swagger/ui.tmpl b/swagger/ui.tmpl new file mode 100644 index 0000000..20d4f7f --- /dev/null +++ b/swagger/ui.tmpl @@ -0,0 +1,105 @@ + + + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + diff --git a/swagger/v1_json.tmpl b/swagger/v1_json.tmpl new file mode 100644 index 0000000..561a67e --- /dev/null +++ b/swagger/v1_json.tmpl @@ -0,0 +1,11030 @@ +{ + "consumes": [ + "application/json", + "text/plain" + ], + "produces": [ + "application/json", + "text/html" + ], + "schemes": [ + "http", + "https" + ], + "swagger": "2.0", + "info": { + "description": "This documentation describes the Gitea API.", + "title": "Gitea API.", + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/MIT" + }, + "version": "1.1.1" + }, + "basePath": "{{AppSubUrl}}/api/v1", + "paths": { + "/admin/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List all organizations", + "operationId": "adminGetAllOrgs", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results, maximum page size is 50", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/users": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List all users", + "operationId": "adminGetAllUsers", + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Create a user", + "operationId": "adminCreateUser", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateUserOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/User" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Delete a user", + "operationId": "adminDeleteUser", + "parameters": [ + { + "type": "string", + "description": "username of user to delete", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Edit an existing user", + "operationId": "adminEditUser", + "parameters": [ + { + "type": "string", + "description": "username of user to edit", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditUserOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/keys": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Add a public key on behalf of a user", + "operationId": "adminCreatePublicKey", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "key", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PublicKey" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/keys/{id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Delete a user's public key", + "operationId": "adminDeleteUserPublicKey", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/users/{username}/orgs": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Create an organization", + "operationId": "adminCreateOrg", + "parameters": [ + { + "type": "string", + "description": "username of the user that will own the created organization", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "organization", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrgOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Organization" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/repos": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Create a repository on behalf a user", + "operationId": "adminCreateRepo", + "parameters": [ + { + "type": "string", + "description": "username of the user. This user will own the created repository", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "repository", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/markdown": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "text/html" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Render a markdown document as HTML", + "operationId": "renderMarkdown", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MarkdownOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MarkdownRender" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/markdown/raw": { + "post": { + "consumes": [ + "text/plain" + ], + "produces": [ + "text/html" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Render raw markdown as HTML", + "operationId": "renderMarkdownRaw", + "parameters": [ + { + "description": "Request body to render", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MarkdownRender" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/org/{org}/repos": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a repository in an organization", + "operationId": "createOrgRepo", + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create an organization", + "operationId": "orgCreate", + "parameters": [ + { + "name": "organization", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrgOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Organization" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get an organization", + "operationId": "orgGet", + "parameters": [ + { + "type": "string", + "description": "name of the organization to get", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Organization" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete an organization", + "operationId": "orgDelete", + "parameters": [ + { + "type": "string", + "description": "organization that is to be deleted", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Edit an organization", + "operationId": "orgEdit", + "parameters": [ + { + "type": "string", + "description": "name of the organization to edit", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/EditOrgOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Organization" + } + } + } + }, + "/orgs/{org}/hooks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's webhooks", + "operationId": "orgListHooks", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + } + } + } + }, + "/orgs/{org}/hooks/": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a hook", + "operationId": "orgCreateHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/orgs/{org}/hooks/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get a hook", + "operationId": "orgGetHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete a hook", + "operationId": "orgDeleteHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Update a hook", + "operationId": "orgEditHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to update", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/orgs/{org}/members": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's members", + "operationId": "orgListMembers", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/orgs/{org}/members/{username}": { + "get": { + "tags": [ + "organization" + ], + "summary": "Check if a user is a member of an organization", + "operationId": "orgIsMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "user is a member" + }, + "404": { + "description": "user is not a member" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Remove a member from an organization", + "operationId": "orgDeleteMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "member removed" + } + } + } + }, + "/orgs/{org}/public_members": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's public members", + "operationId": "orgListPublicMembers", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/orgs/{org}/public_members/{username}": { + "get": { + "tags": [ + "organization" + ], + "summary": "Check if a user is a public member of an organization", + "operationId": "orgIsPublicMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "user is a public member" + }, + "404": { + "description": "user is not a public member" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Publicize a user's membership", + "operationId": "orgPublicizeMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "membership publicized" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Conceal a user's membership", + "operationId": "orgConcealMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/orgs/{org}/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's repos", + "operationId": "orgListRepos", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + } + }, + "/orgs/{org}/teams": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's teams", + "operationId": "orgListTeams", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a team", + "operationId": "orgCreateTeam", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTeamOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Team" + } + } + } + }, + "/orgs/{org}/teams/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Search for teams within an organization", + "operationId": "teamSearch", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "keywords to search", + "name": "q", + "in": "query" + }, + { + "type": "boolean", + "description": "include search within team description (defaults to true)", + "name": "include_desc", + "in": "query" + }, + { + "type": "integer", + "description": "limit size of results", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "SearchResults of a successful search", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + } + }, + "ok": { + "type": "boolean" + } + } + } + } + } + } + }, + "/repos/migrate": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Migrate a remote git repository", + "operationId": "repoMigrate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MigrateRepoForm" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + } + } + } + }, + "/repos/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Search for repositories", + "operationId": "repoSearch", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "boolean", + "description": "Limit search to repositories with keyword as topic", + "name": "topic", + "in": "query" + }, + { + "type": "boolean", + "description": "include search of keyword within repository description", + "name": "includeDesc", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "search only for repos that the user with the given id owns or contributes to", + "name": "uid", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "search only for repos that the user with the given id has starred", + "name": "starredBy", + "in": "query" + }, + { + "type": "boolean", + "description": "include private repositories this user has access to (defaults to true)", + "name": "private", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results, maximum page size is 50", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"", + "name": "mode", + "in": "query" + }, + { + "type": "boolean", + "description": "if `uid` is given, search only for repos that the user owns", + "name": "exclusive", + "in": "query" + }, + { + "type": "string", + "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"", + "name": "sort", + "in": "query" + }, + { + "type": "string", + "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.", + "name": "order", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SearchResults" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository", + "operationId": "repoGet", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repository", + "operationId": "repoDelete", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to delete", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to delete", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a repository's properties. Only fields that are set will be changed.", + "operationId": "repoEdit", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to edit", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to edit", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "Properties of a repo that you can edit", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditRepoOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/archive/{archive}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get an archive of a repository", + "operationId": "repoGetArchive", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "archive to download, consisting of a git reference and archive", + "name": "archive", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "success" + } + } + } + }, + "/repos/{owner}/{repo}/branches": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's branches", + "operationId": "repoListBranches", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchList" + } + } + } + }, + "/repos/{owner}/{repo}/branches/{branch}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Retrieve a specific branch from a repository", + "operationId": "repoGetBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "branch to get", + "name": "branch", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Branch" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's collaborators", + "operationId": "repoListCollaborators", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators/{collaborator}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a user is a collaborator of a repository", + "operationId": "repoCheckCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/empty" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a collaborator to a repository", + "operationId": "repoAddCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator to add", + "name": "collaborator", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddCollaboratorOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a collaborator from a repository", + "operationId": "repoDeleteCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator to delete", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/commits": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a list of all commits from a repository", + "operationId": "repoGetAllCommits", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "SHA or branch to start listing commits from (usually 'master')", + "name": "sha", + "in": "query" + }, + { + "type": "integer", + "description": "page number of requested commits", + "name": "page", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/EmptyRepository" + } + } + } + }, + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's combined status, by branch/tag/commit reference", + "operationId": "repoGetCombinedStatusByRef", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results", + "name": "page", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Status" + } + } + } + }, + "/repos/{owner}/{repo}/contents": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the metadata of all the entries of the root dir", + "operationId": "repoGetContentsList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + } + } + } + }, + "/repos/{owner}/{repo}/contents/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir", + "operationId": "repoGetContents", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the dir, file, symlink or submodule in the repo", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsResponse" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a file in a repository", + "operationId": "repoUpdateFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to update", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileResponse" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a file in a repository", + "operationId": "repoCreateFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to create", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFileOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/FileResponse" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to delete", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileDeleteResponse" + } + } + } + }, + "/repos/{owner}/{repo}/editorconfig/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the EditorConfig definitions of a file in a repository", + "operationId": "repoGetEditorConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of file to get", + "name": "filepath", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "success" + } + } + } + }, + "/repos/{owner}/{repo}/forks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's forks", + "operationId": "listForks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Fork a repository", + "operationId": "createFork", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to fork", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to fork", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateForkOption" + } + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + } + } + } + }, + "/repos/{owner}/{repo}/git/blobs/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the blob of a repository.", + "operationId": "GetBlob", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlobResponse" + } + } + } + }, + "/repos/{owner}/{repo}/git/commits/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a single commit from a repository", + "operationId": "repoGetSingleCommit", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the commit hash", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Commit" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/refs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListAllGitRefs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/refs/{ref}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListGitRefs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "part or full name of the ref", + "name": "ref", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/tags/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the tag object of an annotated tag (not lightweight tags)", + "operationId": "GetTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AnnotatedTag" + } + } + } + }, + "/repos/{owner}/{repo}/git/trees/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the tree of a repository.", + "operationId": "GetTree", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "show all directories and files", + "name": "recursive", + "in": "query" + }, + { + "type": "integer", + "description": "page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE", + "name": "per_page", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitTreeResponse" + } + } + } + }, + "/repos/{owner}/{repo}/hooks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List the hooks in a repository", + "operationId": "repoListHooks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a hook", + "operationId": "repoCreateHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/git": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List the Git hooks in a repository", + "operationId": "repoListGitHooks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHookList" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/git/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a Git hook", + "operationId": "repoGetGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a Git hook in a repository", + "operationId": "repoDeleteGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a Git hook in a repository", + "operationId": "repoEditGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditGitHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a hook", + "operationId": "repoGetHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a hook in a repository", + "operationId": "repoDeleteHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a hook in a repository", + "operationId": "repoEditHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the hook", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/{id}/tests": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Test a push webhook", + "operationId": "repoTestHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to test", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/issues": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List a repository's issues", + "operationId": "issueListIssues", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "whether issue is open or closed", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded", + "name": "labels", + "in": "query" + }, + { + "type": "integer", + "description": "page number of requested issues", + "name": "page", + "in": "query" + }, + { + "type": "string", + "description": "search string", + "name": "q", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueCreateIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "since", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment", + "operationId": "issueEditComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{id}/times": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List an issue's tracked times", + "operationId": "issueTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a tracked time to a issue", + "operationId": "issueAddTime", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to add tracked time to", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddTimeOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue", + "operationId": "issueGetIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to get", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueEditIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to edit", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/comments": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List all comments on an issue", + "operationId": "issueGetComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueCommentOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Comment" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/comments/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteCommentDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment", + "operationId": "issueEditCommentDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/deadline": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueEditIssueDeadline", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to create or update a deadline on", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditDeadlineOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" + }, + "403": { + "description": "Not repo writer" + }, + "404": { + "description": "Issue not found" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove all labels from an issue", + "operationId": "issueClearLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/labels/{id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a label from an issue", + "operationId": "issueRemoveLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to remove", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "description": "Issue not found" + }, + "409": { + "description": "Cannot start a stopwatch again if it already exists" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Stop an issue's existing stopwatch.", + "operationId": "issueStopWatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "description": "Issue not found" + }, + "409": { + "description": "Cannot stop a non existent stopwatch" + } + } + } + }, + "/repos/{owner}/{repo}/keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's keys", + "operationId": "repoListKeys", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "the key_id to search for", + "name": "key_id", + "in": "query" + }, + { + "type": "string", + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKeyList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a key to a repository", + "operationId": "repoCreateKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/DeployKey" + } + } + } + }, + "/repos/{owner}/{repo}/keys/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's key by id", + "operationId": "repoGetKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a key from a repository", + "operationId": "repoDeleteKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a label", + "operationId": "issueCreateLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Label" + } + } + } + }, + "/repos/{owner}/{repo}/labels/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a single label", + "operationId": "issueGetLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a label", + "operationId": "issueDeleteLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a label", + "operationId": "issueEditLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + } + } + } + }, + "/repos/{owner}/{repo}/milestones": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's opened milestones", + "operationId": "issueGetMilestonesList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"", + "name": "state", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateMilestoneOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Milestone" + } + } + } + }, + "/repos/{owner}/{repo}/milestones/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the milestone", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the milestone to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a milestone", + "operationId": "issueEditMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the milestone", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + } + } + } + }, + "/repos/{owner}/{repo}/mirror-sync": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to sync", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to sync", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/pulls": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pull requests", + "operationId": "repoListPullRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Page number", + "name": "page", + "in": "query" + }, + { + "enum": [ + "closed", + "open", + "all" + ], + "type": "string", + "description": "State of pull request: open or closed (optional)", + "name": "state", + "in": "query" + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "mostcomment", + "leastcomment", + "priority" + ], + "type": "string", + "description": "Type of sort", + "name": "sort", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "ID of the milestone", + "name": "milestone", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "collectionFormat": "multi", + "description": "Label IDs", + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a pull request", + "operationId": "repoCreatePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreatePullRequestOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullRequest" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request", + "operationId": "repoGetPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a pull request", + "operationId": "repoEditPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to edit", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditPullRequestOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullRequest" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/merge": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a pull request has been merged", + "operationId": "repoPullRequestIsMerged", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "pull request has been merged" + }, + "404": { + "description": "pull request has not been merged" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergePullRequestOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "405": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/raw/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a file from a repository", + "operationId": "repoGetRawFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of the file to get", + "name": "filepath", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "success" + } + } + } + }, + "/repos/{owner}/{repo}/releases": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's releases", + "operationId": "repoListReleases", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page wants to load", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "items count every page wants to load", + "name": "per_page", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReleaseList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a release", + "operationId": "repoCreateRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Release" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release", + "operationId": "repoGetRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a release", + "operationId": "repoDeleteRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a release", + "operationId": "repoEditRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReleaseOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}/assets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List release's attachments", + "operationId": "repoListReleaseAttachments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + } + } + }, + "post": { + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a release attachment", + "operationId": "repoCreateReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the attachment", + "name": "name", + "in": "query" + }, + { + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release attachment", + "operationId": "repoGetReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a release attachment", + "operationId": "repoDeleteReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + } + } + } + }, + "/repos/{owner}/{repo}/stargazers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's stargazers", + "operationId": "repoListStargazers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/repos/{owner}/{repo}/statuses/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results", + "name": "page", + "in": "query" + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query" + }, + { + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state", + "name": "state", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/StatusList" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a commit status", + "operationId": "repoCreateStatus", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateStatusOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Status" + } + } + } + }, + "/repos/{owner}/{repo}/subscribers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/repos/{owner}/{repo}/subscription": { + "get": { + "tags": [ + "repository" + ], + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + } + } + }, + "put": { + "tags": [ + "repository" + ], + "summary": "Watch a repo", + "operationId": "userCurrentPutSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/tags": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's tags", + "operationId": "repoListTags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagList" + } + } + } + }, + "/repos/{owner}/{repo}/times": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's tracked times", + "operationId": "repoTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + } + } + } + }, + "/repos/{owner}/{repo}/times/{user}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List a user's tracked times in a repo", + "operationId": "userTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of user", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + } + } + } + }, + "/repos/{owner}/{repo}/topics": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get list of topics that a repository has", + "operationId": "repoListTopics", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TopicNames" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Replace list of topics for a repository", + "operationId": "repoUpdateTopics", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/topics/{topic}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a topic to a repository", + "operationId": "repoAddTopíc", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the topic to add", + "name": "topic", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a topic from a repository", + "operationId": "repoDeleteTopic", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the topic to delete", + "name": "topic", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repositories/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository by id", + "operationId": "repoGetByID", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the repo to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + } + } + } + }, + "/teams/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get a team", + "operationId": "orgGetTeam", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Delete a team", + "operationId": "orgDeleteTeam", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "team deleted" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Edit a team", + "operationId": "orgEditTeam", + "parameters": [ + { + "type": "integer", + "description": "id of the team to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTeamOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + } + } + } + }, + "/teams/{id}/members": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a team's members", + "operationId": "orgListTeamMembers", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/teams/{id}/members/{username}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a particular member of team", + "operationId": "orgListTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the member to list", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Add a team member", + "operationId": "orgAddTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to add", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Remove a team member", + "operationId": "orgRemoveTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to remove", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/teams/{id}/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a team's repos", + "operationId": "orgListTeamRepos", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + } + }, + "/teams/{id}/repos/{org}/{repo}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Add a repository to a team", + "operationId": "orgAddTeamRepository", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to add", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to add", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "description": "This does not delete the repository, it only removes the repository from the team.", + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Remove a repository from a team", + "operationId": "orgRemoveTeamRepository", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to remove", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to remove", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/topics/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "search topics via keyword", + "operationId": "topicSearch", + "parameters": [ + { + "type": "string", + "description": "keywords to search", + "name": "q", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TopicListResponse" + } + } + } + }, + "/user": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get the authenticated user", + "operationId": "userGetCurrent", + "responses": { + "200": { + "$ref": "#/responses/User" + } + } + } + }, + "/user/emails": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's email addresses", + "operationId": "userListEmails", + "responses": { + "200": { + "$ref": "#/responses/EmailList" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Add email addresses", + "operationId": "userAddEmail", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateEmailOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/EmailList" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete email addresses", + "operationId": "userDeleteEmail", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DeleteEmailOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/user/followers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's followers", + "operationId": "userCurrentListFollowers", + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/user/following": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the users that the authenticated user is following", + "operationId": "userCurrentListFollowing", + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/user/following/{username}": { + "get": { + "tags": [ + "user" + ], + "summary": "Check whether a user is followed by the authenticated user", + "operationId": "userCurrentCheckFollowing", + "parameters": [ + { + "type": "string", + "description": "username of followed user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "tags": [ + "user" + ], + "summary": "Follow a user", + "operationId": "userCurrentPutFollow", + "parameters": [ + { + "type": "string", + "description": "username of user to follow", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "tags": [ + "user" + ], + "summary": "Unfollow a user", + "operationId": "userCurrentDeleteFollow", + "parameters": [ + { + "type": "string", + "description": "username of user to unfollow", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/user/gpg_keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's GPG keys", + "operationId": "userCurrentListGPGKeys", + "responses": { + "200": { + "$ref": "#/responses/GPGKeyList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create a GPG key", + "operationId": "userCurrentPostGPGKey", + "parameters": [ + { + "name": "Form", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateGPGKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/GPGKey" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/gpg_keys/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a GPG key", + "operationId": "userCurrentGetGPGKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GPGKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Remove a GPG key", + "operationId": "userCurrentDeleteGPGKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's public keys", + "operationId": "userCurrentListKeys", + "parameters": [ + { + "type": "string", + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PublicKeyList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create a public key", + "operationId": "userCurrentPostKey", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PublicKey" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/keys/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a public key", + "operationId": "userCurrentGetKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PublicKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete a public key", + "operationId": "userCurrentDeleteKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List the current user's organizations", + "operationId": "orgListCurrentUserOrgs", + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + } + } + } + }, + "/user/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the repos that the authenticated user owns or has access to", + "operationId": "userCurrentListRepos", + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository", + "user" + ], + "summary": "Create a repository", + "operationId": "createCurrentUserRepo", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/starred": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "The repos that the authenticated user has starred", + "operationId": "userCurrentListStarred", + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + } + }, + "/user/starred/{owner}/{repo}": { + "get": { + "tags": [ + "user" + ], + "summary": "Whether the authenticated is starring the repo", + "operationId": "userCurrentCheckStarring", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "tags": [ + "user" + ], + "summary": "Star the given repo", + "operationId": "userCurrentPutStar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to star", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to star", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "tags": [ + "user" + ], + "summary": "Unstar the given repo", + "operationId": "userCurrentDeleteStar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to unstar", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to unstar", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/user/subscriptions": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List repositories watched by the authenticated user", + "operationId": "userCurrentListSubscriptions", + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + } + }, + "/user/teams": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List all the teams a user belongs to", + "operationId": "userListTeams", + "responses": { + "200": { + "$ref": "#/responses/TeamList" + } + } + } + }, + "/user/times": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the current user's tracked times", + "operationId": "userCurrentTrackedTimes", + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + } + } + } + }, + "/users/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Search for users", + "operationId": "userSearch", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "ID of the user to search for", + "name": "uid", + "in": "query" + }, + { + "type": "integer", + "description": "maximum number of users to return", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "SearchResults of a successful search", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + } + }, + "ok": { + "type": "boolean" + } + } + } + } + } + } + }, + "/users/{follower}/following/{followee}": { + "get": { + "tags": [ + "user" + ], + "summary": "Check if one user is following another user", + "operationId": "userCheckFollowing", + "parameters": [ + { + "type": "string", + "description": "username of following user", + "name": "follower", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of followed user", + "name": "followee", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a user", + "operationId": "userGet", + "parameters": [ + { + "type": "string", + "description": "username of user to get", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/followers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the given user's followers", + "operationId": "userListFollowers", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/users/{username}/following": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the users that the given user is following", + "operationId": "userListFollowing", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/users/{username}/gpg_keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the given user's GPG keys", + "operationId": "userListGPGKeys", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GPGKeyList" + } + } + } + }, + "/users/{username}/heatmap": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a user's heatmap", + "operationId": "userGetHeatmapData", + "parameters": [ + { + "type": "string", + "description": "username of user to get", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserHeatmapData" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the given user's public keys", + "operationId": "userListKeys", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PublicKeyList" + } + } + } + }, + "/users/{username}/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a user's organizations", + "operationId": "orgListUserOrgs", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + } + } + } + }, + "/users/{username}/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the repos owned by the given user", + "operationId": "userListRepos", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + } + }, + "/users/{username}/starred": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "The repos that the given user has starred", + "operationId": "userListStarred", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + } + }, + "/users/{username}/subscriptions": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the repositories watched by a user", + "operationId": "userListSubscriptions", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + } + }, + "/users/{username}/tokens": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's access tokens", + "operationId": "userGetTokens", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AccessTokenList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create an access token", + "operationId": "userCreateToken", + "parameters": [ + { + "type": "string", + "x-go-name": "Name", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "accessToken", + "in": "body", + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/AccessToken" + } + } + } + }, + "/users/{username}/tokens/{token}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "delete an access token", + "operationId": "userDeleteAccessToken", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "token to be deleted", + "name": "token", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/version": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns the version of the Gitea application", + "operationId": "getVersion", + "responses": { + "200": { + "$ref": "#/responses/ServerVersion" + } + } + } + } + }, + "definitions": { + "APIError": { + "description": "APIError is an api error with a message", + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AccessToken": { + "type": "object", + "title": "AccessToken represents an API access token.", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "sha1": { + "type": "string", + "x-go-name": "Token" + }, + "token_last_eight": { + "type": "string", + "x-go-name": "TokenLastEight" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AddCollaboratorOption": { + "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository", + "type": "object", + "properties": { + "permission": { + "type": "string", + "x-go-name": "Permission" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AddTimeOption": { + "description": "AddTimeOption options for adding time to an issue", + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "description": "time in seconds", + "type": "integer", + "format": "int64", + "x-go-name": "Time" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AnnotatedTag": { + "description": "AnnotatedTag represents an annotated tag", + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "object": { + "$ref": "#/definitions/AnnotatedTagObject" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "tag": { + "type": "string", + "x-go-name": "Tag" + }, + "tagger": { + "$ref": "#/definitions/CommitUser" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AnnotatedTagObject": { + "description": "AnnotatedTagObject contains meta information of the tag object", + "type": "object", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Attachment": { + "description": "Attachment a generic attachment", + "type": "object", + "properties": { + "browser_download_url": { + "type": "string", + "x-go-name": "DownloadURL" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "download_count": { + "type": "integer", + "format": "int64", + "x-go-name": "DownloadCount" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "uuid": { + "type": "string", + "x-go-name": "UUID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Branch": { + "description": "Branch represents a repository branch", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/PayloadCommit" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Comment": { + "description": "Comment represents a comment on a commit or issue", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue_url": { + "type": "string", + "x-go-name": "IssueURL" + }, + "original_author": { + "type": "string", + "x-go-name": "OriginalAuthor" + }, + "original_author_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OriginalAuthorID" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "PRURL" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Commit": { + "type": "object", + "title": "Commit contains information generated from a Git commit.", + "properties": { + "author": { + "$ref": "#/definitions/User" + }, + "commit": { + "$ref": "#/definitions/RepoCommit" + }, + "committer": { + "$ref": "#/definitions/User" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitMeta" + }, + "x-go-name": "Parents" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitMeta": { + "type": "object", + "title": "CommitMeta contains meta information of a commit in terms of API.", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitUser": { + "type": "object", + "title": "CommitUser contains information of a user in the context of a commit.", + "properties": { + "date": { + "type": "string", + "x-go-name": "Date" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ContentsResponse": { + "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content", + "type": "object", + "properties": { + "_links": { + "$ref": "#/definitions/FileLinksResponse" + }, + "content": { + "description": "`content` is populated when `type` is `file`, otherwise null", + "type": "string", + "x-go-name": "Content" + }, + "download_url": { + "type": "string", + "x-go-name": "DownloadURL" + }, + "encoding": { + "description": "`encoding` is populated when `type` is `file`, otherwise null", + "type": "string", + "x-go-name": "Encoding" + }, + "git_url": { + "type": "string", + "x-go-name": "GitURL" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "submodule_git_url": { + "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null", + "type": "string", + "x-go-name": "SubmoduleGitURL" + }, + "target": { + "description": "`target` is populated when `type` is `symlink`, otherwise null", + "type": "string", + "x-go-name": "Target" + }, + "type": { + "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`", + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateEmailOption": { + "description": "CreateEmailOption options when creating email addresses", + "type": "object", + "properties": { + "emails": { + "description": "email addresses to add", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Emails" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateFileOptions": { + "description": "CreateFileOptions options for creating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "content" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "content": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "Content" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateForkOption": { + "description": "CreateForkOption options for creating a fork", + "type": "object", + "properties": { + "organization": { + "description": "organization name, if forking into an organization", + "type": "string", + "x-go-name": "Organization" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateGPGKeyOption": { + "description": "CreateGPGKeyOption options create user GPG key", + "type": "object", + "required": [ + "armored_public_key" + ], + "properties": { + "armored_public_key": { + "description": "An armored GPG key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "ArmoredKey" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateHookOption": { + "description": "CreateHookOption options when create a hook", + "type": "object", + "required": [ + "type", + "config" + ], + "properties": { + "active": { + "type": "boolean", + "default": false, + "x-go-name": "Active" + }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + }, + "type": { + "type": "string", + "enum": [ + "gitea", + "gogs", + "slack", + "discord" + ], + "x-go-name": "Type" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateIssueCommentOption": { + "description": "CreateIssueCommentOption options for creating a comment on an issue", + "type": "object", + "required": [ + "body" + ], + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateIssueOption": { + "description": "CreateIssueOption options to create one issue", + "type": "object", + "required": [ + "title" + ], + "properties": { + "assignee": { + "description": "username of assignee", + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "closed": { + "type": "boolean", + "x-go-name": "Closed" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "labels": { + "description": "list of label ids", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "description": "milestone id", + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateKeyOption": { + "description": "CreateKeyOption options when creating a key", + "type": "object", + "required": [ + "title", + "key" + ], + "properties": { + "key": { + "description": "An armored SSH key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "Key" + }, + "read_only": { + "description": "Describe if the key has only read access or read/write", + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "title": { + "description": "Title of the key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateLabelOption": { + "description": "CreateLabelOption options for creating a label", + "type": "object", + "required": [ + "name", + "color" + ], + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "#00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateMilestoneOption": { + "description": "CreateMilestoneOption options for creating a milestone", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateOrgOption": { + "description": "CreateOrgOption options for creating an organization", + "type": "object", + "required": [ + "username" + ], + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + }, + "visibility": { + "description": "possible values are `public` (default), `limited` or `private`", + "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreatePullRequestOption": { + "description": "CreatePullRequestOption options when creating a pull request", + "type": "object", + "properties": { + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "base": { + "type": "string", + "x-go-name": "Base" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "head": { + "type": "string", + "x-go-name": "Head" + }, + "labels": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateReleaseOption": { + "description": "CreateReleaseOption options when creating a release", + "type": "object", + "required": [ + "tag_name" + ], + "properties": { + "body": { + "type": "string", + "x-go-name": "Note" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateRepoOption": { + "description": "CreateRepoOption options when creating repository", + "type": "object", + "required": [ + "name" + ], + "properties": { + "auto_init": { + "description": "Whether the repository should be auto-intialized?", + "type": "boolean", + "x-go-name": "AutoInit" + }, + "description": { + "description": "Description of the repository to create", + "type": "string", + "x-go-name": "Description" + }, + "gitignores": { + "description": "Gitignores to use", + "type": "string", + "x-go-name": "Gitignores" + }, + "issue_labels": { + "description": "Issue Label set to use", + "type": "string", + "x-go-name": "IssueLabels" + }, + "license": { + "description": "License to use", + "type": "string", + "x-go-name": "License" + }, + "name": { + "description": "Name of the repository to create", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "private": { + "description": "Whether the repository is private", + "type": "boolean", + "x-go-name": "Private" + }, + "readme": { + "description": "Readme of the repository to create", + "type": "string", + "x-go-name": "Readme" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateStatusOption": { + "description": "CreateStatusOption holds the information needed to create a new Status for a Commit", + "type": "object", + "properties": { + "context": { + "type": "string", + "x-go-name": "Context" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "state": { + "$ref": "#/definitions/StatusState" + }, + "target_url": { + "type": "string", + "x-go-name": "TargetURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateTeamOption": { + "description": "CreateTeamOption options for creating a team", + "type": "object", + "required": [ + "name" + ], + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "permission": { + "type": "string", + "enum": [ + "read", + "write", + "admin" + ], + "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.ext_wiki" + ] + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateUserOption": { + "description": "CreateUserOption create user options", + "type": "object", + "required": [ + "username", + "email", + "password" + ], + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "login_name": { + "type": "string", + "x-go-name": "LoginName" + }, + "must_change_password": { + "type": "boolean", + "x-go-name": "MustChangePassword" + }, + "password": { + "type": "string", + "x-go-name": "Password" + }, + "send_notify": { + "type": "boolean", + "x-go-name": "SendNotify" + }, + "source_id": { + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, + "username": { + "type": "string", + "x-go-name": "Username" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DeleteEmailOption": { + "description": "DeleteEmailOption options when deleting email addresses", + "type": "object", + "properties": { + "emails": { + "description": "email addresses to delete", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Emails" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DeleteFileOptions": { + "description": "DeleteFileOptions options for deleting files (used for other File structs below)\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "sha" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "sha": { + "description": "sha is the SHA for the file that already exists", + "type": "string", + "x-go-name": "SHA" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DeployKey": { + "description": "DeployKey a deploy key", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "fingerprint": { + "type": "string", + "x-go-name": "Fingerprint" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "key": { + "type": "string", + "x-go-name": "Key" + }, + "key_id": { + "type": "integer", + "format": "int64", + "x-go-name": "KeyID" + }, + "read_only": { + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditAttachmentOptions": { + "description": "EditAttachmentOptions options for editing attachments", + "type": "object", + "properties": { + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditDeadlineOption": { + "description": "EditDeadlineOption options for creating a deadline", + "type": "object", + "required": [ + "due_date" + ], + "properties": { + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditGitHookOption": { + "description": "EditGitHookOption options when modifying one Git hook", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditHookOption": { + "description": "EditHookOption options when modify one hook", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditIssueCommentOption": { + "description": "EditIssueCommentOption options for editing a comment", + "type": "object", + "required": [ + "body" + ], + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditIssueOption": { + "description": "EditIssueOption options for editing an issue", + "type": "object", + "properties": { + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "state": { + "type": "string", + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditLabelOption": { + "description": "EditLabelOption options for editing a label", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditMilestoneOption": { + "description": "EditMilestoneOption options for editing a milestone", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "state": { + "type": "string", + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditOrgOption": { + "description": "EditOrgOption options for editing an organization", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "visibility": { + "description": "possible values are `public`, `limited` or `private`", + "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditPullRequestOption": { + "description": "EditPullRequestOption options when modify pull request", + "type": "object", + "properties": { + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "labels": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "state": { + "type": "string", + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditReleaseOption": { + "description": "EditReleaseOption options when editing a release", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Note" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditRepoOption": { + "description": "EditRepoOption options when editing a repository's properties", + "type": "object", + "properties": { + "allow_merge_commits": { + "description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_explicit": { + "description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_squash_merge": { + "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "archived": { + "description": "set to `true` to archive this repository.", + "type": "boolean", + "x-go-name": "Archived" + }, + "default_branch": { + "description": "sets the default branch for this repository.", + "type": "string", + "x-go-name": "DefaultBranch" + }, + "description": { + "description": "a short description of the repository.", + "type": "string", + "x-go-name": "Description" + }, + "external_tracker": { + "$ref": "#/definitions/ExternalTracker" + }, + "external_wiki": { + "$ref": "#/definitions/ExternalWiki" + }, + "has_issues": { + "description": "either `true` to enable issues for this repository or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasIssues" + }, + "has_pull_requests": { + "description": "either `true` to allow pull requests, or `false` to prevent pull request.", + "type": "boolean", + "x-go-name": "HasPullRequests" + }, + "has_wiki": { + "description": "either `true` to enable the wiki for this repository or `false` to disable it.", + "type": "boolean", + "x-go-name": "HasWiki" + }, + "ignore_whitespace_conflicts": { + "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "IgnoreWhitespaceConflicts" + }, + "internal_tracker": { + "$ref": "#/definitions/InternalTracker" + }, + "name": { + "description": "name of the repository", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "private": { + "description": "either `true` to make the repository private or `false` to make it public.\nNote: you will get a 422 error if the organization restricts changing repository visibility to organization\nowners and a non-owner tries to change the value of private.", + "type": "boolean", + "x-go-name": "Private" + }, + "website": { + "description": "a URL with more information about the repository.", + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditTeamOption": { + "description": "EditTeamOption options for editing a team", + "type": "object", + "required": [ + "name" + ], + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "permission": { + "type": "string", + "enum": [ + "read", + "write", + "admin" + ], + "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.ext_wiki" + ] + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditUserOption": { + "description": "EditUserOption edit user options", + "type": "object", + "required": [ + "email" + ], + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "admin": { + "type": "boolean", + "x-go-name": "Admin" + }, + "allow_create_organization": { + "type": "boolean", + "x-go-name": "AllowCreateOrganization" + }, + "allow_git_hook": { + "type": "boolean", + "x-go-name": "AllowGitHook" + }, + "allow_import_local": { + "type": "boolean", + "x-go-name": "AllowImportLocal" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "login_name": { + "type": "string", + "x-go-name": "LoginName" + }, + "max_repo_creation": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxRepoCreation" + }, + "must_change_password": { + "type": "boolean", + "x-go-name": "MustChangePassword" + }, + "password": { + "type": "string", + "x-go-name": "Password" + }, + "prohibit_login": { + "type": "boolean", + "x-go-name": "ProhibitLogin" + }, + "source_id": { + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Email": { + "description": "Email an email address belonging to a user", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "primary": { + "type": "boolean", + "x-go-name": "Primary" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ExternalTracker": { + "description": "ExternalTracker represents settings for external tracker", + "type": "object", + "properties": { + "external_tracker_format": { + "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.", + "type": "string", + "x-go-name": "ExternalTrackerFormat" + }, + "external_tracker_style": { + "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`", + "type": "string", + "x-go-name": "ExternalTrackerStyle" + }, + "external_tracker_url": { + "description": "URL of external issue tracker.", + "type": "string", + "x-go-name": "ExternalTrackerURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ExternalWiki": { + "description": "ExternalWiki represents setting for external wiki", + "type": "object", + "properties": { + "external_wiki_url": { + "description": "URL of external wiki.", + "type": "string", + "x-go-name": "ExternalWikiURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileCommitResponse": { + "type": "object", + "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "committer": { + "$ref": "#/definitions/CommitUser" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitMeta" + }, + "x-go-name": "Parents" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "tree": { + "$ref": "#/definitions/CommitMeta" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileDeleteResponse": { + "description": "FileDeleteResponse contains information about a repo's file that was deleted", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "content": { + "type": "object", + "x-go-name": "Content" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileLinksResponse": { + "description": "FileLinksResponse contains the links for a repo's file", + "type": "object", + "properties": { + "git": { + "type": "string", + "x-go-name": "GitURL" + }, + "html": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "self": { + "type": "string", + "x-go-name": "Self" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileResponse": { + "description": "FileResponse contains information about a repo's file", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "content": { + "$ref": "#/definitions/ContentsResponse" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GPGKey": { + "description": "GPGKey a user GPG key to sign commit and tag in repository", + "type": "object", + "properties": { + "can_certify": { + "type": "boolean", + "x-go-name": "CanCertify" + }, + "can_encrypt_comms": { + "type": "boolean", + "x-go-name": "CanEncryptComms" + }, + "can_encrypt_storage": { + "type": "boolean", + "x-go-name": "CanEncryptStorage" + }, + "can_sign": { + "type": "boolean", + "x-go-name": "CanSign" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "emails": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKeyEmail" + }, + "x-go-name": "Emails" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Expires" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "key_id": { + "type": "string", + "x-go-name": "KeyID" + }, + "primary_key_id": { + "type": "string", + "x-go-name": "PrimaryKeyID" + }, + "public_key": { + "type": "string", + "x-go-name": "PublicKey" + }, + "subkeys": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKey" + }, + "x-go-name": "SubsKey" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GPGKeyEmail": { + "description": "GPGKeyEmail an email attached to a GPGKey", + "type": "object", + "properties": { + "email": { + "type": "string", + "x-go-name": "Email" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitBlobResponse": { + "description": "GitBlobResponse represents a git blob", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + }, + "encoding": { + "type": "string", + "x-go-name": "Encoding" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitEntry": { + "description": "GitEntry represents a git tree", + "type": "object", + "properties": { + "mode": { + "type": "string", + "x-go-name": "Mode" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitHook": { + "description": "GitHook represents a Git repository hook", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + }, + "is_active": { + "type": "boolean", + "x-go-name": "IsActive" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitObject": { + "type": "object", + "title": "GitObject represents a Git object.", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitTreeResponse": { + "description": "GitTreeResponse returns a git tree", + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int64", + "x-go-name": "Page" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "tree": { + "type": "array", + "items": { + "$ref": "#/definitions/GitEntry" + }, + "x-go-name": "Entries" + }, + "truncated": { + "type": "boolean", + "x-go-name": "Truncated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Hook": { + "description": "Hook a hook is a web hook when one repository changed", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Identity": { + "description": "Identity for a person's identity like an author or committer", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "InternalTracker": { + "description": "InternalTracker represents settings for internal tracker", + "type": "object", + "properties": { + "allow_only_contributors_to_track_time": { + "description": "Let only contributors track time (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "AllowOnlyContributorsToTrackTime" + }, + "enable_issue_dependencies": { + "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "EnableIssueDependencies" + }, + "enable_time_tracker": { + "description": "Enable time tracking (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "EnableTimeTracker" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Issue": { + "description": "Issue represents an issue in a repository", + "type": "object", + "properties": { + "assignee": { + "$ref": "#/definitions/User" + }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "comments": { + "type": "integer", + "format": "int64", + "x-go-name": "Comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + }, + "x-go-name": "Labels" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "number": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "original_author": { + "type": "string", + "x-go-name": "OriginalAuthor" + }, + "original_author_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OriginalAuthorID" + }, + "pull_request": { + "$ref": "#/definitions/PullRequestMeta" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueDeadline": { + "description": "IssueDeadline represents an issue deadline", + "type": "object", + "properties": { + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueLabelsOption": { + "description": "IssueLabelsOption a collection of labels", + "type": "object", + "properties": { + "labels": { + "description": "list of label IDs", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Label": { + "description": "Label a label to an issue or a pr", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "MarkdownOption": { + "description": "MarkdownOption markdown options", + "type": "object", + "properties": { + "Context": { + "description": "Context to render\n\nin: body", + "type": "string" + }, + "Mode": { + "description": "Mode to render\n\nin: body", + "type": "string" + }, + "Text": { + "description": "Text markdown to render\n\nin: body", + "type": "string" + }, + "Wiki": { + "description": "Is it a wiki page ?\n\nin: body", + "type": "boolean" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "MergePullRequestOption": { + "description": "MergePullRequestForm form for merging Pull Request", + "type": "object", + "required": [ + "Do" + ], + "properties": { + "Do": { + "type": "string", + "enum": [ + "merge", + "rebase", + "rebase-merge", + "squash" + ] + }, + "MergeMessageField": { + "type": "string" + }, + "MergeTitleField": { + "type": "string" + } + }, + "x-go-name": "MergePullRequestForm", + "x-go-package": "code.gitea.io/gitea/modules/auth" + }, + "MigrateRepoForm": { + "description": "MigrateRepoForm form for migrating repository", + "type": "object", + "required": [ + "clone_addr", + "uid", + "repo_name" + ], + "properties": { + "auth_password": { + "type": "string", + "x-go-name": "AuthPassword" + }, + "auth_username": { + "type": "string", + "x-go-name": "AuthUsername" + }, + "clone_addr": { + "type": "string", + "x-go-name": "CloneAddr" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "issues": { + "type": "boolean", + "x-go-name": "Issues" + }, + "labels": { + "type": "boolean", + "x-go-name": "Labels" + }, + "milestones": { + "type": "boolean", + "x-go-name": "Milestones" + }, + "mirror": { + "type": "boolean", + "x-go-name": "Mirror" + }, + "private": { + "type": "boolean", + "x-go-name": "Private" + }, + "pull_requests": { + "type": "boolean", + "x-go-name": "PullRequests" + }, + "releases": { + "type": "boolean", + "x-go-name": "Releases" + }, + "repo_name": { + "type": "string", + "x-go-name": "RepoName" + }, + "uid": { + "type": "integer", + "format": "int64", + "x-go-name": "UID" + }, + "wiki": { + "type": "boolean", + "x-go-name": "Wiki" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/auth" + }, + "Milestone": { + "description": "Milestone milestone is a collection of issues on one repository", + "type": "object", + "properties": { + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "closed_issues": { + "type": "integer", + "format": "int64", + "x-go-name": "ClosedIssues" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "open_issues": { + "type": "integer", + "format": "int64", + "x-go-name": "OpenIssues" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Organization": { + "description": "Organization represents an organization", + "type": "object", + "properties": { + "avatar_url": { + "type": "string", + "x-go-name": "AvatarURL" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + }, + "visibility": { + "type": "string", + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PRBranchInfo": { + "description": "PRBranchInfo information about a branch", + "type": "object", + "properties": { + "label": { + "type": "string", + "x-go-name": "Name" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "repo": { + "$ref": "#/definitions/Repository" + }, + "repo_id": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + }, + "sha": { + "type": "string", + "x-go-name": "Sha" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PayloadCommit": { + "description": "PayloadCommit represents a commit", + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Added" + }, + "author": { + "$ref": "#/definitions/PayloadUser" + }, + "committer": { + "$ref": "#/definitions/PayloadUser" + }, + "id": { + "description": "sha1 hash of the commit", + "type": "string", + "x-go-name": "ID" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "modified": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Modified" + }, + "removed": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Removed" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "x-go-name": "Timestamp" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PayloadCommitVerification": { + "description": "PayloadCommitVerification represents the GPG verification of a commit", + "type": "object", + "properties": { + "payload": { + "type": "string", + "x-go-name": "Payload" + }, + "reason": { + "type": "string", + "x-go-name": "Reason" + }, + "signature": { + "type": "string", + "x-go-name": "Signature" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PayloadUser": { + "description": "PayloadUser represents the author or committer of a commit", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "description": "Full name of the commit author", + "type": "string", + "x-go-name": "Name" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Permission": { + "description": "Permission represents a set of permissions", + "type": "object", + "properties": { + "admin": { + "type": "boolean", + "x-go-name": "Admin" + }, + "pull": { + "type": "boolean", + "x-go-name": "Pull" + }, + "push": { + "type": "boolean", + "x-go-name": "Push" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PublicKey": { + "description": "PublicKey publickey is a user key to push code to repository", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "fingerprint": { + "type": "string", + "x-go-name": "Fingerprint" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "key": { + "type": "string", + "x-go-name": "Key" + }, + "key_type": { + "type": "string", + "x-go-name": "KeyType" + }, + "read_only": { + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PullRequest": { + "description": "PullRequest represents a pull request", + "type": "object", + "properties": { + "assignee": { + "$ref": "#/definitions/User" + }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "x-go-name": "Assignees" + }, + "base": { + "$ref": "#/definitions/PRBranchInfo" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "comments": { + "type": "integer", + "format": "int64", + "x-go-name": "Comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "diff_url": { + "type": "string", + "x-go-name": "DiffURL" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "head": { + "$ref": "#/definitions/PRBranchInfo" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + }, + "x-go-name": "Labels" + }, + "merge_base": { + "type": "string", + "x-go-name": "MergeBase" + }, + "merge_commit_sha": { + "type": "string", + "x-go-name": "MergedCommitID" + }, + "mergeable": { + "type": "boolean", + "x-go-name": "Mergeable" + }, + "merged": { + "type": "boolean", + "x-go-name": "HasMerged" + }, + "merged_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Merged" + }, + "merged_by": { + "$ref": "#/definitions/User" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "number": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "patch_url": { + "type": "string", + "x-go-name": "PatchURL" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PullRequestMeta": { + "description": "PullRequestMeta PR info if an issue is a PR", + "type": "object", + "properties": { + "merged": { + "type": "boolean", + "x-go-name": "HasMerged" + }, + "merged_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Merged" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Reference": { + "type": "object", + "title": "Reference represents a Git reference.", + "properties": { + "object": { + "$ref": "#/definitions/GitObject" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Release": { + "description": "Release represents a repository release", + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + }, + "x-go-name": "Attachments" + }, + "author": { + "$ref": "#/definitions/User" + }, + "body": { + "type": "string", + "x-go-name": "Note" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "published_at": { + "type": "string", + "format": "date-time", + "x-go-name": "PublishedAt" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "tarball_url": { + "type": "string", + "x-go-name": "TarURL" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "zipball_url": { + "type": "string", + "x-go-name": "ZipURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RepoCommit": { + "type": "object", + "title": "RepoCommit contains information of a commit in the context of a repository.", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "committer": { + "$ref": "#/definitions/CommitUser" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "tree": { + "$ref": "#/definitions/CommitMeta" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RepoTopicOptions": { + "description": "RepoTopicOptions a collection of repo topic names", + "type": "object", + "properties": { + "topics": { + "description": "list of topic names", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Topics" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Repository": { + "description": "Repository represents a repository", + "type": "object", + "properties": { + "allow_merge_commits": { + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_explicit": { + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_squash_merge": { + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "archived": { + "type": "boolean", + "x-go-name": "Archived" + }, + "avatar_url": { + "type": "string", + "x-go-name": "AvatarURL" + }, + "clone_url": { + "type": "string", + "x-go-name": "CloneURL" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "default_branch": { + "type": "string", + "x-go-name": "DefaultBranch" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "empty": { + "type": "boolean", + "x-go-name": "Empty" + }, + "external_tracker": { + "$ref": "#/definitions/ExternalTracker" + }, + "external_wiki": { + "$ref": "#/definitions/ExternalWiki" + }, + "fork": { + "type": "boolean", + "x-go-name": "Fork" + }, + "forks_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Forks" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "has_issues": { + "type": "boolean", + "x-go-name": "HasIssues" + }, + "has_pull_requests": { + "type": "boolean", + "x-go-name": "HasPullRequests" + }, + "has_wiki": { + "type": "boolean", + "x-go-name": "HasWiki" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "ignore_whitespace_conflicts": { + "type": "boolean", + "x-go-name": "IgnoreWhitespaceConflicts" + }, + "internal_tracker": { + "$ref": "#/definitions/InternalTracker" + }, + "mirror": { + "type": "boolean", + "x-go-name": "Mirror" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "open_issues_count": { + "type": "integer", + "format": "int64", + "x-go-name": "OpenIssues" + }, + "original_url": { + "type": "string", + "x-go-name": "OriginalURL" + }, + "owner": { + "$ref": "#/definitions/User" + }, + "parent": { + "$ref": "#/definitions/Repository" + }, + "permissions": { + "$ref": "#/definitions/Permission" + }, + "private": { + "type": "boolean", + "x-go-name": "Private" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "ssh_url": { + "type": "string", + "x-go-name": "SSHURL" + }, + "stars_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Stars" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "watchers_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Watchers" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "SearchResults": { + "description": "SearchResults results of a successful search", + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Repository" + }, + "x-go-name": "Data" + }, + "ok": { + "type": "boolean", + "x-go-name": "OK" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ServerVersion": { + "description": "ServerVersion wraps the version of the server", + "type": "object", + "properties": { + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "StateType": { + "description": "StateType issue state type", + "type": "string", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Status": { + "description": "Status holds a single Status of a single Commit", + "type": "object", + "properties": { + "context": { + "type": "string", + "x-go-name": "Context" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "creator": { + "$ref": "#/definitions/User" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "status": { + "$ref": "#/definitions/StatusState" + }, + "target_url": { + "type": "string", + "x-go-name": "TargetURL" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "StatusState": { + "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", + "type": "string", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Tag": { + "description": "Tag represents a repository tag", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/CommitMeta" + }, + "id": { + "type": "string", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "tarball_url": { + "type": "string", + "x-go-name": "TarballURL" + }, + "zipball_url": { + "type": "string", + "x-go-name": "ZipballURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Team": { + "description": "Team represents a team in an organization", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "organization": { + "$ref": "#/definitions/Organization" + }, + "permission": { + "type": "string", + "enum": [ + "none", + "read", + "write", + "admin", + "owner" + ], + "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.ext_wiki" + ] + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TimeStamp": { + "description": "TimeStamp defines a timestamp", + "type": "integer", + "format": "int64", + "x-go-package": "code.gitea.io/gitea/modules/timeutil" + }, + "TopicName": { + "description": "TopicName a list of repo topic names", + "type": "object", + "properties": { + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "TopicNames" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TopicResponse": { + "description": "TopicResponse for returning topics", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "repo_count": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoCount" + }, + "topic_name": { + "type": "string", + "x-go-name": "Name" + }, + "updated": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TrackedTime": { + "description": "TrackedTime worked time for an issue / pr", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue_id": { + "type": "integer", + "format": "int64", + "x-go-name": "IssueID" + }, + "time": { + "description": "Time in seconds", + "type": "integer", + "format": "int64", + "x-go-name": "Time" + }, + "user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "UserID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UpdateFileOptions": { + "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "sha", + "content" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "content": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "Content" + }, + "from_path": { + "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL", + "type": "string", + "x-go-name": "FromPath" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "sha": { + "description": "sha is the SHA for the file that already exists", + "type": "string", + "x-go-name": "SHA" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "User": { + "description": "User represents a user", + "type": "object", + "properties": { + "avatar_url": { + "description": "URL to the user's avatar", + "type": "string", + "x-go-name": "AvatarURL" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "full_name": { + "description": "the user's full name", + "type": "string", + "x-go-name": "FullName" + }, + "id": { + "description": "the user's id", + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_admin": { + "description": "Is the user an administrator", + "type": "boolean", + "x-go-name": "IsAdmin" + }, + "language": { + "description": "User locale", + "type": "string", + "x-go-name": "Language" + }, + "last_login": { + "type": "string", + "format": "date-time", + "x-go-name": "LastLogin" + }, + "login": { + "description": "the user's username", + "type": "string", + "x-go-name": "UserName" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UserHeatmapData": { + "description": "UserHeatmapData represents the data needed to create a heatmap", + "type": "object", + "properties": { + "contributions": { + "type": "integer", + "format": "int64", + "x-go-name": "Contributions" + }, + "timestamp": { + "$ref": "#/definitions/TimeStamp" + } + }, + "x-go-package": "code.gitea.io/gitea/models" + }, + "WatchInfo": { + "description": "WatchInfo represents an API watch status of one repository", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "ignored": { + "type": "boolean", + "x-go-name": "Ignored" + }, + "reason": { + "type": "object", + "x-go-name": "Reason" + }, + "repository_url": { + "type": "string", + "x-go-name": "RepositoryURL" + }, + "subscribed": { + "type": "boolean", + "x-go-name": "Subscribed" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + } + }, + "responses": { + "AccessToken": { + "description": "AccessToken represents an API access token.", + "headers": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "sha1": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + } + } + }, + "AccessTokenList": { + "description": "AccessTokenList represents a list of API access token.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessToken" + } + } + }, + "AnnotatedTag": { + "description": "AnnotatedTag", + "schema": { + "$ref": "#/definitions/AnnotatedTag" + } + }, + "Attachment": { + "description": "Attachment", + "schema": { + "$ref": "#/definitions/Attachment" + } + }, + "AttachmentList": { + "description": "AttachmentList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + } + } + }, + "Branch": { + "description": "Branch", + "schema": { + "$ref": "#/definitions/Branch" + } + }, + "BranchList": { + "description": "BranchList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Branch" + } + } + }, + "Comment": { + "description": "Comment", + "schema": { + "$ref": "#/definitions/Comment" + } + }, + "CommentList": { + "description": "CommentList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Comment" + } + } + }, + "Commit": { + "description": "Commit", + "schema": { + "$ref": "#/definitions/Commit" + } + }, + "CommitList": { + "description": "CommitList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Commit" + } + }, + "headers": { + "X-HasMore": { + "type": "boolean", + "description": "True if there is another page" + }, + "X-Page": { + "type": "integer", + "format": "int64", + "description": "The current page" + }, + "X-PageCount": { + "type": "integer", + "format": "int64", + "description": "Total number of pages" + }, + "X-PerPage": { + "type": "integer", + "format": "int64", + "description": "Commits per page" + }, + "X-Total": { + "type": "integer", + "format": "int64", + "description": "Total commit count" + } + } + }, + "ContentsListResponse": { + "description": "ContentsListResponse", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentsResponse" + } + } + }, + "ContentsResponse": { + "description": "ContentsResponse", + "schema": { + "$ref": "#/definitions/ContentsResponse" + } + }, + "DeployKey": { + "description": "DeployKey", + "schema": { + "$ref": "#/definitions/DeployKey" + } + }, + "DeployKeyList": { + "description": "DeployKeyList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeployKey" + } + } + }, + "EmailList": { + "description": "EmailList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Email" + } + } + }, + "EmptyRepository": { + "description": "EmptyRepository", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "FileDeleteResponse": { + "description": "FileDeleteResponse", + "schema": { + "$ref": "#/definitions/FileDeleteResponse" + } + }, + "FileResponse": { + "description": "FileResponse", + "schema": { + "$ref": "#/definitions/FileResponse" + } + }, + "GPGKey": { + "description": "GPGKey", + "schema": { + "$ref": "#/definitions/GPGKey" + } + }, + "GPGKeyList": { + "description": "GPGKeyList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKey" + } + } + }, + "GitBlobResponse": { + "description": "GitBlobResponse", + "schema": { + "$ref": "#/definitions/GitBlobResponse" + } + }, + "GitHook": { + "description": "GitHook", + "schema": { + "$ref": "#/definitions/GitHook" + } + }, + "GitHookList": { + "description": "GitHookList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GitHook" + } + } + }, + "GitTreeResponse": { + "description": "GitTreeResponse", + "schema": { + "$ref": "#/definitions/GitTreeResponse" + } + }, + "Hook": { + "description": "Hook", + "schema": { + "$ref": "#/definitions/Hook" + } + }, + "HookList": { + "description": "HookList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Hook" + } + } + }, + "Issue": { + "description": "Issue", + "schema": { + "$ref": "#/definitions/Issue" + } + }, + "IssueDeadline": { + "description": "IssueDeadline", + "schema": { + "$ref": "#/definitions/IssueDeadline" + } + }, + "IssueList": { + "description": "IssueList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Issue" + } + } + }, + "Label": { + "description": "Label", + "schema": { + "$ref": "#/definitions/Label" + } + }, + "LabelList": { + "description": "LabelList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + } + } + }, + "MarkdownRender": { + "description": "MarkdownRender is a rendered markdown document", + "schema": { + "type": "string" + } + }, + "Milestone": { + "description": "Milestone", + "schema": { + "$ref": "#/definitions/Milestone" + } + }, + "MilestoneList": { + "description": "MilestoneList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Milestone" + } + } + }, + "Organization": { + "description": "Organization", + "schema": { + "$ref": "#/definitions/Organization" + } + }, + "OrganizationList": { + "description": "OrganizationList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Organization" + } + } + }, + "PublicKey": { + "description": "PublicKey", + "schema": { + "$ref": "#/definitions/PublicKey" + } + }, + "PublicKeyList": { + "description": "PublicKeyList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PublicKey" + } + } + }, + "PullRequest": { + "description": "PullRequest", + "schema": { + "$ref": "#/definitions/PullRequest" + } + }, + "PullRequestList": { + "description": "PullRequestList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PullRequest" + } + } + }, + "Reference": { + "description": "Reference", + "schema": { + "$ref": "#/definitions/Reference" + } + }, + "ReferenceList": { + "description": "ReferenceList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + } + }, + "Release": { + "description": "Release", + "schema": { + "$ref": "#/definitions/Release" + } + }, + "ReleaseList": { + "description": "ReleaseList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Release" + } + } + }, + "Repository": { + "description": "Repository", + "schema": { + "$ref": "#/definitions/Repository" + } + }, + "RepositoryList": { + "description": "RepositoryList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Repository" + } + } + }, + "SearchResults": { + "description": "SearchResults", + "schema": { + "$ref": "#/definitions/SearchResults" + } + }, + "ServerVersion": { + "description": "ServerVersion", + "schema": { + "$ref": "#/definitions/ServerVersion" + } + }, + "Status": { + "description": "Status", + "schema": { + "$ref": "#/definitions/Status" + } + }, + "StatusList": { + "description": "StatusList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Status" + } + } + }, + "Tag": { + "description": "Tag", + "schema": { + "$ref": "#/definitions/Tag" + } + }, + "TagList": { + "description": "TagList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + } + }, + "Team": { + "description": "Team", + "schema": { + "$ref": "#/definitions/Team" + } + }, + "TeamList": { + "description": "TeamList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + } + } + }, + "TopicListResponse": { + "description": "TopicListResponse", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TopicResponse" + } + } + }, + "TopicNames": { + "description": "TopicNames", + "schema": { + "$ref": "#/definitions/TopicName" + } + }, + "TrackedTime": { + "description": "TrackedTime", + "schema": { + "$ref": "#/definitions/TrackedTime" + } + }, + "TrackedTimeList": { + "description": "TrackedTimeList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TrackedTime" + } + } + }, + "User": { + "description": "User", + "schema": { + "$ref": "#/definitions/User" + } + }, + "UserHeatmapData": { + "description": "UserHeatmapData", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/UserHeatmapData" + } + } + }, + "UserList": { + "description": "UserList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + } + } + }, + "WatchInfo": { + "description": "WatchInfo", + "schema": { + "$ref": "#/definitions/WatchInfo" + } + }, + "empty": { + "description": "APIEmpty is an empty response" + }, + "error": { + "description": "APIError is error format response", + "headers": { + "message": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "forbidden": { + "description": "APIForbiddenError is a forbidden error response", + "headers": { + "message": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "notFound": { + "description": "APINotFound is a not found empty response" + }, + "parameterBodies": { + "description": "parameterBodies", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + } + }, + "redirect": { + "description": "APIRedirect is a redirect response" + }, + "validationError": { + "description": "APIValidationError is error format response related to input validation", + "headers": { + "message": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "securityDefinitions": { + "AccessToken": { + "type": "apiKey", + "name": "access_token", + "in": "query" + }, + "AuthorizationHeaderToken": { + "description": "API tokens must be prepended with \"token\" followed by a space.", + "type": "apiKey", + "name": "Authorization", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + }, + "SudoHeader": { + "description": "Sudo API request as the user provided as the key. Admin privileges are required.", + "type": "apiKey", + "name": "Sudo", + "in": "header" + }, + "SudoParam": { + "description": "Sudo API request as the user provided as the key. Admin privileges are required.", + "type": "apiKey", + "name": "sudo", + "in": "query" + }, + "Token": { + "type": "apiKey", + "name": "token", + "in": "query" + } + }, + "security": [ + { + "BasicAuth": [] + }, + { + "Token": [] + }, + { + "AccessToken": [] + }, + { + "AuthorizationHeaderToken": [] + }, + { + "SudoParam": [] + }, + { + "SudoHeader": [] + } + ] +} diff --git a/user/auth/activate.tmpl b/user/auth/activate.tmpl new file mode 100644 index 0000000..92b85a1 --- /dev/null +++ b/user/auth/activate.tmpl @@ -0,0 +1,38 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{.i18n.Tr "auth.active_your_account"}} +

    +
    + {{template "base/alert" .}} + {{if .IsActivatePage}} + {{if .ServiceNotEnabled}} +

    {{.i18n.Tr "auth.disable_register_mail"}}

    + {{else if .ResendLimited}} +

    {{.i18n.Tr "auth.resent_limit_prompt"}}

    + {{else}} +

    {{.i18n.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .ActiveCodeLives | Str2html}}

    + {{end}} + {{else}} + {{if .IsSendRegisterMail}} +

    {{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .ActiveCodeLives | Str2html}}

    + {{else if .IsActivateFailed}} +

    {{.i18n.Tr "auth.invalid_code"}}

    + {{else}} +

    {{.i18n.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email | Str2html}}

    +
    +
    + +
    + {{end}} + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/change_passwd.tmpl b/user/auth/change_passwd.tmpl new file mode 100644 index 0000000..d847963 --- /dev/null +++ b/user/auth/change_passwd.tmpl @@ -0,0 +1,7 @@ +{{template "base/head" .}} +
    +
    + {{template "user/auth/change_passwd_inner" .}} +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/change_passwd_inner.tmpl b/user/auth/change_passwd_inner.tmpl new file mode 100644 index 0000000..60d4a21 --- /dev/null +++ b/user/auth/change_passwd_inner.tmpl @@ -0,0 +1,26 @@ + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

    + {{.i18n.Tr "settings.change_password"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + + +
    + + +
    + +
    + + +
    +
    +
    diff --git a/user/auth/finalize_openid.tmpl b/user/auth/finalize_openid.tmpl new file mode 100644 index 0000000..5c637bd --- /dev/null +++ b/user/auth/finalize_openid.tmpl @@ -0,0 +1,47 @@ +{{template "base/head" .}} +
    +
    +
    + {{template "user/auth/finalize_openid_navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "auth.login_userpass"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + +
    + + +
    +
    + +
    + + + {{.i18n.Tr "auth.forget_password"}} +
    + {{if .ShowRegistrationButton}} + + {{end}} +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/forgot_passwd.tmpl b/user/auth/forgot_passwd.tmpl new file mode 100644 index 0000000..1e06176 --- /dev/null +++ b/user/auth/forgot_passwd.tmpl @@ -0,0 +1,34 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{.i18n.Tr "auth.forgot_password_title"}} +

    +
    + {{template "base/alert" .}} + {{if .IsResetSent}} +

    {{.i18n.Tr "auth.reset_password_mail_sent_prompt" .Email .ResetPwdCodeLives | Str2html}}

    + {{else if .IsResetRequest}} +
    + + +
    +
    +
    + + +
    + {{else if .IsResetDisable}} +

    {{.i18n.Tr "auth.disable_forgot_password_mail"}}

    + {{else if .ResendLimited}} +

    {{.i18n.Tr "auth.resent_limit_prompt"}}

    + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/grant.tmpl b/user/auth/grant.tmpl new file mode 100644 index 0000000..7ac8f18 --- /dev/null +++ b/user/auth/grant.tmpl @@ -0,0 +1,31 @@ +{{template "base/head" .}} +
    +
    +
    +

    + {{.i18n.Tr "auth.authorize_title" .Application.Name}} +

    +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "auth.authorize_application_description"}}
    + {{.i18n.Tr "auth.authorize_application_created_by" .ApplicationUserLink | Str2html}} +

    +
    +
    +

    {{.i18n.Tr "auth.authroize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}

    +
    +
    +
    + {{.CsrfTokenHtml}} + + + + + Cancel +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/grant_error.tmpl b/user/auth/grant_error.tmpl new file mode 100644 index 0000000..0eb175f --- /dev/null +++ b/user/auth/grant_error.tmpl @@ -0,0 +1,16 @@ +{{template "base/head" .}} +{{if .IsRepo}}
    {{template "repo/header" .}}
    {{end}} +
    +
    +
    +

    + {{.i18n.Tr "auth.authorization_failed" }} +

    +

    {{.Error.ErrorDescription}}

    +
    +

    {{.i18n.Tr "auth.authorization_failed_desc"}}

    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/link_account.tmpl b/user/auth/link_account.tmpl new file mode 100644 index 0000000..339ca85 --- /dev/null +++ b/user/auth/link_account.tmpl @@ -0,0 +1,33 @@ +{{template "base/head" .}} + + + +{{template "base/footer" .}} diff --git a/user/auth/prohibit_login.tmpl b/user/auth/prohibit_login.tmpl new file mode 100644 index 0000000..eec0f08 --- /dev/null +++ b/user/auth/prohibit_login.tmpl @@ -0,0 +1,16 @@ +{{template "base/head" .}} +
    +
    +
    +
    +

    + {{.i18n.Tr "auth.prohibit_login"}} +

    +
    +

    {{.i18n.Tr "auth.prohibit_login_desc"}}

    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/reset_passwd.tmpl b/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..e7d9392 --- /dev/null +++ b/user/auth/reset_passwd.tmpl @@ -0,0 +1,46 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} + +

    + {{.i18n.Tr "auth.reset_password"}} +

    +
    + {{template "base/alert" .}} + {{if .user_email }} +
    + + +
    + {{end}} + {{if .IsResetForm}} +
    + + +
    + {{if not .user_signed_in}} +
    + +
    + + +
    +
    + {{end}} +
    +
    + + +
    + {{else}} +

    {{.i18n.Tr "auth.invalid_code"}}

    + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/signin.tmpl b/user/auth/signin.tmpl new file mode 100644 index 0000000..bbb471c --- /dev/null +++ b/user/auth/signin.tmpl @@ -0,0 +1,8 @@ +{{template "base/head" .}} +
    + {{template "user/auth/signin_navbar" .}} +
    + {{template "user/auth/signin_inner" .}} +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/signin_inner.tmpl b/user/auth/signin_inner.tmpl new file mode 100644 index 0000000..a3e7117 --- /dev/null +++ b/user/auth/signin_inner.tmpl @@ -0,0 +1,77 @@ + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

    + {{if .LinkAccountMode}} + {{.i18n.Tr "auth.oauth_signin_title"}} + {{else}} + {{.i18n.Tr "auth.login_userpass"}} + {{end}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{if or (not .DisablePassword) .LinkAccountMode}} +
    + + +
    + {{end}} + {{if not .LinkAccountMode}} +
    + +
    + + +
    +
    + {{end}} + +
    + + + {{.i18n.Tr "auth.forgot_password"}} +
    + + {{if .ShowRegistrationButton}} + + {{end}} + + {{if and .OrderedOAuth2Names .OAuth2Providers}} +
    +
    +
    +
    +
    +

    {{.i18n.Tr "sign_in_with"}}

    + {{range $key := .OrderedOAuth2Names}} + {{$provider := index $.OAuth2Providers $key}} + + {{$provider.DisplayName}}{{if eq $provider.Name + {{end}} +
    +
    +
    +
    + {{end}} +
    +
    diff --git a/user/auth/signin_navbar.tmpl b/user/auth/signin_navbar.tmpl new file mode 100644 index 0000000..345e221 --- /dev/null +++ b/user/auth/signin_navbar.tmpl @@ -0,0 +1,11 @@ +{{if .EnableOpenIDSignIn}} + +{{end}} diff --git a/user/auth/signin_openid.tmpl b/user/auth/signin_openid.tmpl new file mode 100644 index 0000000..a9c0067 --- /dev/null +++ b/user/auth/signin_openid.tmpl @@ -0,0 +1,38 @@ +{{template "base/head" .}} +
    + {{template "user/auth/signin_navbar" .}} +
    + {{template "base/alert" .}} +

    + + OpenID +

    +
    +
    + {{.CsrfTokenHtml}} +
    + {{.i18n.Tr "auth.openid_signin_desc"}} +
    +
    + + +
    +
    + +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/signup.tmpl b/user/auth/signup.tmpl new file mode 100644 index 0000000..b814b46 --- /dev/null +++ b/user/auth/signup.tmpl @@ -0,0 +1,3 @@ +{{template "base/head" .}} +{{template "user/auth/signup_inner" .}} +{{template "base/footer" .}} diff --git a/user/auth/signup_inner.tmpl b/user/auth/signup_inner.tmpl new file mode 100644 index 0000000..cdacd91 --- /dev/null +++ b/user/auth/signup_inner.tmpl @@ -0,0 +1,77 @@ +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{if .LinkAccountMode}} + {{.i18n.Tr "auth.oauth_signup_title"}} + {{else}} + {{.i18n.Tr "sign_up"}} + {{end}} +

    +
    + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}} + {{template "base/alert" .}} + {{end}} + {{if .DisableRegistration}} +

    {{.i18n.Tr "auth.disable_register_prompt"}}

    + {{else}} +
    + + +
    +
    + + +
    + + {{if not .DisablePassword}} +
    + + +
    +
    + + +
    + {{end}} + {{if and .EnableCaptcha (eq .CaptchaType "image")}} +
    + + {{.Captcha.CreateHtml}} +
    +
    + + +
    + {{end}} + {{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}} +
    +
    +
    + {{end}} + +
    + + +
    + + {{if not .LinkAccountMode}} + + {{end}} + {{end}} +
    +
    +
    +
    +
    diff --git a/user/auth/signup_openid_connect.tmpl b/user/auth/signup_openid_connect.tmpl new file mode 100644 index 0000000..72b426f --- /dev/null +++ b/user/auth/signup_openid_connect.tmpl @@ -0,0 +1,36 @@ +{{template "base/head" .}} +
    + {{template "user/auth/signup_openid_navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "auth.openid_connect_title"}} +

    +
    +

    + {{.i18n.Tr "auth.openid_connect_desc"}} +

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    +
    + + + {{.i18n.Tr "auth.forgot_password"}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/signup_openid_navbar.tmpl b/user/auth/signup_openid_navbar.tmpl new file mode 100644 index 0000000..86f6ee7 --- /dev/null +++ b/user/auth/signup_openid_navbar.tmpl @@ -0,0 +1,11 @@ + + diff --git a/user/auth/signup_openid_register.tmpl b/user/auth/signup_openid_register.tmpl new file mode 100644 index 0000000..67f03a1 --- /dev/null +++ b/user/auth/signup_openid_register.tmpl @@ -0,0 +1,50 @@ +{{template "base/head" .}} +
    + {{template "user/auth/signup_openid_navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "auth.openid_register_title"}} +

    +
    +

    + {{.i18n.Tr "auth.openid_register_desc"}} +

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + {{if and .EnableCaptcha (eq .CaptchaType "image")}} +
    + + {{.Captcha.CreateHtml}} +
    +
    + + +
    + {{end}} + {{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}} +
    +
    +
    + {{end}} +
    + + +
    +
    + + +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/twofa.tmpl b/user/auth/twofa.tmpl new file mode 100644 index 0000000..56f9101 --- /dev/null +++ b/user/auth/twofa.tmpl @@ -0,0 +1,27 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{.i18n.Tr "twofa"}} +

    +
    + {{template "base/alert" .}} +
    + + +
    + +
    + + + {{.i18n.Tr "auth.use_scratch_code" | Str2html}} +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/twofa_scratch.tmpl b/user/auth/twofa_scratch.tmpl new file mode 100644 index 0000000..78aab3e --- /dev/null +++ b/user/auth/twofa_scratch.tmpl @@ -0,0 +1,26 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{.i18n.Tr "twofa_scratch"}} +

    +
    + {{template "base/alert" .}} +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/auth/u2f.tmpl b/user/auth/u2f.tmpl new file mode 100644 index 0000000..1d1be09 --- /dev/null +++ b/user/auth/u2f.tmpl @@ -0,0 +1,22 @@ +{{template "base/head" .}} +
    +
    +
    +

    + {{.i18n.Tr "twofa"}} +

    +
    + +

    {{.i18n.Tr "u2f_insert_key"}}

    + {{template "base/alert" .}} +

    {{.i18n.Tr "u2f_sign_in"}}

    +
    +
    {{.i18n.Tr "u2f_press_button"}}
    + +
    +
    +
    +{{template "user/auth/u2f_error" .}} +{{template "base/footer" .}} diff --git a/user/auth/u2f_error.tmpl b/user/auth/u2f_error.tmpl new file mode 100644 index 0000000..e30b064 --- /dev/null +++ b/user/auth/u2f_error.tmpl @@ -0,0 +1,32 @@ + diff --git a/user/dashboard/dashboard.tmpl b/user/dashboard/dashboard.tmpl new file mode 100644 index 0000000..27a0a76 --- /dev/null +++ b/user/dashboard/dashboard.tmpl @@ -0,0 +1,132 @@ +{{template "base/head" .}} +
    + {{template "user/dashboard/navbar" .}} +
    + {{template "base/alert" .}} +
    +
    + {{if .EnableHeatmap}} +
    + +
    +
    {{.i18n.Tr "user.heatmap.loading"}}
    +
    +
    +
    +
    + {{end}} + {{template "user/dashboard/feeds" .}} +
    + +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/dashboard/feeds.tmpl b/user/dashboard/feeds.tmpl new file mode 100644 index 0000000..9c404c9 --- /dev/null +++ b/user/dashboard/feeds.tmpl @@ -0,0 +1,100 @@ +{{range .Feeds}} +
    +
    + +
    +
    +
    +
    +

    + {{if gt .ActUser.ID 0}} + {{.GetDisplayName}} + {{else}} + {{.ShortActUserName}} + {{end}} + {{if eq .GetOpType 1}} + {{$.i18n.Tr "action.create_repo" .GetRepoLink .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 2}} + {{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 5}} + {{ $branchLink := .GetBranch | EscapePound | Escape}} + {{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink (Escape .GetBranch) .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 6}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.create_issue" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 7}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.create_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 8}} + {{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 9}} + {{ $branchLink := .GetBranch | EscapePound | Escape}} + {{$.i18n.Tr "action.push_tag" .GetRepoLink $branchLink .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 10}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 11}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.merge_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 12}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.close_issue" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 13}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.reopen_issue" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 14}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.close_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 15}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.reopen_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 16}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.delete_tag" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 17}} + {{ $index := index .GetIssueInfos 0}} + {{$.i18n.Tr "action.delete_branch" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 18}} + {{ $branchLink := .GetBranch | EscapePound}} + {{$.i18n.Tr "action.mirror_sync_push" .GetRepoLink $branchLink .GetBranch .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 19}} + {{$.i18n.Tr "action.mirror_sync_create" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}} + {{else if eq .GetOpType 20}} + {{$.i18n.Tr "action.mirror_sync_delete" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}} + {{end}} +

    + {{if or (eq .GetOpType 5) (eq .GetOpType 18)}} +
    + +
    + {{else if eq .GetOpType 6}} + {{index .GetIssueInfos 1}} + {{else if eq .GetOpType 7}} + {{index .GetIssueInfos 1}} + {{else if eq .GetOpType 10}} + {{.GetIssueTitle}} +

    {{index .GetIssueInfos 1}}

    + {{else if eq .GetOpType 11}} +

    {{index .GetIssueInfos 1}}

    + {{else if (or (or (eq .GetOpType 12) (eq .GetOpType 13)) (or (eq .GetOpType 14) (eq .GetOpType 15)))}} + {{.GetIssueTitle}} + {{end}} +

    {{TimeSince .GetCreate $.i18n.Lang}}

    +
    +
    +
    + +
    +
    +
    +
    +{{end}} diff --git a/user/dashboard/issues.tmpl b/user/dashboard/issues.tmpl new file mode 100644 index 0000000..ac5f10a --- /dev/null +++ b/user/dashboard/issues.tmpl @@ -0,0 +1,139 @@ +{{template "base/head" .}} +
    + {{template "user/dashboard/navbar" .}} +
    +
    + +
    + + + +
    + {{range .Issues}} + + {{ $timeStr:= TimeSinceUnix .CreatedUnix $.Lang }} +
  • +
    {{if not $.RepoID}}{{.Repo.FullName}}{{end}}#{{.Index}}
    + {{.Title}} + + {{if .IsPull }} + {{if (index $.CommitStatus .PullRequest.ID)}} + {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}} + {{end}} + {{end}} + + {{with .Labels}} + {{/* If we have any labels, we should show them + with a 2.5 line height, this way they don't look + awful and they don't stack on top of each other, + especially on mobile views. */}} + + {{range .}} + {{.Name}} + {{end}} + + {{end}} + + {{if .NumComments}} + {{.NumComments}} + {{end}} + {{if .TotalTrackedTime}} + {{.TotalTrackedTime | Sec2Time}} + {{end}} + +

    + {{if .OriginalAuthor}} + {{$.i18n.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor | Safe}} + {{else if gt .Poster.ID 0}} + {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink (.Poster.GetDisplayName|Escape) | Safe}} + {{else}} + {{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName|Escape) | Safe}} + {{end}} + {{if .Milestone}} + + {{.Milestone.Name}} + + {{end}} + {{if .Ref}} + + {{.Ref}} + + {{end}} + {{range .Assignees}} + + + + {{end}} + {{$tasks := .GetTasks}} + {{if gt $tasks 0}} + {{$tasksDone := .GetTasksDone}} + + {{$tasksDone}} / {{$tasks}} + + {{end}} +

    +
  • + {{end}} + + {{template "base/paginate" .}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/dashboard/navbar.tmpl b/user/dashboard/navbar.tmpl new file mode 100644 index 0000000..25c4532 --- /dev/null +++ b/user/dashboard/navbar.tmpl @@ -0,0 +1,55 @@ +
    + +
    +
    diff --git a/user/meta/followers.tmpl b/user/meta/followers.tmpl new file mode 100644 index 0000000..40d7e95 --- /dev/null +++ b/user/meta/followers.tmpl @@ -0,0 +1,6 @@ +{{template "base/head" .}} +
    + {{template "user/meta/header" .}} + {{template "repo/user_cards" .}} +
    +{{template "base/footer" .}} diff --git a/user/meta/header.tmpl b/user/meta/header.tmpl new file mode 100644 index 0000000..36072e8 --- /dev/null +++ b/user/meta/header.tmpl @@ -0,0 +1,24 @@ +{{with .Owner}} +
    + + + {{.Name}} + {{with .FullName}}({{.}}){{end}} + + +
    + {{if or $.PageIsFollowers $.PageIsFollowing}} + {{if and $.IsSigned (ne $.SignedUserName .Name)}} + + {{end}} + {{end}} +
    +
    +{{end}} +
    diff --git a/user/notification/notification.tmpl b/user/notification/notification.tmpl new file mode 100644 index 0000000..3c30bbe --- /dev/null +++ b/user/notification/notification.tmpl @@ -0,0 +1,117 @@ +{{template "base/head" .}} + +
    +
    +

    {{.i18n.Tr "notification.notifications"}}

    + + +
    + {{if eq (len .Notifications) 0}} + {{if eq .Status 1}} + {{.i18n.Tr "notification.no_unread"}} + {{else}} + {{.i18n.Tr "notification.no_read"}} + {{end}} + {{else}} + + + {{range $notification := .Notifications}} + {{$issue := $notification.GetIssue}} + {{$repo := $notification.GetRepo}} + {{$repoOwner := $repo.MustOwner}} + + + + + + + + + {{end}} + +
    + {{if eq $notification.Status 3}} + + {{else if $issue.IsPull}} + {{if $issue.IsClosed}} + {{if $issue.GetPullRequest.HasMerged}} + + {{else}} + + {{end}} + {{else}} + + {{end}} + {{else}} + {{if $issue.IsClosed}} + + {{else}} + + {{end}} + {{end}} + + + #{{$issue.Index}} - {{$issue.Title}} + + + + {{$repoOwner.Name}}/{{$repo.Name}} + + + {{if ne $notification.Status 3}} +
    + {{$.CsrfTokenHtml}} + + + +
    + {{end}} +
    + {{if or (eq $notification.Status 1) (eq $notification.Status 3)}} +
    + {{$.CsrfTokenHtml}} + + + +
    + {{else if eq $notification.Status 2}} +
    + {{$.CsrfTokenHtml}} + + + +
    + {{end}} +
    + {{end}} +
    + + {{template "base/paginate" .}} +
    +
    + +{{template "base/footer" .}} diff --git a/user/profile.tmpl b/user/profile.tmpl new file mode 100644 index 0000000..52c6e3e --- /dev/null +++ b/user/profile.tmpl @@ -0,0 +1,138 @@ +{{template "base/head" .}} +
    +
    +
    +
    +
    + {{if eq .SignedUserName .Owner.Name}} + + + + {{else}} + + + + {{end}} +
    + {{if .Owner.FullName}}{{.Owner.FullName}}{{end}} + {{.Owner.Name}} +
    +
    + +
    +
    +
    +
    + + + {{if eq .TabName "activity"}} + {{if .EnableHeatmap}} +
    + +
    +
    {{.i18n.Tr "user.heatmap.loading"}}
    +
    +
    +
    +
    + {{end}} +
    + {{template "user/dashboard/feeds" .}} +
    + {{else if eq .TabName "stars"}} +
    + {{template "explore/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} +
    + {{else}} + {{template "explore/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} + {{end}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/settings/account.tmpl b/user/settings/account.tmpl new file mode 100644 index 0000000..dcb5770 --- /dev/null +++ b/user/settings/account.tmpl @@ -0,0 +1,196 @@ +{{template "base/head" .}} +
    + {{template "user/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "settings.password"}} +

    +
    + {{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}} +
    + {{.CsrfTokenHtml}} + {{if .SignedUser.IsPasswordSet}} +
    + + +
    + {{end}} +
    + + +
    +
    + + +
    + +
    + + {{.i18n.Tr "auth.forgot_password"}} +
    +
    + {{else}} +
    +

    {{$.i18n.Tr "settings.password_change_disabled"}}

    +
    + {{end}} +
    + +

    + {{.i18n.Tr "settings.manage_emails"}} +

    +
    + +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    +
    + +

    + {{.i18n.Tr "settings.manage_themes"}} +

    +
    + +
    +

    + {{.i18n.Tr "settings.delete_account"}} +

    +
    +
    +

    {{.i18n.Tr "settings.delete_prompt" | Str2html}}

    +
    +
    + {{.CsrfTokenHtml}} + +
    + + +
    +
    +
    + {{.i18n.Tr "settings.confirm_delete_account"}} +
    + {{.i18n.Tr "auth.forgot_password"}} +
    +
    +
    +
    +
    + + + + + +{{template "base/footer" .}} diff --git a/user/settings/applications.tmpl b/user/settings/applications.tmpl new file mode 100644 index 0000000..08b2ca7 --- /dev/null +++ b/user/settings/applications.tmpl @@ -0,0 +1,77 @@ +{{template "base/head" .}} +
    + {{template "user/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "settings.manage_access_token"}} +

    +
    +
    +
    + {{.i18n.Tr "settings.tokens_desc"}} +
    + {{range .Tokens}} +
    +
    + +
    + +
    + {{.Name}} +
    + {{$.i18n.Tr "settings.add_on"}} {{.CreatedUnix.FormatShort}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} {{.UpdatedUnix.FormatShort}}{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} +
    +
    +
    + {{end}} +
    +
    +
    +
    + {{.i18n.Tr "settings.generate_new_token"}} +
    +

    {{.i18n.Tr "settings.new_token_desc"}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    +
    + + {{if .EnableOAuth2}} + {{template "user/settings/grants_oauth2" .}} + {{template "user/settings/applications_oauth2" .}} + {{end}} +
    +
    + + + + +{{template "base/footer" .}} diff --git a/user/settings/applications_oauth2.tmpl b/user/settings/applications_oauth2.tmpl new file mode 100644 index 0000000..42d1950 --- /dev/null +++ b/user/settings/applications_oauth2.tmpl @@ -0,0 +1,58 @@ +

    + {{.i18n.Tr "settings.manage_oauth2_applications"}} +

    +
    +
    +
    + {{.i18n.Tr "settings.oauth2_application_create_description"}} +
    + {{range $app := .Applications}} +
    +
    + + + {{$.i18n.Tr "settings.oauth2_application_edit"}} + + +
    +
    + {{$app.Name}} +
    +
    + {{end}} +
    +
    +
    +
    + {{.i18n.Tr "settings.create_oauth2_application" }} +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + +
    +
    + + diff --git a/user/settings/applications_oauth2_edit.tmpl b/user/settings/applications_oauth2_edit.tmpl new file mode 100644 index 0000000..d1b0beb --- /dev/null +++ b/user/settings/applications_oauth2_edit.tmpl @@ -0,0 +1,69 @@ +{{template "base/head" .}} +
    + {{template "user/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "settings.edit_oauth2_application"}} +

    +
    + {{template "base/alert" .}} +

    {{.i18n.Tr "settings.oauth2_application_create_description"}}

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{if .ClientSecret}} +
    + + +
    + {{else}} +
    + + +
    + {{end}} +
    + + {{.i18n.Tr "settings.oauth2_regenerate_secret_hint"}} +
    + {{.CsrfTokenHtml}} + {{.i18n.Tr "settings.oauth2_regenerate_secret"}} +
    +
    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + +
    +
    +
    +
    + + + +{{template "base/footer" .}} diff --git a/user/settings/grants_oauth2.tmpl b/user/settings/grants_oauth2.tmpl new file mode 100644 index 0000000..4dc5b94 --- /dev/null +++ b/user/settings/grants_oauth2.tmpl @@ -0,0 +1,39 @@ +

    + {{.i18n.Tr "settings.authorized_oauth2_applications"}} +

    +
    +
    +
    + {{.i18n.Tr "settings.authorized_oauth2_applications_description"}} +
    + {{range $grant := .Grants}} +
    +
    + +
    + +
    + {{$grant.Application.Name}} +
    + {{$.i18n.Tr "settings.add_on"}} {{$grant.CreatedUnix.FormatShort}} +
    +
    +
    + {{end}} +
    +
    + + diff --git a/user/settings/keys.tmpl b/user/settings/keys.tmpl new file mode 100644 index 0000000..86d2204 --- /dev/null +++ b/user/settings/keys.tmpl @@ -0,0 +1,12 @@ +{{template "base/head" .}} +
    + {{template "user/settings/navbar" .}} +
    + {{template "base/alert" .}} + {{template "user/settings/keys_ssh" .}} +
    + {{template "user/settings/keys_gpg" .}} +
    +
    + +{{template "base/footer" .}} diff --git a/user/settings/keys_gpg.tmpl b/user/settings/keys_gpg.tmpl new file mode 100644 index 0000000..0a4afbf --- /dev/null +++ b/user/settings/keys_gpg.tmpl @@ -0,0 +1,67 @@ +

    + {{.i18n.Tr "settings.manage_gpg_keys"}} +
    +
    {{.i18n.Tr "settings.add_key"}}
    +
    +

    +
    +
    +
    + {{.i18n.Tr "settings.gpg_desc"}} +
    + {{range .GPGKeys}} +
    +
    + +
    + +
    + {{range .Emails}}{{.Email}} {{end}} +
    + {{$.i18n.Tr "settings.key_id"}}: {{.KeyID}} + {{$.i18n.Tr "settings.subkeys"}}: {{range .SubsKey}} {{.KeyID}} {{end}} +
    +
    + {{$.i18n.Tr "settings.add_on"}} {{.AddedUnix.FormatShort}} + - + {{if not .ExpiredUnix.IsZero}}{{$.i18n.Tr "settings.valid_until"}} {{.ExpiredUnix.FormatShort}}{{else}}{{$.i18n.Tr "settings.valid_forever"}}{{end}} +
    +
    +
    + {{end}} +
    +
    +
    +

    {{.i18n.Tr "settings.gpg_helper" "https://help.github.com/articles/about-gpg/" | Str2html}}

    +
    +

    + {{.i18n.Tr "settings.add_new_gpg_key"}} +

    +
    +
    + {{.CsrfTokenHtml}} + +
    + + +
    + + +
    +
    +
    + + diff --git a/user/settings/keys_ssh.tmpl b/user/settings/keys_ssh.tmpl new file mode 100644 index 0000000..e954472 --- /dev/null +++ b/user/settings/keys_ssh.tmpl @@ -0,0 +1,71 @@ +

    + {{.i18n.Tr "settings.manage_ssh_keys"}} +
    + {{if not .DisableSSH}} +
    {{.i18n.Tr "settings.add_key"}}
    + {{else}} +
    {{.i18n.Tr "settings.ssh_disabled"}}
    + {{end}} +
    +

    +
    +
    +
    + {{.i18n.Tr "settings.ssh_desc"}} +
    + {{range .Keys}} +
    +
    + +
    + +
    + {{.Name}} +
    + {{.Fingerprint}} +
    +
    + {{$.i18n.Tr "settings.add_on"}} {{.CreatedUnix.FormatShort}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} {{.UpdatedUnix.FormatShort}}{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} +
    +
    +
    + {{end}} +
    +
    +
    +

    {{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}

    +
    +

    + {{.i18n.Tr "settings.add_new_key"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + + +
    +
    +
    + + diff --git a/user/settings/navbar.tmpl b/user/settings/navbar.tmpl new file mode 100644 index 0000000..18bd9a4 --- /dev/null +++ b/user/settings/navbar.tmpl @@ -0,0 +1,23 @@ + diff --git a/user/settings/organization.tmpl b/user/settings/organization.tmpl new file mode 100644 index 0000000..de541dc --- /dev/null +++ b/user/settings/organization.tmpl @@ -0,0 +1,35 @@ +{{template "base/head" .}} +
    + {{template "user/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "settings.orgs"}} + {{if .SignedUser.CanCreateOrganization}} + + {{end}} +

    +
    + {{if .Orgs}} +
    + {{range .Orgs}} + + {{end}} +
    + {{else}} + {{.i18n.Tr "settings.orgs_none"}} + {{end}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/settings/profile.tmpl b/user/settings/profile.tmpl new file mode 100644 index 0000000..995bdfd --- /dev/null +++ b/user/settings/profile.tmpl @@ -0,0 +1,106 @@ +{{template "base/head" .}} +
    + {{template "user/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "settings.public_profile"}} +

    +
    +

    {{.i18n.Tr "settings.profile_desc"}}

    +
    + {{.CsrfTokenHtml}} +
    + + + {{if not .SignedUser.IsLocal}} +

    {{$.i18n.Tr "settings.password_username_disabled"}}

    + {{end}} +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    + + +
    + +
    + +
    +
    +
    + +

    + {{.i18n.Tr "settings.avatar"}} +

    +
    +
    + {{.CsrfTokenHtml}} + {{if not DisableGravatar}} +
    +
    + + +
    +
    +
    + + +
    + {{end}} + +
    +
    + + +
    +
    + +
    + + +
    + +
    + + {{$.i18n.Tr "settings.delete_current_avatar"}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/user/settings/repos.tmpl b/user/settings/repos.tmpl new file mode 100644 index 0000000..9a0ef1a --- /dev/null +++ b/user/settings/repos.tmpl @@ -0,0 +1,53 @@ +{{template "base/head" .}} +
    + {{template "user/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "settings.repos"}} +

    +
    + {{if .Repos}} +
    + {{range .Repos}} +
    +
    + {{if .IsPrivate}} + + {{else if .IsFork}} + + {{else if .IsMirror}} + + {{else}} + + {{end}} + {{$.Owner.Name}}/{{.Name}} + {{SizeFmt .Size}} + {{if .IsFork}} + {{$.i18n.Tr "repo.forked_from"}} + {{.BaseRepo.Owner.Name}}/{{.BaseRepo.Name}} + {{end}} +
    +
    + {{end}} +
    + {{else}} +
    + {{.i18n.Tr "settings.repos_none"}} +
    + {{end}} +
    +
    +
    + + +{{template "base/footer" .}} diff --git a/user/settings/security.tmpl b/user/settings/security.tmpl new file mode 100644 index 0000000..c2c99c7 --- /dev/null +++ b/user/settings/security.tmpl @@ -0,0 +1,15 @@ +{{template "base/head" .}} +
    + {{template "user/settings/navbar" .}} +
    + {{template "base/alert" .}} + {{template "user/settings/security_twofa" .}} + {{template "user/settings/security_u2f" .}} + {{template "user/settings/security_accountlinks" .}} + {{if .EnableOpenIDSignIn}} + {{template "user/settings/security_openid" .}} + {{end}} +
    +
    + +{{template "base/footer" .}} diff --git a/user/settings/security_accountlinks.tmpl b/user/settings/security_accountlinks.tmpl new file mode 100644 index 0000000..057a0f9 --- /dev/null +++ b/user/settings/security_accountlinks.tmpl @@ -0,0 +1,36 @@ +

    + {{.i18n.Tr "settings.manage_account_links"}} +

    +
    +
    +
    + {{.i18n.Tr "settings.manage_account_links_desc"}} +
    + {{if .AccountLinks}} + {{range $loginSource, $provider := .AccountLinks}} +
    +
    + +
    +
    + {{$provider}} + {{if $loginSource.IsActived}}{{$.i18n.Tr "settings.active"}}{{end}} +
    +
    + {{end}} + {{end}} +
    +
    + + diff --git a/user/settings/security_openid.tmpl b/user/settings/security_openid.tmpl new file mode 100644 index 0000000..a16501a --- /dev/null +++ b/user/settings/security_openid.tmpl @@ -0,0 +1,63 @@ +

    + {{.i18n.Tr "settings.manage_openid"}} +

    +
    +
    +
    + {{.i18n.Tr "settings.openid_desc"}} +
    + {{range .OpenIDs}} +
    +
    + +
    +
    +
    + {{$.CsrfTokenHtml}} + + {{if .Show}} + + {{else}} + + {{end}} + +
    +
    +
    + {{.URI}} +
    +
    + {{end}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    +
    + + diff --git a/user/settings/security_twofa.tmpl b/user/settings/security_twofa.tmpl new file mode 100644 index 0000000..138872d --- /dev/null +++ b/user/settings/security_twofa.tmpl @@ -0,0 +1,35 @@ +

    + {{.i18n.Tr "settings.twofa"}} +

    +
    +

    {{.i18n.Tr "settings.twofa_desc"}}

    + {{if .TwofaEnrolled}} +

    {{$.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}

    +
    + {{.CsrfTokenHtml}} +

    {{.i18n.Tr "settings.regenerate_scratch_token_desc"}}

    + +
    +
    + {{.CsrfTokenHtml}} +

    {{.i18n.Tr "settings.twofa_disable_note"}}

    +
    {{$.i18n.Tr "settings.twofa_disable"}}
    +
    + {{else}} +

    {{.i18n.Tr "settings.twofa_not_enrolled"}}

    + + {{end}} +
    + + diff --git a/user/settings/security_u2f.tmpl b/user/settings/security_u2f.tmpl new file mode 100644 index 0000000..4703f9d --- /dev/null +++ b/user/settings/security_u2f.tmpl @@ -0,0 +1,56 @@ +

    +{{.i18n.Tr "settings.u2f"}} +

    +
    +

    {{.i18n.Tr "settings.u2f_desc" | Str2html}}

    + {{if .TwofaEnrolled}} +
    + {{range .U2FRegistrations}} +
    +
    + +
    +
    + {{.Name}} +
    +
    + {{end}} +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    + {{else}} + {{.i18n.Tr "settings.u2f_require_twofa"}} + {{end}} +
    + + + +{{template "user/auth/u2f_error" .}} + + + diff --git a/user/settings/twofa_enroll.tmpl b/user/settings/twofa_enroll.tmpl new file mode 100644 index 0000000..0205532 --- /dev/null +++ b/user/settings/twofa_enroll.tmpl @@ -0,0 +1,29 @@ +{{template "base/head" .}} +
    + {{template "user/settings/navbar" .}} +
    + {{template "base/alert" .}} +

    + {{.i18n.Tr "settings.twofa_enroll"}} +

    +
    +

    {{.i18n.Tr "settings.scan_this_image"}}

    + {{.TwofaSecret}} +

    {{.i18n.Tr "settings.or_enter_secret" .TwofaSecret}} +

    {{.i18n.Tr "settings.then_enter_passcode"}} +

    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    +
    +
    +
    + +{{template "base/footer" .}}