diff --git a/admin/actions.tmpl b/admin/actions.tmpl
new file mode 100644
index 0000000..597863d
--- /dev/null
+++ b/admin/actions.tmpl
@@ -0,0 +1,10 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin actions")}}
+	<div class="admin-setting-content">
+	{{if eq .PageType "runners"}}
+		{{template "shared/actions/runner_list" .}}
+	{{end}}
+	{{if eq .PageType "variables"}}
+		{{template "shared/variables/variable_list" .}}
+	{{end}}
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/applications/list.tmpl b/admin/applications/list.tmpl
new file mode 100644
index 0000000..cbb66b1
--- /dev/null
+++ b/admin/applications/list.tmpl
@@ -0,0 +1,8 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+				{{ctx.Locale.Tr "settings.applications"}}
+		</h4>
+		{{template "user/settings/applications_oauth2_list" .}}
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/applications/oauth2_edit.tmpl b/admin/applications/oauth2_edit.tmpl
new file mode 100644
index 0000000..668bfe0
--- /dev/null
+++ b/admin/applications/oauth2_edit.tmpl
@@ -0,0 +1,6 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
+	<div class="admin-setting-content">
+
+		{{template "user/settings/applications_oauth2_edit_form" .}}
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/auth/edit.tmpl b/admin/auth/edit.tmpl
new file mode 100644
index 0000000..660f0d0
--- /dev/null
+++ b/admin/auth/edit.tmpl
@@ -0,0 +1,460 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit authentication")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.auths.edit"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="id" value="{{.Source.ID}}">
+				<div class="inline field">
+					<label>{{ctx.Locale.Tr "admin.auths.auth_type"}}</label>
+					<input type="hidden" id="auth_type" name="type" value="{{.Source.Type.Int}}">
+					<span>{{.Source.TypeName}}</span>
+				</div>
+				<div class="required inline field {{if .Err_Name}}error{{end}}">
+					<label for="auth_name">{{ctx.Locale.Tr "admin.auths.auth_name"}}</label>
+					<input id="auth_name" name="name" value="{{.Source.Name}}" autofocus required>
+				</div>
+
+				<!-- LDAP and DLDAP -->
+				{{if or .Source.IsLDAP .Source.IsDLDAP}}
+					{{$cfg:=.Source.Cfg}}
+					<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
+						<label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
+						<div class="ui selection security-protocol dropdown">
+							<input type="hidden" id="security_protocol" name="security_protocol" value="{{$cfg.SecurityProtocol.Int}}">
+							<div class="text">{{$cfg.SecurityProtocolName}}</div>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu">
+								{{range .SecurityProtocols}}
+									<div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+					<div class="required field">
+						<label for="host">{{ctx.Locale.Tr "admin.auths.host"}}</label>
+						<input id="host" name="host" value="{{$cfg.Host}}" placeholder="mydomain.com" required>
+					</div>
+					<div class="required field">
+						<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
+						<input id="port" name="port" value="{{$cfg.Port}}"  placeholder="636" required>
+					</div>
+					<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
+						<div class="ui checkbox">
+							<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
+							<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
+						</div>
+					</div>
+					{{if .Source.IsLDAP}}
+						<div class="field">
+							<label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
+							<input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="cn=Search,dc=mydomain,dc=com">
+						</div>
+						<div class="field">
+							<label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label>
+							<input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}">
+						</div>
+					{{end}}
+					<div class="{{if .Source.IsLDAP}}required{{end}} field">
+							<label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
+							<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}>
+					</div>
+					{{if .Source.IsDLDAP}}
+						<div class="required field">
+							<label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
+							<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com" required>
+						</div>
+					{{end}}
+					<div class="required field">
+						<label for="filter">{{ctx.Locale.Tr "admin.auths.filter"}}</label>
+						<input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" required>
+					</div>
+					<div class="field">
+						<label for="admin_filter">{{ctx.Locale.Tr "admin.auths.admin_filter"}}</label>
+						<input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}">
+					</div>
+					<div class="field">
+						<label for="restricted_filter">{{ctx.Locale.Tr "admin.auths.restricted_filter"}}</label>
+						<input id="restricted_filter" name="restricted_filter" value="{{$cfg.RestrictedFilter}}">
+						<p class="help">{{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}</p>
+					</div>
+					<div class="field">
+						<label for="attribute_username">{{ctx.Locale.Tr "admin.auths.attribute_username"}}</label>
+						<input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{ctx.Locale.Tr "admin.auths.attribute_username_placeholder"}}">
+					</div>
+					<div class="field">
+						<label for="attribute_name">{{ctx.Locale.Tr "admin.auths.attribute_name"}}</label>
+						<input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}">
+					</div>
+					<div class="field">
+						<label for="attribute_surname">{{ctx.Locale.Tr "admin.auths.attribute_surname"}}</label>
+						<input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}">
+					</div>
+					<div class="required field">
+						<label for="attribute_mail">{{ctx.Locale.Tr "admin.auths.attribute_mail"}}</label>
+						<input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="mail" required>
+					</div>
+					<div class="field">
+						<label for="attribute_ssh_public_key">{{ctx.Locale.Tr "admin.auths.attribute_ssh_public_key"}}</label>
+						<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="SshPublicKey">
+					</div>
+					<div class="field">
+						<label for="attribute_avatar">{{ctx.Locale.Tr "admin.auths.attribute_avatar"}}</label>
+						<input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto">
+					</div>
+
+					<!-- ldap group begin -->
+					<div class="inline field">
+						<div class="ui checkbox">
+							<label><strong>{{ctx.Locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label>
+							<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}>
+						</div>
+					</div>
+					<div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}tw-hidden{{end}}">
+						<div class="field">
+							<label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
+							<input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com">
+						</div>
+						<div class="field">
+							<label>{{ctx.Locale.Tr "admin.auths.group_attribute_list_users"}}</label>
+							<input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="memberUid">
+						</div>
+						<div class="field">
+							<label>{{ctx.Locale.Tr "admin.auths.user_attribute_in_group"}}</label>
+							<input name="user_uid" value="{{$cfg.UserUID}}" placeholder="uid">
+						</div>
+						<div class="field">
+							<label>{{ctx.Locale.Tr "admin.auths.verify_group_membership"}}</label>
+							<input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="(|(cn=gitea_users)(cn=admins))">
+						</div>
+						<div class="field">
+							<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team"}}</label>
+							<textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea>
+						</div>
+						<div class="ui checkbox">
+							<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team_removal"}}</label>
+							<input name="group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}>
+						</div>
+					</div>
+					<!-- ldap group end -->
+
+					{{if .Source.IsLDAP}}
+						<div class="inline field">
+							<div class="ui checkbox">
+								<label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
+								<input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}>
+							</div>
+						</div>
+						<div class="field required search-page-size{{if not $cfg.UsePagedSearch}} tw-hidden{{end}}">
+							<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
+							<input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}">
+						</div>
+						<div class="inline field">
+							<div class="ui checkbox">
+								<label><strong>{{ctx.Locale.Tr "admin.auths.attributes_in_bind"}}</strong></label>
+								<input name="attributes_in_bind" type="checkbox" {{if $cfg.AttributesInBind}}checked{{end}}>
+							</div>
+						</div>
+					{{end}}
+					<div class="optional field">
+						<div class="ui checkbox">
+							<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
+							<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}>
+							<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
+						</div>
+					</div>
+					<div class="inline field">
+						<div class="ui checkbox">
+							<label for="allow_deactivate_all"><strong>{{ctx.Locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label>
+							<input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if $cfg.AllowDeactivateAll}}checked{{end}}>
+						</div>
+					</div>
+				{{end}}
+
+				<!-- SMTP -->
+				{{if .Source.IsSMTP}}
+					{{$cfg:=.Source.Cfg}}
+					<div class="inline required field">
+						<label>{{ctx.Locale.Tr "admin.auths.smtp_auth"}}</label>
+						<div class="ui selection type dropdown">
+							<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required>
+							<div class="text">{{$cfg.Auth}}</div>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu">
+								{{range .SMTPAuths}}
+									<div class="item" data-value="{{.}}">{{.}}</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+					<div class="required field">
+						<label for="smtp_host">{{ctx.Locale.Tr "admin.auths.smtphost"}}</label>
+						<input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required>
+					</div>
+					<div class="required field">
+						<label for="smtp_port">{{ctx.Locale.Tr "admin.auths.smtpport"}}</label>
+						<input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required>
+					</div>
+					<div class="field">
+						<div class="ui checkbox">
+							<label for="force_smtps"><strong>{{ctx.Locale.Tr "admin.auths.force_smtps"}}</strong></label>
+							<input id="force_smtps" name="force_smtps" type="checkbox" {{if $cfg.ForceSMTPS}}checked{{end}}>
+						</div>
+						<p class="help">{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}</p>
+					</div>
+					<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
+						<div class="ui checkbox">
+							<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
+							<input name="skip_verify" type="checkbox" {{if $cfg.SkipVerify}}checked{{end}}>
+						</div>
+					</div>
+					<div class="field">
+						<label for="helo_hostname">{{ctx.Locale.Tr "admin.auths.helo_hostname"}}</label>
+						<input id="helo_hostname" name="helo_hostname" value="{{$cfg.HeloHostname}}">
+						<p class="help">{{ctx.Locale.Tr "admin.auths.helo_hostname_helper"}}</p>
+					</div>
+					<div class="inline field">
+						<div class="ui checkbox">
+							<label for="disable_helo"><strong>{{ctx.Locale.Tr "admin.auths.disable_helo"}}</strong></label>
+							<input id="disable_helo" name="disable_helo" type="checkbox" {{if $cfg.DisableHelo}}checked{{end}}>
+						</div>
+					</div>
+					<div class="field">
+						<label for="allowed_domains">{{ctx.Locale.Tr "admin.auths.allowed_domains"}}</label>
+						<input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}">
+						<p class="help">{{ctx.Locale.Tr "admin.auths.allowed_domains_helper"}}</p>
+					</div>
+					<div class="optional field">
+						<div class="ui checkbox">
+							<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
+							<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}>
+							<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
+						</div>
+					</div>
+				{{end}}
+
+				<!-- PAM -->
+				{{if .Source.IsPAM}}
+					{{$cfg:=.Source.Cfg}}
+					<div class="required field">
+						<label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label>
+						<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
+					</div>
+					<div class="field">
+						<label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label>
+						<input id="pam_email_domain" name="pam_email_domain" value="{{$cfg.EmailDomain}}">
+					</div>
+					<div class="optional field">
+						<div class="ui checkbox">
+							<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
+							<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}>
+							<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
+						</div>
+					</div>
+				{{end}}
+
+				<!-- OAuth2 -->
+				{{if .Source.IsOAuth2}}
+					{{$cfg:=.Source.Cfg}}
+					<div class="inline required field">
+						<label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label>
+						<div class="ui selection type dropdown">
+							<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{$cfg.Provider}}" required>
+							<div class="text">{{.CurrentOAuth2Provider.DisplayName}}</div>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu">
+								{{range .OAuth2Providers}}
+									<div class="item" data-value="{{.Name}}">{{.DisplayName}}</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+					<div class="required field">
+						<label for="oauth2_key">{{ctx.Locale.Tr "admin.auths.oauth2_clientID"}}</label>
+						<input id="oauth2_key" name="oauth2_key" value="{{$cfg.ClientID}}" required>
+					</div>
+					<div class="required field">
+						<label for="oauth2_secret">{{ctx.Locale.Tr "admin.auths.oauth2_clientSecret"}}</label>
+						<input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required>
+					</div>
+					<div class="optional field">
+						<label for="oauth2_icon_url">{{ctx.Locale.Tr "admin.auths.oauth2_icon_url"}}</label>
+						<input id="oauth2_icon_url" name="oauth2_icon_url" value="{{$cfg.IconURL}}">
+					</div>
+					<div class="open_id_connect_auto_discovery_url required field">
+						<label for="open_id_connect_auto_discovery_url">{{ctx.Locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label>
+						<input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{$cfg.OpenIDConnectAutoDiscoveryURL}}">
+					</div>
+					<div class="optional field">
+						<div class="ui checkbox">
+							<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
+							<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}>
+							<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
+						</div>
+					</div>
+					<div class="oauth2_use_custom_url inline field">
+						<div class="ui checkbox">
+							<label><strong>{{ctx.Locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label>
+							<input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox" {{if $cfg.CustomURLMapping}}checked{{end}}>
+						</div>
+					</div>
+					<div class="oauth2_use_custom_url_field oauth2_auth_url required field">
+						<label for="oauth2_auth_url">{{ctx.Locale.Tr "admin.auths.oauth2_authURL"}}</label>
+						<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.AuthURL}}{{end}}">
+					</div>
+					<div class="oauth2_use_custom_url_field oauth2_token_url required field">
+						<label for="oauth2_token_url">{{ctx.Locale.Tr "admin.auths.oauth2_tokenURL"}}</label>
+						<input id="oauth2_token_url" name="oauth2_token_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.TokenURL}}{{end}}">
+					</div>
+					<div class="oauth2_use_custom_url_field oauth2_profile_url required field">
+						<label for="oauth2_profile_url">{{ctx.Locale.Tr "admin.auths.oauth2_profileURL"}}</label>
+						<input id="oauth2_profile_url" name="oauth2_profile_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.ProfileURL}}{{end}}">
+					</div>
+					<div class="oauth2_use_custom_url_field oauth2_email_url required field">
+						<label for="oauth2_email_url">{{ctx.Locale.Tr "admin.auths.oauth2_emailURL"}}</label>
+						<input id="oauth2_email_url" name="oauth2_email_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.EmailURL}}{{end}}">
+					</div>
+					<div class="oauth2_use_custom_url_field oauth2_tenant required field">
+						<label for="oauth2_tenant">{{ctx.Locale.Tr "admin.auths.oauth2_tenant"}}</label>
+						<input id="oauth2_tenant" name="oauth2_tenant" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.Tenant}}{{end}}">
+					</div>
+
+					{{range .OAuth2Providers}}{{if .CustomURLSettings}}
+						<input id="{{.Name}}_customURLSettings" type="hidden" data-required="{{.CustomURLSettings.Required}}" data-available="true">
+						<input id="{{.Name}}_token_url" value="{{.CustomURLSettings.TokenURL.Value}}" data-available="{{.CustomURLSettings.TokenURL.Available}}" data-required="{{.CustomURLSettings.TokenURL.Required}}" type="hidden">
+						<input id="{{.Name}}_auth_url" value="{{.CustomURLSettings.AuthURL.Value}}" data-available="{{.CustomURLSettings.AuthURL.Available}}" data-required="{{.CustomURLSettings.AuthURL.Required}}" type="hidden">
+						<input id="{{.Name}}_profile_url" value="{{.CustomURLSettings.ProfileURL.Value}}" data-available="{{.CustomURLSettings.ProfileURL.Available}}" data-required="{{.CustomURLSettings.ProfileURL.Required}}" type="hidden">
+						<input id="{{.Name}}_email_url" value="{{.CustomURLSettings.EmailURL.Value}}" data-available="{{.CustomURLSettings.EmailURL.Available}}" data-required="{{.CustomURLSettings.EmailURL.Required}}" type="hidden">
+						<input id="{{.Name}}_tenant" value="{{.CustomURLSettings.Tenant.Value}}" data-available="{{.CustomURLSettings.Tenant.Available}}" data-required="{{.CustomURLSettings.Tenant.Required}}" type="hidden">
+					{{end}}{{end}}
+
+					<div class="field">
+						<label for="oauth2_scopes">{{ctx.Locale.Tr "admin.auths.oauth2_scopes"}}</label>
+						<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{StringUtils.Join $cfg.Scopes ","}}{{end}}">
+					</div>
+					<div class="field">
+						<label for="oauth2_required_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
+						<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{$cfg.RequiredClaimName}}">
+						<p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p>
+					</div>
+					<div class="field">
+						<label for="oauth2_required_claim_value">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value"}}</label>
+						<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{$cfg.RequiredClaimValue}}">
+						<p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p>
+					</div>
+					<div class="field">
+						<label for="oauth2_group_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_group_claim_name"}}</label>
+						<input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{$cfg.GroupClaimName}}">
+					</div>
+					<div class="field">
+						<label for="oauth2_admin_group">{{ctx.Locale.Tr "admin.auths.oauth2_admin_group"}}</label>
+						<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{$cfg.AdminGroup}}">
+					</div>
+					<div class="field">
+						<label for="oauth2_restricted_group">{{ctx.Locale.Tr "admin.auths.oauth2_restricted_group"}}</label>
+						<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{$cfg.RestrictedGroup}}">
+					</div>
+					<div class="field">
+						<label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label>
+						<textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea>
+					</div>
+					<div class="ui checkbox">
+						<label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>
+						<input name="oauth2_group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}>
+					</div>
+				{{end}}
+
+				<!-- SSPI -->
+				{{if .Source.IsSSPI}}
+					{{$cfg:=.Source.Cfg}}
+					<div class="field">
+						<div class="ui checkbox">
+							<label for="sspi_auto_create_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>
+							<input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if $cfg.AutoCreateUsers}}checked{{end}}>
+							<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p>
+						</div>
+					</div>
+					<div class="field">
+						<div class="ui checkbox">
+							<label for="sspi_auto_activate_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label>
+							<input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if $cfg.AutoActivateUsers}}checked{{end}}>
+							<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p>
+						</div>
+					</div>
+					<div class="field">
+						<div class="ui checkbox">
+							<label for="sspi_strip_domain_names"><strong>{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label>
+							<input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if $cfg.StripDomainNames}}checked{{end}}>
+							<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p>
+						</div>
+					</div>
+					<div class="required field">
+						<label for="sspi_separator_replacement">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement"}}</label>
+						<input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{$cfg.SeparatorReplacement}}" required>
+						<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p>
+					</div>
+					<div class="field">
+						<label for="sspi_default_language">{{ctx.Locale.Tr "admin.auths.sspi_default_language"}}</label>
+						<div class="ui language selection dropdown" id="sspi_default_language">
+							<input name="sspi_default_language" type="hidden" value="{{$cfg.DefaultLanguage}}">
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="text">{{range .AllLangs}}{{if eq $cfg.DefaultLanguage .Lang}}{{.Name}}{{end}}{{end}}</div>
+							<div class="menu">
+								<div class="item{{if not $.SSPIDefaultLanguage}} active selected{{end}}" data-value="">-</div>
+							{{range .AllLangs}}
+								<div class="item{{if eq $cfg.DefaultLanguage .Lang}} active selected{{end}}" data-value="{{.Lang}}">{{.Name}}</div>
+							{{end}}
+							</div>
+						</div>
+						<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_default_language_helper"}}</p>
+					</div>
+				{{end}}
+				{{if (or .Source.IsLDAP .Source.IsOAuth2)}}
+					<div class="inline field">
+						<div class="ui checkbox">
+							<label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label>
+							<input name="is_sync_enabled" type="checkbox" {{if .Source.IsSyncEnabled}}checked{{end}}>
+						</div>
+					</div>
+				{{end}}
+				<div class="inline field">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.auths.activated"}}</strong></label>
+						<input name="is_active" type="checkbox" {{if .Source.IsActive}}checked{{end}}>
+					</div>
+				</div>
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "admin.auths.update"}}</button>
+					<button class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{ctx.Locale.Tr "admin.auths.delete"}}</button>
+				</div>
+			</form>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.auths.tips"}}
+		</h4>
+		<div class="ui attached segment">
+			<h5>GMail Settings:</h5>
+			<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
+
+			<h5 class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:</h5>
+			<p class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p>
+		</div>
+	</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "admin.auths.delete_auth_title"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "admin.auths.delete_auth_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/auth/list.tmpl b/admin/auth/list.tmpl
new file mode 100644
index 0000000..7931014
--- /dev/null
+++ b/admin/auth/list.tmpl
@@ -0,0 +1,38 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin authentication")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.auths.auth_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
+			<div class="ui right">
+				<a class="ui primary tiny button" href="{{AppSubUrl}}/-/admin/auths/new">{{ctx.Locale.Tr "admin.auths.new"}}</a>
+			</div>
+		</h4>
+		<div class="ui attached table segment">
+			<table class="ui very basic striped table unstackable">
+				<thead>
+					<tr>
+						<th>ID</th>
+						<th>{{ctx.Locale.Tr "admin.auths.name"}}</th>
+						<th>{{ctx.Locale.Tr "admin.auths.type"}}</th>
+						<th>{{ctx.Locale.Tr "admin.auths.enabled"}}</th>
+						<th>{{ctx.Locale.Tr "admin.auths.updated"}}</th>
+						<th>{{ctx.Locale.Tr "admin.users.created"}}</th>
+						<th>{{ctx.Locale.Tr "admin.users.edit"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .Sources}}
+						<tr>
+							<td>{{.ID}}</td>
+							<td><a href="{{AppSubUrl}}/-/admin/auths/{{.ID}}">{{.Name}}</a></td>
+							<td>{{.TypeName}}</td>
+							<td>{{svg (Iif .IsActive "octicon-check" "octicon-x")}}</td>
+							<td>{{DateUtils.AbsoluteShort .UpdatedUnix}}</td>
+							<td>{{DateUtils.AbsoluteShort .CreatedUnix}}</td>
+							<td><a href="{{AppSubUrl}}/-/admin/auths/{{.ID}}">{{svg "octicon-pencil"}}</a></td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/auth/new.tmpl b/admin/auth/new.tmpl
new file mode 100644
index 0000000..be4995c
--- /dev/null
+++ b/admin/auth/new.tmpl
@@ -0,0 +1,122 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new authentication")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.auths.new"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<!-- Types and name -->
+				<div class="inline required field {{if .Err_Type}}error{{end}}">
+					<label>{{ctx.Locale.Tr "admin.auths.auth_type"}}</label>
+					<div class="ui selection type dropdown">
+						<input type="hidden" id="auth_type" name="type" value="{{.type}}">
+						<div class="text">{{.CurrentTypeName}}</div>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu">
+							{{range .AuthSources}}
+								<div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
+							{{end}}
+						</div>
+					</div>
+				</div>
+				<div class="required inline field {{if .Err_Name}}error{{end}}">
+					<label for="auth_name">{{ctx.Locale.Tr "admin.auths.auth_name"}}</label>
+					<input id="auth_name" name="name" value="{{.name}}" autofocus required>
+				</div>
+
+				<!-- LDAP and DLDAP -->
+				{{template "admin/auth/source/ldap" .}}
+
+				<!-- SMTP -->
+				{{template "admin/auth/source/smtp" .}}
+
+				<!-- PAM -->
+				<div class="pam required field {{if not (eq .type 4)}}tw-hidden{{end}}">
+					<label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label>
+					<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}">
+					<label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label>
+					<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
+				</div>
+				<div class="pam optional field {{if not (eq .type 4)}}tw-hidden{{end}}">
+					<div class="ui checkbox">
+						<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
+						<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
+						<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
+					</div>
+				</div>
+
+				<!-- OAuth2 -->
+				{{template "admin/auth/source/oauth" .}}
+
+				<!-- SSPI -->
+				{{template "admin/auth/source/sspi" .}}
+
+				<div class="ldap field">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.auths.attributes_in_bind"}}</strong></label>
+						<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
+					</div>
+				</div>
+				<div class="oauth2 ldap inline field {{if not (or (eq .type 2) (eq .type 6))}}tw-hidden{{end}}">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label>
+						<input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.auths.activated"}}</strong></label>
+						<input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}>
+					</div>
+				</div>
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "admin.auths.new"}}</button>
+				</div>
+			</form>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.auths.tips"}}
+		</h4>
+		<div class="ui attached segment">
+			<h5>GMail Settings:</h5>
+			<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
+
+			<h5 class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:</h5>
+			<p class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p>
+
+			<h5 class="ui top attached header">{{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}</h5>
+			<div class="ui attached segment">
+				<li>Bitbucket</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.bitbucket" "https://bitbucket.org/account/user/{your-username}/oauth-consumers/new"}}</span>
+				<li>Dropbox</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.dropbox" "https://www.dropbox.com/developers/apps"}}</span>
+				<li>Facebook</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.facebook" "https://developers.facebook.com/apps"}}</span>
+				<li>GitHub</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.github" "https://github.com/settings/applications/new"}}</span>
+				<li>GitLab</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.gitlab_new" "https://gitlab.com/-/profile/applications"}}</span>
+				<li>Google</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.google_plus" "https://console.developers.google.com/"}}</span>
+				<li>OpenID Connect</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.openid_connect"}}</span>
+				<li>Twitter</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.twitter" "https://dev.twitter.com/apps"}}</span>
+				<li>Discord</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.discord" "https://discordapp.com/developers/applications/me"}}</span>
+				<li>Gitea</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.gitea" "https://docs.gitea.com/development/oauth2-provider"}}</span>
+				<li>Nextcloud</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.nextcloud"}}</span>
+				<li>Yandex</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.yandex" "https://oauth.yandex.com/client/new"}}</span>
+				<li>Mastodon</li>
+				<span>{{ctx.Locale.Tr "admin.auths.tip.mastodon"}}</span>
+			</div>
+		</div>
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/auth/source/ldap.tmpl b/admin/auth/source/ldap.tmpl
new file mode 100644
index 0000000..9754aed
--- /dev/null
+++ b/admin/auth/source/ldap.tmpl
@@ -0,0 +1,141 @@
+<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}tw-hidden{{end}}">
+	<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
+		<label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
+		<div class="ui selection security-protocol dropdown">
+			<input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}">
+			<div class="text">{{.CurrentSecurityProtocol}}</div>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				{{range .SecurityProtocols}}
+					<div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
+				{{end}}
+			</div>
+		</div>
+	</div>
+	<div class="required field">
+		<label for="host">{{ctx.Locale.Tr "admin.auths.host"}}</label>
+		<input id="host" name="host" value="{{.host}}" placeholder="mydomain.com">
+	</div>
+	<div class="required field">
+		<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
+		<input id="port" name="port" value="{{.port}}"  placeholder="636">
+	</div>
+	<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
+		<div class="ui checkbox">
+			<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
+			<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
+		</div>
+	</div>
+	<div class="ldap field {{if not (eq .type 2)}}tw-hidden{{end}}">
+		<label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
+		<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
+	</div>
+	<div class="ldap field {{if not (eq .type 2)}}tw-hidden{{end}}">
+		<label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label>
+		<input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
+	</div>
+	<div class="binddnrequired {{if (eq .type 2)}}required{{end}} field">
+		<label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
+		<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
+	</div>
+	<div class="dldap required field {{if not (eq .type 5)}}tw-hidden{{end}}">
+		<label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
+		<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
+	</div>
+	<div class="required field">
+		<label for="filter">{{ctx.Locale.Tr "admin.auths.filter"}}</label>
+		<input id="filter" name="filter" value="{{.filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))">
+	</div>
+	<div class="field">
+		<label for="admin_filter">{{ctx.Locale.Tr "admin.auths.admin_filter"}}</label>
+		<input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
+	</div>
+	<div class="field">
+		<label for="restricted_filter">{{ctx.Locale.Tr "admin.auths.restricted_filter"}}</label>
+		<input id="restricted_filter" name="restricted_filter" value="{{.restricted_filter}}">
+		<p class="help">{{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}</p>
+	</div>
+	<div class="field">
+		<label for="attribute_username">{{ctx.Locale.Tr "admin.auths.attribute_username"}}</label>
+		<input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{ctx.Locale.Tr "admin.auths.attribute_username_placeholder"}}">
+	</div>
+	<div class="field">
+		<label for="attribute_name">{{ctx.Locale.Tr "admin.auths.attribute_name"}}</label>
+		<input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
+	</div>
+	<div class="field">
+		<label for="attribute_surname">{{ctx.Locale.Tr "admin.auths.attribute_surname"}}</label>
+		<input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
+	</div>
+	<div class="required field">
+		<label for="attribute_mail">{{ctx.Locale.Tr "admin.auths.attribute_mail"}}</label>
+		<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="mail">
+	</div>
+	<div class="field">
+		<label for="attribute_ssh_public_key">{{ctx.Locale.Tr "admin.auths.attribute_ssh_public_key"}}</label>
+		<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="SshPublicKey">
+	</div>
+	<div class="field">
+		<label for="attribute_avatar">{{ctx.Locale.Tr "admin.auths.attribute_avatar"}}</label>
+		<input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="jpegPhoto">
+	</div>
+
+	<!-- ldap group begin -->
+	<div class="inline field">
+		<div class="ui checkbox">
+			<label><strong>{{ctx.Locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label>
+			<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if .groups_enabled}}checked{{end}}>
+		</div>
+	</div>
+	<div id="ldap-group-options" class="ui segment secondary">
+		<div class="field">
+			<label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
+			<input name="group_dn" value="{{.group_dn}}" placeholder="ou=group,dc=mydomain,dc=com">
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "admin.auths.group_attribute_list_users"}}</label>
+			<input name="group_member_uid" value="{{.group_member_uid}}" placeholder="memberUid">
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "admin.auths.user_attribute_in_group"}}</label>
+			<input name="user_uid" value="{{.user_uid}}" placeholder="uid">
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "admin.auths.verify_group_membership"}}</label>
+			<input name="group_filter" value="{{.group_filter}}" placeholder="(|(cn=gitea_users)(cn=admins))">
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team"}}</label>
+			<textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.group_team_map}}</textarea>
+		</div>
+		<div class="ui checkbox">
+			<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team_removal"}}</label>
+			<input name="group_team_map_removal" type="checkbox" {{if .group_team_map_removal}}checked{{end}}>
+		</div>
+	</div>
+	<!-- ldap group end -->
+
+	<div class="ldap inline field {{if not (eq .type 2)}}tw-hidden{{end}}">
+		<div class="ui checkbox">
+			<label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
+			<input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
+		</div>
+	</div>
+	<div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}tw-hidden{{end}}">
+		<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
+		<input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
+	</div>
+	<div class="optional field">
+		<div class="ui checkbox">
+			<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
+			<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
+			<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
+		</div>
+	</div>
+	<div class="inline field">
+		<div class="ui checkbox">
+			<label for="allow_deactivate_all"><strong>{{ctx.Locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label>
+			<input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if .allow_deactivate_all}}checked{{end}}>
+		</div>
+	</div>
+</div>
diff --git a/admin/auth/source/oauth.tmpl b/admin/auth/source/oauth.tmpl
new file mode 100644
index 0000000..f02c5bd
--- /dev/null
+++ b/admin/auth/source/oauth.tmpl
@@ -0,0 +1,109 @@
+<div class="oauth2 field {{if not (eq .type 6)}}tw-hidden{{end}}">
+	<div class="inline required field">
+		<label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label>
+		<div class="ui selection type dropdown">
+			<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
+			<div class="text">{{.oauth2_provider}}</div>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				{{range .OAuth2Providers}}
+					<div class="item" data-value="{{.Name}}">{{.DisplayName}}</div>
+				{{end}}
+			</div>
+		</div>
+	</div>
+	<div class="required field">
+		<label for="oauth2_key">{{ctx.Locale.Tr "admin.auths.oauth2_clientID"}}</label>
+		<input id="oauth2_key" name="oauth2_key" value="{{.oauth2_key}}">
+	</div>
+	<div class="required field">
+		<label for="oauth2_secret">{{ctx.Locale.Tr "admin.auths.oauth2_clientSecret"}}</label>
+		<input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}">
+	</div>
+	<div class="optional field">
+		<label for="oauth2_icon_url">{{ctx.Locale.Tr "admin.auths.oauth2_icon_url"}}</label>
+		<input id="oauth2_icon_url" name="oauth2_icon_url" value="{{.oauth2_icon_url}}">
+	</div>
+	<div class="open_id_connect_auto_discovery_url required field{{if .Err_DiscoveryURL}} error{{end}}">
+		<label for="open_id_connect_auto_discovery_url">{{ctx.Locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label>
+		<input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{.open_id_connect_auto_discovery_url}}">
+	</div>
+	<div class="optional field">
+		<div class="ui checkbox">
+			<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
+			<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
+			<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
+		</div>
+	</div>
+
+	<div class="oauth2_use_custom_url inline field">
+		<div class="ui checkbox">
+			<label><strong>{{ctx.Locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label>
+			<input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox">
+		</div>
+	</div>
+	<div class="oauth2_use_custom_url_field oauth2_auth_url required field">
+		<label for="oauth2_auth_url">{{ctx.Locale.Tr "admin.auths.oauth2_authURL"}}</label>
+		<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{.oauth2_auth_url}}">
+	</div>
+	<div class="oauth2_use_custom_url_field oauth2_token_url required field">
+		<label for="oauth2_token_url">{{ctx.Locale.Tr "admin.auths.oauth2_tokenURL"}}</label>
+		<input id="oauth2_token_url" name="oauth2_token_url" value="{{.oauth2_token_url}}">
+	</div>
+	<div class="oauth2_use_custom_url_field oauth2_profile_url required field">
+		<label for="oauth2_profile_url">{{ctx.Locale.Tr "admin.auths.oauth2_profileURL"}}</label>
+		<input id="oauth2_profile_url" name="oauth2_profile_url" value="{{.oauth2_profile_url}}">
+	</div>
+	<div class="oauth2_use_custom_url_field oauth2_email_url required field">
+		<label for="oauth2_email_url">{{ctx.Locale.Tr "admin.auths.oauth2_emailURL"}}</label>
+		<input id="oauth2_email_url" name="oauth2_email_url" value="{{.oauth2_email_url}}">
+	</div>
+	<div class="oauth2_use_custom_url_field oauth2_tenant required field">
+		<label for="oauth2_tenant">{{ctx.Locale.Tr "admin.auths.oauth2_tenant"}}</label>
+		<input id="oauth2_tenant" name="oauth2_tenant" value="{{.oauth2_tenant}}">
+	</div>
+
+	{{range .OAuth2Providers}}{{if .CustomURLSettings}}
+		<input id="{{.Name}}_customURLSettings" type="hidden" data-required="{{.CustomURLSettings.Required}}" data-available="true">
+		<input id="{{.Name}}_token_url" value="{{.CustomURLSettings.TokenURL.Value}}" data-available="{{.CustomURLSettings.TokenURL.Available}}" data-required="{{.CustomURLSettings.TokenURL.Required}}" type="hidden">
+		<input id="{{.Name}}_auth_url" value="{{.CustomURLSettings.AuthURL.Value}}" data-available="{{.CustomURLSettings.AuthURL.Available}}" data-required="{{.CustomURLSettings.AuthURL.Required}}" type="hidden">
+		<input id="{{.Name}}_profile_url" value="{{.CustomURLSettings.ProfileURL.Value}}" data-available="{{.CustomURLSettings.ProfileURL.Available}}" data-required="{{.CustomURLSettings.ProfileURL.Required}}" type="hidden">
+		<input id="{{.Name}}_email_url" value="{{.CustomURLSettings.EmailURL.Value}}" data-available="{{.CustomURLSettings.EmailURL.Available}}" data-required="{{.CustomURLSettings.EmailURL.Required}}" type="hidden">
+		<input id="{{.Name}}_tenant" value="{{.CustomURLSettings.Tenant.Value}}" data-available="{{.CustomURLSettings.Tenant.Available}}" data-required="{{.CustomURLSettings.Tenant.Required}}" type="hidden">
+	{{end}}{{end}}
+
+	<div class="field">
+		<label for="oauth2_scopes">{{ctx.Locale.Tr "admin.auths.oauth2_scopes"}}</label>
+		<input id="oauth2_scopes" name="oauth2_scopes" value="{{.oauth2_scopes}}">
+	</div>
+	<div class="field">
+		<label for="oauth2_required_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
+		<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{.oauth2_required_claim_name}}">
+		<p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p>
+	</div>
+	<div class="field">
+		<label for="oauth2_required_claim_value">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value"}}</label>
+		<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{.oauth2_required_claim_value}}">
+		<p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p>
+	</div>
+	<div class="field">
+		<label for="oauth2_group_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_group_claim_name"}}</label>
+		<input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{.oauth2_group_claim_name}}">
+	</div>
+	<div class="field">
+		<label for="oauth2_admin_group">{{ctx.Locale.Tr "admin.auths.oauth2_admin_group"}}</label>
+		<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{.oauth2_admin_group}}">
+	</div>
+	<div class="field">
+		<label for="oauth2_restricted_group">{{ctx.Locale.Tr "admin.auths.oauth2_restricted_group"}}</label>
+		<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{.oauth2_restricted_group}}">
+	</div>
+	<div class="field">
+		<label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label>
+		<textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.oauth2_group_team_map}}</textarea>
+	</div>
+	<div class="ui checkbox">
+		<label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>
+		<input name="oauth2_group_team_map_removal" type="checkbox" {{if .oauth2_group_team_map_removal}}checked{{end}}>
+	</div>
+</div>
diff --git a/admin/auth/source/smtp.tmpl b/admin/auth/source/smtp.tmpl
new file mode 100644
index 0000000..31195ac
--- /dev/null
+++ b/admin/auth/source/smtp.tmpl
@@ -0,0 +1,59 @@
+<div class="smtp field {{if not (eq .type 3)}}tw-hidden{{end}}">
+	<div class="inline required field">
+		<label>{{ctx.Locale.Tr "admin.auths.smtp_auth"}}</label>
+		<div class="ui selection type dropdown">
+			<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{.smtp_auth}}">
+			<div class="text">{{.smtp_auth}}</div>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				{{range .SMTPAuths}}
+					<div class="item" data-value="{{.}}">{{.}}</div>
+				{{end}}
+			</div>
+		</div>
+	</div>
+	<div class="required field">
+		<label for="smtp_host">{{ctx.Locale.Tr "admin.auths.smtphost"}}</label>
+		<input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
+	</div>
+	<div class="required field">
+		<label for="smtp_port">{{ctx.Locale.Tr "admin.auths.smtpport"}}</label>
+		<input id="smtp_port" name="smtp_port" value="{{.smtp_port}}">
+	</div>
+	<div class="inline field">
+		<div class="ui checkbox">
+			<label for="force_smtps"><strong>{{ctx.Locale.Tr "admin.auths.force_smtps"}}</strong></label>
+			<input id="force_smtps" name="force_smtps" type="checkbox" {{if .force_smtps}}checked{{end}}>
+			<p class="help">{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}</p>
+		</div>
+	</div>
+	<div class="inline field">
+		<div class="ui checkbox">
+			<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
+			<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
+		</div>
+	</div>
+	<div class="field">
+		<label for="helo_hostname">{{ctx.Locale.Tr "admin.auths.helo_hostname"}}</label>
+		<input id="helo_hostname" name="helo_hostname" value="{{.helo_hostname}}">
+		<p class="help">{{ctx.Locale.Tr "admin.auths.helo_hostname_helper"}}</p>
+	</div>
+	<div class="inline field">
+		<div class="ui checkbox">
+			<label for="disable_helo"><strong>{{ctx.Locale.Tr "admin.auths.disable_helo"}}</strong></label>
+			<input id="disable_helo" name="disable_helo" type="checkbox" {{if .disable_helo}}checked{{end}}>
+		</div>
+	</div>
+	<div class="field">
+		<label for="allowed_domains">{{ctx.Locale.Tr "admin.auths.allowed_domains"}}</label>
+		<input id="allowed_domains" name="allowed_domains" value="{{.allowed_domains}}">
+		<p class="help">{{ctx.Locale.Tr "admin.auths.allowed_domains_helper"}}</p>
+	</div>
+	<div class="optional field">
+		<div class="ui checkbox">
+			<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
+			<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
+			<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
+		</div>
+	</div>
+</div>
diff --git a/admin/auth/source/sspi.tmpl b/admin/auth/source/sspi.tmpl
new file mode 100644
index 0000000..6a3f00f
--- /dev/null
+++ b/admin/auth/source/sspi.tmpl
@@ -0,0 +1,43 @@
+<div class="sspi field {{if not (eq .type 7)}}tw-hidden{{end}}">
+	<div class="field">
+		<div class="ui checkbox">
+			<label for="sspi_auto_create_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>
+			<input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if .SSPIAutoCreateUsers}}checked{{end}}>
+			<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p>
+		</div>
+	</div>
+	<div class="field">
+		<div class="ui checkbox">
+			<label for="sspi_auto_activate_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label>
+			<input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if .SSPIAutoActivateUsers}}checked{{end}}>
+			<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p>
+		</div>
+	</div>
+	<div class="field">
+		<div class="ui checkbox">
+			<label for="sspi_strip_domain_names"><strong>{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label>
+			<input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if .SSPIStripDomainNames}}checked{{end}}>
+			<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p>
+		</div>
+	</div>
+	<div class="required field">
+		<label for="sspi_separator_replacement">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement"}}</label>
+		<input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{.SSPISeparatorReplacement}}">
+		<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p>
+	</div>
+	<div class="field">
+		<label for="sspi_default_language">{{ctx.Locale.Tr "admin.auths.sspi_default_language"}}</label>
+		<div class="ui language selection dropdown" id="sspi_default_language">
+			<input name="sspi_default_language" type="hidden" value="{{.SSPIDefaultLanguage}}">
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="text">{{range .AllLangs}}{{if eq $.SSPIDefaultLanguage .Lang}}{{.Name}}{{end}}{{end}}</div>
+			<div class="menu">
+				<div class="item{{if not $.SSPIDefaultLanguage}} active selected{{end}}" data-value="">-</div>
+			{{range .AllLangs}}
+				<div class="item{{if eq $.SSPIDefaultLanguage .Lang}} active selected{{end}}" data-value="{{.Lang}}">{{.Name}}</div>
+			{{end}}
+			</div>
+		</div>
+		<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_default_language_helper"}}</p>
+	</div>
+</div>
diff --git a/admin/config.tmpl b/admin/config.tmpl
new file mode 100644
index 0000000..88dadeb
--- /dev/null
+++ b/admin/config.tmpl
@@ -0,0 +1,351 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.server_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.app_name"}}</dt>
+				<dd>{{AppName}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.app_ver"}}</dt>
+				<dd>{{AppVer}}{{.AppBuiltWith}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.custom_conf"}}</dt>
+				<dd>{{.CustomConf}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.app_url"}}</dt>
+				<dd>{{.AppUrl}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.domain"}}</dt>
+				<dd>{{.Domain}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.offline_mode"}}</dt>
+				<dd>{{svg (Iif .OfflineMode "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.disable_router_log"}}</dt>
+				<dd>{{svg (Iif .DisableRouterLog "octicon-check" "octicon-x")}}</dd>
+
+				<div class="divider"></div>
+
+				<dt>{{ctx.Locale.Tr "admin.config.run_user"}}</dt>
+				<dd>{{.RunUser}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.run_mode"}}</dt>
+				<dd>{{.RunMode}}</dd>
+
+				<div class="divider"></div>
+
+				<dt>{{ctx.Locale.Tr "admin.config.git_version"}}</dt>
+				<dd>{{.GitVersion}}</dd>
+
+				<div class="divider"></div>
+
+				<dt>{{ctx.Locale.Tr "admin.config.app_data_path"}}</dt>
+				<dd>{{.AppDataPath}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.repo_root_path"}}</dt>
+				<dd>{{.RepoRootPath}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.custom_file_root_path"}}</dt>
+				<dd>{{.CustomRootPath}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.log_file_root_path"}}</dt>
+				<dd>{{.LogRootPath}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.script_type"}}</dt>
+				<dd>{{.ScriptType}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.reverse_auth_user"}}</dt>
+				<dd>{{.ReverseProxyAuthUser}}</dd>
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.ssh_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.ssh_enabled"}}</dt>
+				<dd>{{svg (Iif (not .SSH.Disabled) "octicon-check" "octicon-x")}}</dd>
+				{{if not .SSH.Disabled}}
+					<dt>{{ctx.Locale.Tr "admin.config.ssh_start_builtin_server"}}</dt>
+					<dd>{{svg (Iif .SSH.StartBuiltinServer "octicon-check" "octicon-x")}}</dd>
+					<dt>{{ctx.Locale.Tr "admin.config.ssh_domain"}}</dt>
+					<dd>{{.SSH.Domain}}</dd>
+					<dt>{{ctx.Locale.Tr "admin.config.ssh_port"}}</dt>
+					<dd>{{.SSH.Port}}</dd>
+					<dt>{{ctx.Locale.Tr "admin.config.ssh_listen_port"}}</dt>
+					<dd>{{.SSH.ListenPort}}</dd>
+
+					{{if not .SSH.StartBuiltinServer}}
+						<dt>{{ctx.Locale.Tr "admin.config.ssh_root_path"}}</dt>
+						<dd>{{.SSH.RootPath}}</dd>
+						<dt>{{ctx.Locale.Tr "admin.config.ssh_key_test_path"}}</dt>
+						<dd>{{.SSH.KeyTestPath}}</dd>
+						<dt>{{ctx.Locale.Tr "admin.config.ssh_keygen_path"}}</dt>
+						<dd>{{.SSH.KeygenPath}}</dd>
+						<dt>{{ctx.Locale.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
+						<dd>{{svg (Iif .SSH.MinimumKeySizeCheck "octicon-check" "octicon-x")}}</dd>
+						{{if .SSH.MinimumKeySizeCheck}}
+							<dt>{{ctx.Locale.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
+							<dd>{{.SSH.MinimumKeySizes}}</dd>
+						{{end}}
+					{{end}}
+				{{end}}
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.lfs_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.lfs_enabled"}}</dt>
+				<dd>{{svg (Iif .LFS.StartServer "octicon-check" "octicon-x")}}</dd>
+				{{if .LFS.StartServer}}
+					<dt>{{ctx.Locale.Tr "admin.config.lfs_content_path"}}</dt>
+					<dd>{{JsonUtils.EncodeToString .LFS.Storage.ToShadowCopy}}</dd>
+					<dt>{{ctx.Locale.Tr "admin.config.lfs_http_auth_expiry"}}</dt>
+					<dd>{{.LFS.HTTPAuthExpiry}}</dd>
+				{{end}}
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.db_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.db_type"}}</dt>
+				<dd>{{.DbCfg.Type}}</dd>
+				{{if not (eq .DbCfg.Type "sqlite3")}}
+					<dt>{{ctx.Locale.Tr "admin.config.db_host"}}</dt>
+					<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
+					<dt>{{ctx.Locale.Tr "admin.config.db_name"}}</dt>
+					<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
+					<dt>{{ctx.Locale.Tr "admin.config.db_user"}}</dt>
+					<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
+				{{end}}
+				{{if eq .DbCfg.Type "postgres"}}
+					<dt>{{ctx.Locale.Tr "admin.config.db_schema"}}</dt>
+					<dd>{{if .DbCfg.Schema}}{{.DbCfg.Schema}}{{else}}-{{end}}</dd>
+					<dt>{{ctx.Locale.Tr "admin.config.db_ssl_mode"}}</dt>
+					<dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}</dd>
+				{{end}}
+				{{if eq .DbCfg.Type "sqlite3"}}
+					<dt>{{ctx.Locale.Tr "admin.config.db_path"}}</dt>
+					<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}</dd>
+				{{end}}
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.service_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.register_email_confirm"}}</dt>
+				<dd>{{svg (Iif .Service.RegisterEmailConfirm "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.disable_register"}}</dt>
+				<dd>{{svg (Iif .Service.DisableRegistration "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.allow_only_internal_registration"}}</dt>
+				<dd>{{svg (Iif .Service.AllowOnlyInternalRegistration "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.allow_only_external_registration"}}</dt>
+				<dd>{{svg (Iif .Service.AllowOnlyExternalRegistration "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.show_registration_button"}}</dt>
+				<dd>{{svg (Iif .Service.ShowRegistrationButton "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.enable_openid_signup"}}</dt>
+				<dd>{{svg (Iif .Service.EnableOpenIDSignUp "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.enable_openid_signin"}}</dt>
+				<dd>{{svg (Iif .Service.EnableOpenIDSignIn "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.require_sign_in_view"}}</dt>
+				<dd>{{svg (Iif .Service.RequireSignInViewStrict "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.mail_notify"}}</dt>
+				<dd>{{svg (Iif .Service.EnableNotifyMail "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.enable_captcha"}}</dt>
+				<dd>{{svg (Iif .Service.EnableCaptcha "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.default_keep_email_private"}}</dt>
+				<dd>{{svg (Iif .Service.DefaultKeepEmailPrivate "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.default_allow_create_organization"}}</dt>
+				<dd>{{svg (Iif .Service.DefaultAllowCreateOrganization "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.enable_timetracking"}}</dt>
+				<dd>{{svg (Iif .Service.EnableTimetracking "octicon-check" "octicon-x")}}</dd>
+				{{if .Service.EnableTimetracking}}
+					<dt>{{ctx.Locale.Tr "admin.config.default_enable_timetracking"}}</dt>
+					<dd>{{svg (Iif .Service.DefaultEnableTimetracking "octicon-check" "octicon-x")}}</dd>
+					<dt>{{ctx.Locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt>
+					<dd>{{svg (Iif .Service.DefaultAllowOnlyContributorsToTrackTime "octicon-check" "octicon-x")}}</dd>
+				{{end}}
+				<dt>{{ctx.Locale.Tr "admin.config.default_visibility_organization"}}</dt>
+				<dd>{{.Service.DefaultOrgVisibility}}</dd>
+
+				<dt>{{ctx.Locale.Tr "admin.config.no_reply_address"}}</dt>
+				<dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.default_enable_dependencies"}}</dt>
+				<dd>{{svg (Iif .Service.DefaultEnableDependencies "octicon-check" "octicon-x")}}</dd>
+				<div class="divider"></div>
+				<dt>{{ctx.Locale.Tr "admin.config.active_code_lives"}}</dt>
+				<dd>{{.Service.ActiveCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.reset_password_code_lives"}}</dt>
+				<dd>{{.Service.ResetPwdCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}</dd>
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.webhook_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.queue_length"}}</dt>
+				<dd>{{.Webhook.QueueLength}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.deliver_timeout"}}</dt>
+				<dd>{{.Webhook.DeliverTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.skip_tls_verify"}}</dt>
+				<dd>{{svg (Iif .Webhook.SkipTLSVerify "octicon-check" "octicon-x")}}</dd>
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.mailer_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.mailer_enabled"}}</dt>
+				<dd>{{svg (Iif .MailerEnabled "octicon-check" "octicon-x")}}</dd>
+				{{if .MailerEnabled}}
+					<dt>{{ctx.Locale.Tr "admin.config.mailer_name"}}</dt>
+					<dd>{{.Mailer.Name}}</dd>
+					{{if eq .Mailer.Protocol "sendmail"}}
+						<dt>{{ctx.Locale.Tr "admin.config.mailer_use_sendmail"}}</dt>
+						<dd>{{svg "octicon-check"}}</dd>
+						<dt>{{ctx.Locale.Tr "admin.config.mailer_sendmail_path"}}</dt>
+						<dd>{{.Mailer.SendmailPath}}</dd>
+						<dt>{{ctx.Locale.Tr "admin.config.mailer_sendmail_args"}}</dt>
+						<dd>{{.Mailer.SendmailArgs}}</dd>
+						<dt>{{ctx.Locale.Tr "admin.config.mailer_sendmail_timeout"}}</dt>
+						<dd>{{.Mailer.SendmailTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+					{{else if eq .Mailer.Protocol "dummy"}}
+						<dt>{{ctx.Locale.Tr "admin.config.mailer_use_dummy"}}</dt>
+						<dd>{{svg "octicon-check"}}</dd>
+					{{else}}{{/* SMTP family */}}
+						<dt>{{ctx.Locale.Tr "admin.config.mailer_protocol"}}</dt>
+						<dd>{{.Mailer.Protocol}}</dd>
+						<dt>{{ctx.Locale.Tr "admin.config.mailer_enable_helo"}}</dt>
+						<dd>{{svg (Iif .Mailer.EnableHelo "octicon-check" "octicon-x")}}</dd>
+						<dt>{{ctx.Locale.Tr "admin.config.mailer_smtp_addr"}}</dt>
+						<dd>{{.Mailer.SMTPAddr}}</dd>
+						<dt>{{ctx.Locale.Tr "admin.config.mailer_smtp_port"}}</dt>
+						<dd>{{.Mailer.SMTPPort}}</dd>
+					{{end}}
+					<dt>{{ctx.Locale.Tr "admin.config.mailer_user"}}</dt>
+					<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd>
+					<div class="divider"></div>
+					<dt class="tw-py-1 tw-flex tw-items-center">{{ctx.Locale.Tr "admin.config.send_test_mail"}}</dt>
+					<dd class="tw-py-0">
+						<form class="ui form ignore-dirty" action="{{AppSubUrl}}/-/admin/config/test_mail" method="post">
+							{{.CsrfTokenHtml}}
+							<div class="ui tiny input">
+								<input type="email" name="email" placeholder="{{ctx.Locale.Tr "admin.config.test_email_placeholder"}}" size="29" required>
+							</div>
+							<button class="ui tiny primary button">{{ctx.Locale.Tr "admin.config.send_test_mail_submit"}}</button>
+						</form>
+					</dd>
+				{{end}}
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.cache_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.cache_adapter"}}</dt>
+				<dd>{{.CacheAdapter}}</dd>
+				{{if eq .CacheAdapter "memory"}}
+					<dt>{{ctx.Locale.Tr "admin.config.cache_interval"}}</dt>
+					<dd>{{.CacheInterval}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+				{{end}}
+				{{if .CacheConn}}
+					<dt>{{ctx.Locale.Tr "admin.config.cache_conn"}}</dt>
+					<dd><code>{{.CacheConn}}</code></dd>
+					<dt>{{ctx.Locale.Tr "admin.config.cache_item_ttl"}}</dt>
+					<dd><code>{{.CacheItemTTL}}</code></dd>
+				{{end}}
+				<div class="divider"></div>
+				<dt class="tw-py-1 tw-flex tw-items-center">{{ctx.Locale.Tr "admin.config.cache_test"}}</dt>
+				<dd class="tw-py-0">
+					<form class="ui form ignore-dirty" action="{{AppSubUrl}}/-/admin/config/test_cache" method="post">
+						{{.CsrfTokenHtml}}
+						<button class="ui tiny primary button">{{ctx.Locale.Tr "test"}}</button>
+					</form>
+				</dd>
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.session_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.session_provider"}}</dt>
+				<dd>{{.SessionConfig.Provider}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.provider_config"}}</dt>
+				<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
+				<dt>{{ctx.Locale.Tr "admin.config.cookie_name"}}</dt>
+				<dd>{{.SessionConfig.CookieName}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.gc_interval_time"}}</dt>
+				<dd>{{.SessionConfig.Gclifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.session_life_time"}}</dt>
+				<dd>{{.SessionConfig.Maxlifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.https_only"}}</dt>
+				<dd>{{svg (Iif .SessionConfig.Secure "octicon-check" "octicon-x")}}</dd>
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.git_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				<dt>{{ctx.Locale.Tr "admin.config.git_disable_diff_highlight"}}</dt>
+				<dd>{{svg (Iif .Git.DisableDiffHighlight "octicon-check" "octicon-x")}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.git_max_diff_lines"}}</dt>
+				<dd>{{.Git.MaxGitDiffLines}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.git_max_diff_line_characters"}}</dt>
+				<dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.git_max_diff_files"}}</dt>
+				<dd>{{.Git.MaxGitDiffFiles}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.git_gc_args"}}</dt>
+				<dd><code>{{.Git.GCArgs}}</code></dd>
+
+				<div class="divider"></div>
+
+				<dt>{{ctx.Locale.Tr "admin.config.git_migrate_timeout"}}</dt>
+				<dd>{{.Git.Timeout.Migrate}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.git_mirror_timeout"}}</dt>
+				<dd>{{.Git.Timeout.Mirror}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.git_clone_timeout"}}</dt>
+				<dd>{{.Git.Timeout.Clone}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.git_pull_timeout"}}</dt>
+				<dd>{{.Git.Timeout.Pull}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+				<dt>{{ctx.Locale.Tr "admin.config.git_gc_timeout"}}</dt>
+				<dd>{{.Git.Timeout.GC}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
+			</dl>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.config.log_config"}}
+		</h4>
+		<div class="ui attached table segment">
+			<dl class="admin-dl-horizontal">
+				{{if .Loggers.xorm.IsEnabled}}
+					<dt>{{ctx.Locale.Tr "admin.config.xorm_log_sql"}}</dt>
+					<dd>{{svg (Iif $.LogSQL "octicon-check" "octicon-x")}}</dd>
+				{{end}}
+
+				{{if .Loggers.access.IsEnabled}}
+					<dt>{{ctx.Locale.Tr "admin.config.access_log_template"}}</dt>
+					<dd><code>{{$.AccessLogTemplate}}</code></dd>
+				{{end}}
+
+				{{range $loggerName, $loggerDetail := .Loggers}}
+					<dt>{{ctx.Locale.Tr "admin.config.logger_name_fmt" $loggerName}}</dt>
+					{{if $loggerDetail.IsEnabled}}
+						<dd><pre class="tw-m-0">{{$loggerDetail.EventWriters | JsonUtils.EncodeToString | JsonUtils.PrettyIndent}}</pre></dd>
+					{{else}}
+						<dd>{{ctx.Locale.Tr "admin.config.disabled_logger"}}</dd>
+					{{end}}
+				{{end}}
+			</dl>
+		</div>
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/config_settings.tmpl b/admin/config_settings.tmpl
new file mode 100644
index 0000000..6b9bb82
--- /dev/null
+++ b/admin/config_settings.tmpl
@@ -0,0 +1,42 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "admin.config.picture_config"}}
+</h4>
+<div class="ui attached table segment">
+	<dl class="admin-dl-horizontal">
+		<dt>{{ctx.Locale.Tr "admin.config.disable_gravatar"}}</dt>
+		<dd>
+			<div class="ui toggle checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.config.disable_gravatar"}}">
+				<input type="checkbox" data-config-dyn-key="picture.disable_gravatar" {{if .SystemConfig.Picture.DisableGravatar.Value ctx}}checked{{end}}><label></label>
+			</div>
+		</dd>
+		<div class="divider"></div>
+		<dt>{{ctx.Locale.Tr "admin.config.enable_federated_avatar"}}</dt>
+		<dd>
+			<div class="ui toggle checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.config.enable_federated_avatar"}}">
+				<input type="checkbox" data-config-dyn-key="picture.enable_federated_avatar" {{if .SystemConfig.Picture.EnableFederatedAvatar.Value ctx}}checked{{end}}><label></label>
+			</div>
+		</dd>
+	</dl>
+</div>
+
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "repository"}}
+</h4>
+<div class="ui attached segment">
+	<form class="ui form form-fetch-action" method="post" action="{{AppSubUrl}}/-/admin/config?key={{.SystemConfig.Repository.OpenWithEditorApps.DynKey}}">
+		<div class="field">
+			<details>
+				<summary>{{ctx.Locale.Tr "admin.config.open_with_editor_app_help"}}</summary>
+				<pre class="tw-px-4">{{.DefaultOpenWithEditorAppsString}}</pre>
+			</details>
+		</div>
+		<div class="field">
+			<textarea name="value">{{(.SystemConfig.Repository.OpenWithEditorApps.Value ctx).ToTextareaString}}</textarea>
+		</div>
+		<div class="field">
+			<button class="ui primary button">{{ctx.Locale.Tr "save"}}</button>
+		</div>
+	</form>
+</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/cron.tmpl b/admin/cron.tmpl
new file mode 100644
index 0000000..309cbce
--- /dev/null
+++ b/admin/cron.tmpl
@@ -0,0 +1,39 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
+<div class="admin-setting-content">
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "admin.monitor.cron"}}
+	</h4>
+	<div class="ui attached table segment">
+		<form method="post" action="{{AppSubUrl}}/-/admin">
+			<table class="ui very basic striped table unstackable tw-mb-0">
+				<thead>
+					<tr>
+						<th></th>
+						<th>{{ctx.Locale.Tr "admin.monitor.name"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.schedule"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.next"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.previous"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.execute_times"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.last_execution_result"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .Entries}}
+						<tr>
+							<td><button type="submit" class="ui primary button" name="op" value="{{.Name}}" title="{{ctx.Locale.Tr "admin.dashboard.operation_run"}}">{{svg "octicon-triangle-right"}}</button></td>
+							<td>{{ctx.Locale.Tr (printf "admin.dashboard.%s" .Name)}}</td>
+							<td>{{.Spec}}</td>
+							<td>{{DateUtils.FullTime .Next}}</td>
+							<td>{{if gt .Prev.Year 1}}{{DateUtils.FullTime .Prev}}{{else}}-{{end}}</td>
+							<td>{{.ExecTimes}}</td>
+							<td {{if ne .Status ""}}data-tooltip-content="{{.FormatLastMessage ctx.Locale}}"{{end}} >{{if eq .Status ""}}—{{else}}{{svg (Iif (eq .Status "finished") "octicon-check" "octicon-x") 16}}{{end}}</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+			<input type="hidden" name="from" value="monitor">
+			{{.CsrfTokenHtml}}
+		</form>
+	</div>
+</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/dashboard.tmpl b/admin/dashboard.tmpl
new file mode 100644
index 0000000..af2349d
--- /dev/null
+++ b/admin/dashboard.tmpl
@@ -0,0 +1,86 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin dashboard")}}
+	<div class="admin-setting-content">
+		{{if .NeedUpdate}}
+			<div class="ui negative message flash-error">
+				<p>{{ctx.Locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer "https://blog.gitea.com"}}</p>
+			</div>
+		{{end}}
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.dashboard.maintenance_operations"}}
+		</h4>
+		<div class="ui attached table segment">
+			<form method="post" action="{{AppSubUrl}}/-/admin">
+				{{.CsrfTokenHtml}}
+				<table class="ui very basic table tw-mt-0 tw-px-4">
+					<tbody>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.delete_inactive_accounts"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_inactive_accounts">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.delete_repo_archives"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_repo_archives">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.delete_missing_repos"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_missing_repos">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.git_gc_repos"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						{{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}}
+							<tr>
+								<td>{{ctx.Locale.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
+								<td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+							</tr>
+							<tr>
+								<td>{{ctx.Locale.Tr "admin.dashboard.resync_all_sshprincipals"}}</td>
+								<td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+							</tr>
+						{{end}}
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.resync_all_hooks"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.reinit_missing_repos"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="reinit_missing_repos">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.sync_external_users"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="sync_external_users">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.repo_health_check"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="repo_health_check">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.delete_generated_repository_avatars"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_generated_repository_avatars">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.sync_repo_branches"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="sync_repo_branches">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+						<tr>
+							<td>{{ctx.Locale.Tr "admin.dashboard.sync_repo_tags"}}</td>
+							<td class="text right"><button type="submit" class="ui primary button" name="op" value="sync_repo_tags">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
+						</tr>
+					</tbody>
+				</table>
+			</form>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.dashboard.system_status"}}
+		</h4>
+		{{/* TODO: make these stats work in multi-server deployments, likely needs per-server stats in DB */}}
+		<div class="ui attached table segment">
+			<div class="no-loading-indicator tw-hidden"></div>
+			<div hx-get="{{$.Link}}/system_status" hx-swap="morph:innerHTML" hx-trigger="every 5s" hx-indicator=".no-loading-indicator">
+				{{template "admin/system_status" .}}
+			</div>
+		</div>
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/emails/list.tmpl b/admin/emails/list.tmpl
new file mode 100644
index 0000000..0dc1fb9
--- /dev/null
+++ b/admin/emails/list.tmpl
@@ -0,0 +1,101 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.emails.email_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
+		</h4>
+		<div class="ui attached segment">
+			<div class="ui secondary filter menu tw-items-center tw-mx-0">
+				<form class="ui form ignore-dirty tw-flex-1">
+					{{template "shared/search/combo" dict "Value" .Keyword}}
+				</form>
+				<!-- Sort -->
+				<div class="ui dropdown type jump item tw-mr-0">
+					<span class="text">
+						{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+					</span>
+					{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+					<div class="menu">
+						<a class="{{if or (eq .SortType "email") (not .SortType)}}active {{end}}item" href="?sort=email&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.email"}}</a>
+						<a class="{{if eq .SortType "reverseemail"}}active {{end}}item" href="?sort=reverseemail&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.email_reverse"}}</a>
+						<a class="{{if eq .SortType "username"}}active {{end}}item" href="?sort=username&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.name"}}</a>
+						<a class="{{if eq .SortType "reverseusername"}}active {{end}}item" href="?sort=reverseusername&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.name_reverse"}}</a>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="ui attached table segment">
+			<table class="ui very basic striped table unstackable">
+				<thead>
+					<tr>
+						<th data-sortt-asc="username" data-sortt-desc="reverseusername">
+							{{ctx.Locale.Tr "admin.users.name"}}
+							{{SortArrow "username" "reverseusername" $.SortType false}}
+						</th>
+						<th>{{ctx.Locale.Tr "admin.users.full_name"}}</th>
+						<th data-sortt-asc="email" data-sortt-desc="reverseemail" data-sortt-default="true">
+							{{ctx.Locale.Tr "email"}}
+							{{SortArrow "email" "reverseemail" $.SortType true}}
+						</th>
+						<th>{{ctx.Locale.Tr "admin.emails.primary"}}</th>
+						<th>{{ctx.Locale.Tr "admin.emails.activated"}}</th>
+						<th></th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .Emails}}
+						<tr>
+							<td><a href="{{AppSubUrl}}/{{.Name | PathEscape}}">{{.Name}}</a></td>
+							<td class="gt-ellipsis tw-max-w-48">{{.FullName}}</td>
+							<td class="gt-ellipsis tw-max-w-48">{{.Email}}</td>
+							<td>{{svg (Iif .IsPrimary "octicon-check" "octicon-x")}}</td>
+							<td>
+								{{if .CanChange}}
+									<a class="show-modal" href data-modal="#change-email-modal" data-modal-uid="{{.UID}}"
+										data-modal-email="{{.Email}}"
+										data-modal-primary="{{if .IsPrimary}}1{{else}}0{{end}}"
+										data-modal-activate="{{if .IsActivated}}0{{else}}1{{end}}">
+										{{svg (Iif .IsActivated "octicon-check" "octicon-x")}}
+									</a>
+								{{else}}
+									{{svg (Iif .IsActivated "octicon-check" "octicon-x")}}
+								{{end}}
+							</td>
+							<td>
+								<a class="link-action negative" href data-url="{{$.Link}}/delete?id={{.ID}}&uid={{.UID}}"
+									data-modal-confirm-header="{{ctx.Locale.Tr "admin.emails.delete"}}"
+									data-modal-confirm-content="{{ctx.Locale.Tr "admin.emails.delete_desc"}}"
+								>{{svg "octicon-trash"}}</a>
+							</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+
+		{{template "base/paginate" .}}
+
+		<div class="ui g-modal-confirm modal" id="change-email-modal">
+			<div class="header">
+				{{ctx.Locale.Tr "admin.emails.change_email_header"}}
+			</div>
+			<form class="content ui form" action="{{AppSubUrl}}/-/admin/emails/activate" method="post">
+				<p class="center">{{ctx.Locale.Tr "admin.emails.change_email_text"}}</p>
+
+				{{$.CsrfTokenHtml}}
+
+				<input type="hidden" name="sort" value="{{.SortType}}">
+				<input type="hidden" name="q" value="{{.Keyword}}">
+				<input type="hidden" name="is_primary" value="{{.IsPrimary}}">
+				<input type="hidden" name="is_activated" value="{{.IsActivated}}">
+
+				<input type="hidden" name="uid">
+				<input type="hidden" name="email">
+				<input type="hidden" name="primary">
+				<input type="hidden" name="activate">
+
+				{{template "base/modal_actions_confirm" .}}
+			</form>
+		</div>
+	</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/hook_new.tmpl b/admin/hook_new.tmpl
new file mode 100644
index 0000000..37dcc49
--- /dev/null
+++ b/admin/hook_new.tmpl
@@ -0,0 +1,13 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin settings new webhook")}}
+	<div class="admin-setting-content">
+		{{$CustomHeaderTitle := ctx.Locale.Tr "admin.defaulthooks.update_webhook"}}
+		{{if .PageIsAdminDefaultHooksNew}}
+			{{$CustomHeaderTitle = ctx.Locale.Tr "admin.defaulthooks.add_webhook"}}
+		{{else if .PageIsAdminSystemHooksNew}}
+			{{$CustomHeaderTitle = ctx.Locale.Tr "admin.systemhooks.add_webhook"}}
+		{{else if .Webhook.IsSystemWebhook}}
+			{{$CustomHeaderTitle = ctx.Locale.Tr "admin.systemhooks.update_webhook"}}
+		{{end}}
+		{{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}}
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/hooks.tmpl b/admin/hooks.tmpl
new file mode 100644
index 0000000..c77d27d
--- /dev/null
+++ b/admin/hooks.tmpl
@@ -0,0 +1,9 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin hooks")}}
+	<div class="admin-setting-content">
+
+		{{template "repo/settings/webhook/base_list" .SystemWebhooks}}
+		{{template "repo/settings/webhook/base_list" .DefaultWebhooks}}
+
+		{{template "repo/settings/webhook/delete_modal" .}}
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/layout_footer.tmpl b/admin/layout_footer.tmpl
new file mode 100644
index 0000000..8d6e564
--- /dev/null
+++ b/admin/layout_footer.tmpl
@@ -0,0 +1,11 @@
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+<div class="page-content">
+	<div class="admin-layout-right">
+		<div>
+		{{/* block: admin-setting-content */}}
+{{end}}
+
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/admin/layout_head.tmpl b/admin/layout_head.tmpl
new file mode 100644
index 0000000..7cc6624
--- /dev/null
+++ b/admin/layout_head.tmpl
@@ -0,0 +1,13 @@
+{{template "base/head" .ctxData}}
+<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}">
+	<div class="ui container fluid padded flex-container">
+		{{template "admin/navbar" .ctxData}}
+		<div class="flex-container-main">
+			{{template "base/alert" .ctxData}}
+			{{/* block: admin-setting-content */}}
+
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+		</div>
+	</div>
+</div>
+{{end}}
diff --git a/admin/navbar.tmpl b/admin/navbar.tmpl
new file mode 100644
index 0000000..4116357
--- /dev/null
+++ b/admin/navbar.tmpl
@@ -0,0 +1,116 @@
+<div class="flex-container-nav">
+	<div class="ui fluid vertical menu">
+		<div class="header item">{{ctx.Locale.Tr "admin.settings"}}</div>
+
+		<details class="item toggleable-item" {{if or .PageIsAdminDashboard .PageIsAdminSelfCheck}}open{{end}}>
+			<summary>{{ctx.Locale.Tr "admin.maintenance"}}</summary>
+			<div class="menu">
+				<a class="{{if .PageIsAdminDashboard}}active {{end}}item" href="{{AppSubUrl}}/-/admin">
+					{{ctx.Locale.Tr "admin.dashboard"}}
+				</a>
+				<a class="{{if .PageIsAdminSelfCheck}}active {{end}}item" href="{{AppSubUrl}}/-/admin/self_check">
+					{{ctx.Locale.Tr "admin.self_check"}}
+				</a>
+			</div>
+		</details>
+		<details class="item toggleable-item" {{if or .PageIsAdminUsers .PageIsAdminEmails .PageIsAdminOrganizations .PageIsAdminAuthentications}}open{{end}}>
+			<summary>{{ctx.Locale.Tr "admin.identity_access"}}</summary>
+			<div class="menu">
+				<a class="{{if .PageIsAdminAuthentications}}active {{end}}item" href="{{AppSubUrl}}/-/admin/auths">
+					{{ctx.Locale.Tr "admin.authentication"}}
+				</a>
+				<a class="{{if .PageIsAdminOrganizations}}active {{end}}item" href="{{AppSubUrl}}/-/admin/orgs">
+					{{ctx.Locale.Tr "admin.organizations"}}
+				</a>
+				<a class="{{if .PageIsAdminUsers}}active {{end}}item" href="{{AppSubUrl}}/-/admin/users">
+					{{ctx.Locale.Tr "admin.users"}}
+				</a>
+				<a class="{{if .PageIsAdminEmails}}active {{end}}item" href="{{AppSubUrl}}/-/admin/emails">
+					{{ctx.Locale.Tr "admin.emails"}}
+				</a>
+			</div>
+		</details>
+		<details class="item toggleable-item" {{if or .PageIsAdminRepositories (and .EnablePackages .PageIsAdminPackages)}}open{{end}}>
+			<summary>{{ctx.Locale.Tr "admin.assets"}}</summary>
+			<div class="menu">
+				{{if .EnablePackages}}
+					<a class="{{if .PageIsAdminPackages}}active {{end}}item" href="{{AppSubUrl}}/-/admin/packages">
+						{{ctx.Locale.Tr "packages.title"}}
+					</a>
+				{{end}}
+				<a class="{{if .PageIsAdminRepositories}}active {{end}}item" href="{{AppSubUrl}}/-/admin/repos">
+					{{ctx.Locale.Tr "admin.repositories"}}
+				</a>
+			</div>
+		</details>
+		<!-- Webhooks and OAuth can be both disabled here, so add this if statement to display different ui -->
+		{{if and (not DisableWebhooks) .EnableOAuth2}}
+			<details class="item toggleable-item" {{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks .PageIsAdminApplications}}open{{end}}>
+				<summary>{{ctx.Locale.Tr "admin.integrations"}}</summary>
+				<div class="menu">
+					<a class="{{if .PageIsAdminApplications}}active {{end}}item" href="{{AppSubUrl}}/-/admin/applications">
+						{{ctx.Locale.Tr "settings.applications"}}
+					</a>
+					<a class="{{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks}}active {{end}}item" href="{{AppSubUrl}}/-/admin/hooks">
+						{{ctx.Locale.Tr "admin.hooks"}}
+					</a>
+				</div>
+			</details>
+		{{else}}
+			{{if not DisableWebhooks}}
+			<a class="{{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks}}active {{end}}item" href="{{AppSubUrl}}/-/admin/hooks">
+				{{ctx.Locale.Tr "admin.hooks"}}
+			</a>
+			{{end}}
+			{{if .EnableOAuth2}}
+				<a class="{{if .PageIsAdminApplications}}active {{end}}item" href="{{AppSubUrl}}/-/admin/applications">
+					{{ctx.Locale.Tr "settings.applications"}}
+				</a>
+			{{end}}
+		{{end}}
+		{{if .EnableActions}}
+		<details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsVariables}}open{{end}}>
+			<summary>{{ctx.Locale.Tr "actions.actions"}}</summary>
+			<div class="menu">
+				<a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{AppSubUrl}}/-/admin/actions/runners">
+					{{ctx.Locale.Tr "actions.runners"}}
+				</a>
+				<a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{AppSubUrl}}/-/admin/actions/variables">
+					{{ctx.Locale.Tr "actions.variables"}}
+				</a>
+			</div>
+		</details>
+		{{end}}
+		<details class="item toggleable-item" {{if or .PageIsAdminConfig}}open{{end}}>
+			<summary>{{ctx.Locale.Tr "admin.config"}}</summary>
+			<div class="menu">
+				<a class="{{if .PageIsAdminConfigSummary}}active {{end}}item" href="{{AppSubUrl}}/-/admin/config">
+					{{ctx.Locale.Tr "admin.config_summary"}}
+				</a>
+				<a class="{{if .PageIsAdminConfigSettings}}active {{end}}item" href="{{AppSubUrl}}/-/admin/config/settings">
+					{{ctx.Locale.Tr "admin.config_settings"}}
+				</a>
+			</div>
+		</details>
+		<a class="{{if .PageIsAdminNotices}}active {{end}}item" href="{{AppSubUrl}}/-/admin/notices">
+			{{ctx.Locale.Tr "admin.notices"}}
+		</a>
+		<details class="item toggleable-item" {{if or .PageIsAdminMonitorStats .PageIsAdminMonitorCron .PageIsAdminMonitorQueue .PageIsAdminMonitorStacktrace}}open{{end}}>
+			<summary>{{ctx.Locale.Tr "admin.monitor"}}</summary>
+			<div class="menu">
+				<a class="{{if .PageIsAdminMonitorStats}}active {{end}}item" href="{{AppSubUrl}}/-/admin/monitor/stats">
+					{{ctx.Locale.Tr "admin.monitor.stats"}}
+				</a>
+				<a class="{{if .PageIsAdminMonitorCron}}active {{end}}item" href="{{AppSubUrl}}/-/admin/monitor/cron">
+					{{ctx.Locale.Tr "admin.monitor.cron"}}
+				</a>
+				<a class="{{if .PageIsAdminMonitorQueue}}active {{end}}item" href="{{AppSubUrl}}/-/admin/monitor/queue">
+					{{ctx.Locale.Tr "admin.monitor.queues"}}
+				</a>
+				<a class="{{if .PageIsAdminMonitorStacktrace}}active {{end}}item" href="{{AppSubUrl}}/-/admin/monitor/stacktrace">
+					{{ctx.Locale.Tr "admin.monitor.stacktrace"}}
+				</a>
+			</div>
+		</details>
+	</div>
+</div>
diff --git a/admin/notice.tmpl b/admin/notice.tmpl
new file mode 100644
index 0000000..fd475d7
--- /dev/null
+++ b/admin/notice.tmpl
@@ -0,0 +1,68 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin notice")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.notices.system_notice_list"}} ({{ctx.Locale.Tr "admin.total" .Total}})
+		</h4>
+		<table class="ui attached segment select selectable striped table unstackable g-table-auto-ellipsis">
+			<thead>
+				<tr>
+					<th></th>
+					<th>ID</th>
+					<th>{{ctx.Locale.Tr "admin.notices.type"}}</th>
+					<th>{{ctx.Locale.Tr "admin.notices.desc"}}</th>
+					<th>{{ctx.Locale.Tr "admin.users.created"}}</th>
+					<th>{{ctx.Locale.Tr "admin.notices.op"}}</th>
+				</tr>
+			</thead>
+			<tbody>
+				{{range .Notices}}
+					<tr>
+						<td><div class="ui checkbox tw-flex" data-id="{{.ID}}"><input type="checkbox"></div></td>
+						<td>{{.ID}}</td>
+						<td>{{ctx.Locale.Tr .TrStr}}</td>
+						<td class="view-detail auto-ellipsis tw-w-4/5"><span class="notice-description">{{.Description}}</span></td>
+						<td nowrap>{{DateUtils.AbsoluteShort .CreatedUnix}}</td>
+						<td class="view-detail"><a href="#">{{svg "octicon-note" 16}}</a></td>
+					</tr>
+				{{end}}
+			</tbody>
+			{{if .Notices}}
+				<tfoot>
+						<tr>
+							<th></th>
+							<th colspan="5">
+								<form class="tw-float-right" method="post" action="{{AppSubUrl}}/-/admin/notices/empty">
+									{{.CsrfTokenHtml}}
+									<button type="submit" class="ui red small button">{{ctx.Locale.Tr "admin.notices.delete_all"}}</button>
+								</form>
+								<div class="ui floating upward dropdown small button">{{/* TODO: Make this dropdown accessible */}}
+									<span class="text">{{ctx.Locale.Tr "admin.notices.operations"}}</span>
+									<div class="menu">
+										<div class="item select action" data-action="select-all">
+											{{ctx.Locale.Tr "admin.notices.select_all"}}
+										</div>
+										<div class="item select action" data-action="deselect-all">
+											{{ctx.Locale.Tr "admin.notices.deselect_all"}}
+										</div>
+										<div class="item select action" data-action="inverse">
+											{{ctx.Locale.Tr "admin.notices.inverse_selection"}}
+										</div>
+									</div>
+								</div>
+								<button class="ui small button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="?page={{.Page.Paginater.Current}}">
+									<span class="text">{{ctx.Locale.Tr "admin.notices.delete_selected"}}</span>
+								</button>
+							</th>
+						</tr>
+				</tfoot>
+			{{end}}
+		</table>
+		{{template "base/paginate" .}}
+	</div>
+
+<div class="ui modal admin" id="detail-modal">
+	<div class="header">{{ctx.Locale.Tr "admin.notices.view_detail_header"}}</div>
+	<div class="content"><pre></pre></div>
+</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/org/list.tmpl b/admin/org/list.tmpl
new file mode 100644
index 0000000..d5e0993
--- /dev/null
+++ b/admin/org/list.tmpl
@@ -0,0 +1,76 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.orgs.org_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
+			<div class="ui right">
+				<a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{ctx.Locale.Tr "admin.orgs.new_orga"}}</a>
+			</div>
+		</h4>
+		<div class="ui attached segment">
+			<div class="ui secondary filter menu tw-items-center tw-mx-0">
+				<form class="ui form ignore-dirty tw-flex-1">
+					{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.org_kind")}}
+				</form>
+				<!-- Sort -->
+				<div class="ui dropdown type jump item tw-mr-0">
+					<span class="text">
+						{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+					</span>
+					{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+					<div class="menu">
+						<a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="?sort=oldest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
+						<a class="{{if eq .SortType "newest"}}active {{end}}item" href="?sort=newest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
+						<a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="?sort=alphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
+						<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="?sort=reversealphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
+						<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="?sort=recentupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+						<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="?sort=leastupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="ui attached table segment">
+			<table class="ui very basic striped table unstackable">
+				<thead>
+					<tr>
+						<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
+						<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically" data-sortt-default="true">
+							{{ctx.Locale.Tr "admin.orgs.name"}}
+							{{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
+						</th>
+						<th>{{ctx.Locale.Tr "admin.orgs.teams"}}</th>
+						<th>{{ctx.Locale.Tr "admin.orgs.members"}}</th>
+						<th>{{ctx.Locale.Tr "admin.users.repos"}}</th>
+						<th data-sortt-asc="recentupdate" data-sortt-desc="leastupdate">
+							{{ctx.Locale.Tr "admin.users.created"}}
+							{{SortArrow "recentupdate" "leastupdate" $.SortType false}}
+						</th>
+						<th></th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .Users}}
+						<tr>
+							<td>{{.ID}}</td>
+							<td>
+								<a href="{{.HomeLink}}">{{if and DefaultShowFullName .FullName}}{{.FullName}} ({{.Name}}){{else}}{{.Name}}{{end}}</a>
+								{{if .Visibility.IsPrivate}}
+									<span class="text gold">{{svg "octicon-lock"}}</span>
+								{{end}}
+								{{if eq .Type 3}}{{/* Reserved organization */}}
+									<span class="ui mini label">{{ctx.Locale.Tr "admin.users.reserved"}}</span>
+								{{end}}
+							</td>
+							<td>{{.NumTeams}}</td>
+							<td>{{.NumMembers}}</td>
+							<td>{{.NumRepos}}</td>
+							<td>{{DateUtils.AbsoluteShort .CreatedUnix}}</td>
+							<td><a href="{{.OrganisationLink}}/settings" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a></td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+
+		{{template "base/paginate" .}}
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/packages/list.tmpl b/admin/packages/list.tmpl
new file mode 100644
index 0000000..08c1144
--- /dev/null
+++ b/admin/packages/list.tmpl
@@ -0,0 +1,96 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.packages.package_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .TotalCount}},
+			{{ctx.Locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}},
+			{{ctx.Locale.Tr "admin.packages.unreferenced_size" (FileSize .TotalUnreferencedBlobSize)}})
+			<div class="ui right">
+				<form method="post" action="{{AppSubUrl}}/-/admin/packages/cleanup">
+					{{.CsrfTokenHtml}}
+					<button class="ui primary tiny button">{{ctx.Locale.Tr "admin.packages.cleanup"}}</button>
+				</form>
+			</div>
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form ignore-dirty">
+				<div class="ui small fluid action input">
+					{{template "shared/search/input" dict "Value" .Query}}
+					<select class="ui small dropdown" name="type">
+						<option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
+						<option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option>
+						{{range $type := .AvailableTypes}}
+						<option{{if eq $.PackageType $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option>
+						{{end}}
+					</select>
+					{{template "shared/search/button"}}
+				</div>
+			</form>
+		</div>
+		<div class="ui attached table segment">
+			<table class="ui very basic striped table unstackable">
+				<thead>
+					<tr>
+						<th>ID</th>
+						<th>{{ctx.Locale.Tr "admin.packages.owner"}}</th>
+						<th>{{ctx.Locale.Tr "admin.packages.type"}}</th>
+						<th data-sortt-asc="name_asc" data-sortt-desc="name_desc">
+							{{ctx.Locale.Tr "admin.packages.name"}}
+							{{SortArrow "name_asc" "name_desc" .SortType false}}
+						</th>
+						<th data-sortt-asc="version_desc" data-sortt-desc="version_asc">
+							{{ctx.Locale.Tr "admin.packages.version"}}
+							{{SortArrow "version_desc" "version_asc" .SortType false}}
+						</th>
+						<th>{{ctx.Locale.Tr "admin.packages.creator"}}</th>
+						<th>{{ctx.Locale.Tr "admin.packages.repository"}}</th>
+						<th>{{ctx.Locale.Tr "admin.packages.size"}}</th>
+						<th data-sortt-asc="created_asc" data-sortt-desc="created_desc">
+							{{ctx.Locale.Tr "admin.packages.published"}}
+							{{SortArrow "created_asc" "created_desc" .SortType true}}
+						</th>
+						<th>{{ctx.Locale.Tr "admin.notices.op"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .PackageDescriptors}}
+						<tr>
+							<td>{{.Version.ID}}</td>
+							<td>
+								<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
+								{{if .Owner.Visibility.IsPrivate}}
+									<span class="text gold">{{svg "octicon-lock"}}</span>
+								{{end}}
+							</td>
+							<td>{{.Package.Type.Name}}</td>
+							<td class="gt-ellipsis tw-max-w-48">{{.Package.Name}}</td>
+							<td class="gt-ellipsis tw-max-w-48"><a href="{{.VersionWebLink}}">{{.Version.Version}}</a></td>
+							<td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td>
+							<td>
+							{{if .Repository}}
+								<a href="{{.Repository.Link}}">{{.Repository.Name}}</a>
+							{{end}}
+							</td>
+							<td>{{FileSize .CalculateBlobSize}}</td>
+							<td>{{DateUtils.AbsoluteShort .Version.CreatedUnix}}</td>
+							<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.Version.ID}}" data-name="{{.Package.Name}}" data-data-version="{{.Version.Version}}">{{svg "octicon-trash"}}</a></td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+
+		{{template "base/paginate" .}}
+	</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "packages.settings.delete"}}
+	</div>
+	<div class="content">
+		{{ctx.Locale.Tr "packages.settings.delete.notice" (`<span class="name"></span>`|SafeHTML) (`<span class="dataVersion"></span>`|SafeHTML)}}
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/queue.tmpl b/admin/queue.tmpl
new file mode 100644
index 0000000..1be35cf
--- /dev/null
+++ b/admin/queue.tmpl
@@ -0,0 +1,36 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
+<div class="admin-setting-content">
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "admin.monitor.queues"}}
+	</h4>
+	<div class="ui attached table segment">
+		<table class="ui very basic striped table unstackable">
+			<thead>
+			<tr>
+				<th>{{ctx.Locale.Tr "admin.monitor.queue.name"}}</th>
+				<th>{{ctx.Locale.Tr "admin.monitor.queue.type"}}</th>
+				<th>{{ctx.Locale.Tr "admin.monitor.queue.exemplar"}}</th>
+				<th>{{ctx.Locale.Tr "admin.monitor.queue.numberworkers"}}</th>
+				<th>{{ctx.Locale.Tr "admin.monitor.queue.activeworkers"}}</th>
+				<th>{{ctx.Locale.Tr "admin.monitor.queue.numberinqueue"}}</th>
+				<th></th>
+			</tr>
+			</thead>
+			<tbody>
+			{{range $qid, $q := .Queues}}
+			<tr>
+				<td>{{$q.GetName}}</td>
+				<td>{{$q.GetType}}</td>
+				<td>{{$q.GetItemTypeName}}</td>
+				<td>{{$q.GetWorkerNumber}}</td>
+				<td>{{$q.GetWorkerActiveNumber}}</td>
+				<td>{{$sum := $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
+				<td><a href="{{$.Link}}/{{$qid}}" class="button">{{ctx.Locale.Tr "admin.monitor.queue.review_add"}}</a></td>
+			</tr>
+			{{end}}
+			</tbody>
+		</table>
+	</div>
+</div>
+{{template "admin/layout_footer" .}}
+
diff --git a/admin/queue_manage.tmpl b/admin/queue_manage.tmpl
new file mode 100644
index 0000000..dc0196f
--- /dev/null
+++ b/admin/queue_manage.tmpl
@@ -0,0 +1,61 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.monitor.queue" .Queue.GetName}}
+		</h4>
+		<div class="ui attached table segment">
+			<table class="ui very basic striped table">
+				<thead>
+					<tr>
+						<th>{{ctx.Locale.Tr "admin.monitor.queue.name"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.queue.type"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.queue.exemplar"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.queue.numberworkers"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.queue.activeworkers"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.queue.maxnumberworkers"}}</th>
+						<th>{{ctx.Locale.Tr "admin.monitor.queue.numberinqueue"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td>{{.Queue.GetName}}</td>
+						<td>{{.Queue.GetType}}</td>
+						<td>{{.Queue.GetItemTypeName}}</td>
+						<td>{{.Queue.GetWorkerNumber}}</td>
+						<td>{{.Queue.GetWorkerActiveNumber}}</td>
+						<td>{{.Queue.GetWorkerMaxNumber}}</td>
+						<td>
+							{{$sum := .Queue.GetQueueItemNumber}}
+							{{if lt $sum 0}}
+								-
+							{{else}}
+								{{$sum}}
+								<form action="{{$.Link}}/remove-all-items" method="post" class="tw-inline-block tw-ml-4">
+									{{$.CsrfTokenHtml}}
+									<button class="ui tiny basic red button">{{ctx.Locale.Tr "admin.monitor.queue.settings.remove_all_items"}}</button>
+								</form>
+							{{end}}
+						</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.monitor.queue.settings.title"}}
+		</h4>
+		<div class="ui attached segment">
+			<p>{{ctx.Locale.Tr "admin.monitor.queue.settings.desc"}}</p>
+			<form method="post" action="{{.Link}}/set">
+				{{$.CsrfTokenHtml}}
+				<div class="ui form">
+					<div class="inline field">
+						<label for="max-number">{{ctx.Locale.Tr "admin.monitor.queue.settings.maxnumberworkers"}}</label>
+						<input name="max-number" type="text" placeholder="{{ctx.Locale.Tr "admin.monitor.queue.settings.maxnumberworkers.placeholder" .Queue.GetWorkerMaxNumber}}">
+					</div>
+					<button class="ui submit button">{{ctx.Locale.Tr "admin.monitor.queue.settings.submit"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/repo/list.tmpl b/admin/repo/list.tmpl
new file mode 100644
index 0000000..08fd893
--- /dev/null
+++ b/admin/repo/list.tmpl
@@ -0,0 +1,110 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.repos.repo_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
+			<div class="ui right">
+				<a class="ui primary tiny button" href="{{AppSubUrl}}/-/admin/repos/unadopted">{{ctx.Locale.Tr "admin.repos.unadopted"}}</a>
+			</div>
+		</h4>
+		<div class="ui attached segment">
+			{{template "shared/repo_search" .}}
+		</div>
+		<div class="ui attached table segment">
+			<table class="ui very basic striped table unstackable">
+				<thead>
+					<tr>
+						<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
+						<th>{{ctx.Locale.Tr "admin.repos.owner"}}</th>
+						<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
+							{{ctx.Locale.Tr "admin.repos.name"}}
+							{{SortArrow "alphabetically" "reversealphabetically" $.SortType false}}
+						</th>
+						<th>{{ctx.Locale.Tr "repo.watchers"}}</th>
+						<th  data-sortt-asc="moststars" data-sortt-desc="feweststars">
+							{{ctx.Locale.Tr "repo.stars"}}
+							{{SortArrow "moststars" "feweststars" $.SortType false}}
+						</th>
+						<th  data-sortt-asc="mostforks" data-sortt-desc="fewestforks">
+							{{ctx.Locale.Tr "repo.forks"}}
+							{{SortArrow "mostforks" "fewestforks" $.SortType false}}
+						</th>
+						<th>{{ctx.Locale.Tr "admin.repos.issues"}}</th>
+						<th  data-sortt-asc="gitsize" data-sortt-desc="reversegitsize">
+							{{ctx.Locale.Tr "admin.repos.size"}}
+							{{SortArrow "gitsize" "reversegitsize" $.SortType false}}
+						</th>
+						<th  data-sortt-asc="lfssize" data-sortt-desc="reverselfssize">
+							{{ctx.Locale.Tr "admin.repos.lfs_size"}}
+							{{SortArrow "lfssize" "reverselfssize" $.SortType false}}
+						</th>
+						<th>{{ctx.Locale.Tr "admin.auths.updated"}}</th>
+						<th>{{ctx.Locale.Tr "admin.users.created"}}</th>
+						<th>{{ctx.Locale.Tr "admin.notices.op"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .Repos}}
+						<tr>
+							<td>{{.ID}}</td>
+							<td>
+								<a class="tw-break-anywhere" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
+								{{if .Owner.Visibility.IsPrivate}}
+									<span class="text gold">{{svg "octicon-lock"}}</span>
+								{{end}}
+							</td>
+							<td>
+								<a class="tw-break-anywhere" href="{{.Link}}">{{.Name}}</a>
+								{{if .IsArchived}}
+									<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
+								{{end}}
+								{{if .IsPrivate}}
+									<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
+								{{else}}
+									{{if .Owner.Visibility.IsPrivate}}
+										<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
+									{{end}}
+								{{end}}
+								{{if .IsTemplate}}
+									<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
+								{{end}}
+								{{if eq .ObjectFormatName "sha256"}}
+									<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
+								{{end}}
+								{{if .IsMirror}}
+									{{svg "octicon-mirror"}}
+								{{else if .IsFork}}
+									{{svg "octicon-repo-forked"}}
+								{{end}}
+							</td>
+							<td>{{.NumWatches}}</td>
+							<td>{{.NumStars}}</td>
+							<td>{{.NumForks}}</td>
+							<td>{{.NumIssues}}</td>
+							<td>{{FileSize .GitSize}}</td>
+							<td>{{FileSize .LFSSize}}</td>
+							<td>{{DateUtils.AbsoluteShort .UpdatedUnix}}</td>
+							<td>{{DateUtils.AbsoluteShort .CreatedUnix}}</td>
+							<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.ID}}" data-name="{{.Name}}">{{svg "octicon-trash"}}</a></td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+
+		{{template "base/paginate" .}}
+	</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.settings.delete"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.settings.delete_desc"}}</p>
+		{{ctx.Locale.Tr "repo.settings.delete_notices_2" (`<span class="name"></span>`|SafeHTML)}}<br>
+		{{ctx.Locale.Tr "repo.settings.delete_notices_fork_1"}}<br>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/repo/unadopted.tmpl b/admin/repo/unadopted.tmpl
new file mode 100644
index 0000000..6f26fa5
--- /dev/null
+++ b/admin/repo/unadopted.tmpl
@@ -0,0 +1,75 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.repos.unadopted"}}
+			<div class="ui right">
+				<a class="ui primary tiny button" href="{{AppSubUrl}}/-/admin/repos">{{ctx.Locale.Tr "admin.repos.repo_manage_panel"}}</a>
+			</div>
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form ignore-dirty">
+				<div class="ui small fluid action input">
+					<input name="search" value="true" type="hidden">
+					<input name="q" value="{{.Keyword}}" placeholder="{{ctx.Locale.Tr "repo.adopt_search"}}" autofocus>
+					{{template "shared/search/button"}}
+				</div>
+			</form>
+		</div>
+		{{if .search}}
+			<div class="ui attached segment settings">
+				{{if .Dirs}}
+					<div class="ui aligned divided list">
+						{{range $dirI, $dir := .Dirs}}
+							<div class="item tw-flex tw-items-center">
+								<span class="tw-flex-1"> {{svg "octicon-file-directory-fill"}} {{$dir}}</span>
+								<div>
+									<button class="ui button primary show-modal tw-p-2" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{ctx.Locale.Tr "repo.adopt_preexisting_label"}}</button>
+									<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
+										<div class="header">
+											<span class="label">{{ctx.Locale.Tr "repo.adopt_preexisting"}}</span>
+										</div>
+										<div class="content">
+											<p>{{ctx.Locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
+										</div>
+										<form class="ui form" method="post" action="{{AppSubUrl}}/-/admin/repos/unadopted">
+											{{$.CsrfTokenHtml}}
+											<input type="hidden" name="id" value="{{$dir}}">
+											<input type="hidden" name="action" value="adopt">
+											<input type="hidden" name="q" value="{{$.Keyword}}">
+											<input type="hidden" name="page" value="{{$.CurrentPage}}">
+											{{template "base/modal_actions_confirm"}}
+										</form>
+									</div>
+									<button class="ui button red show-modal tw-p-2" data-modal="#delete-unadopted-modal-{{$dirI}}">{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.delete_preexisting_label"}}</button>
+									<div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}">
+										<div class="header">
+											<span class="label">{{ctx.Locale.Tr "repo.delete_preexisting"}}</span>
+										</div>
+										<div class="content">
+											<p>{{ctx.Locale.Tr "repo.delete_preexisting_content" $dir}}</p>
+										</div>
+										<form class="ui form" method="post" action="{{AppSubUrl}}/-/admin/repos/unadopted">
+											{{$.CsrfTokenHtml}}
+											<input type="hidden" name="id" value="{{$dir}}">
+											<input type="hidden" name="action" value="delete">
+											<input type="hidden" name="q" value="{{$.Keyword}}">
+											<input type="hidden" name="page" value="{{$.CurrentPage}}">
+											{{template "base/modal_actions_confirm"}}
+										</form>
+									</div>
+								</div>
+							</div>
+						{{end}}
+					</div>
+					{{template "base/paginate" .}}
+				{{else}}
+					<div class="item">
+						{{ctx.Locale.Tr "admin.repos.unadopted.no_more"}}
+					</div>
+					{{template "base/paginate" .}}
+				{{end}}
+			</div>
+		{{end}}
+	</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/runners/edit.tmpl b/admin/runners/edit.tmpl
new file mode 100644
index 0000000..1165c84
--- /dev/null
+++ b/admin/runners/edit.tmpl
@@ -0,0 +1,5 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin runners")}}
+	<div class="admin-setting-content">
+		{{template "shared/actions/runner_edit" .}}
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/self_check.tmpl b/admin/self_check.tmpl
new file mode 100644
index 0000000..a7f43f4
--- /dev/null
+++ b/admin/self_check.tmpl
@@ -0,0 +1,60 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}
+
+<div class="admin-setting-content">
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "admin.self_check"}}
+	</h4>
+
+	{{if .StartupProblems}}
+	<div class="ui attached segment self-check-problem">
+		<div class="ui warning message">
+			<div>{{ctx.Locale.Tr "admin.self_check.startup_warnings"}}</div>
+			<ul class="tw-w-full">{{range .StartupProblems}}<li>{{.}}</li>{{end}}</ul>
+		</div>
+	</div>
+	{{end}}
+
+	<div class="ui attached segment tw-hidden self-check-problem" id="self-check-by-frontend"></div>
+
+	{{if .DatabaseCheckHasProblems}}
+		<div class="ui attached segment self-check-problem">
+			{{if .DatabaseType.IsMySQL}}
+				<div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.database_fix_mysql"}}</div>
+			{{else if .DatabaseType.IsMSSQL}}
+				<div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.database_fix_mssql"}}</div>
+			{{end}}
+			{{if .DatabaseCheckCollationMismatch}}
+				<div class="ui red message">{{ctx.Locale.Tr "admin.self_check.database_collation_mismatch" .DatabaseCheckResult.ExpectedCollation}}</div>
+			{{end}}
+			{{if .DatabaseCheckCollationCaseInsensitive}}
+				<div class="ui warning message">{{ctx.Locale.Tr "admin.self_check.database_collation_case_insensitive" .DatabaseCheckResult.DatabaseCollation}}</div>
+			{{end}}
+			{{if .DatabaseCheckInconsistentCollationColumns}}
+				<div class="ui red message">
+					<details>
+						<summary>{{ctx.Locale.Tr "admin.self_check.database_inconsistent_collation_columns" .DatabaseCheckResult.DatabaseCollation}}</summary>
+						<ul class="tw-w-full">
+						{{range .DatabaseCheckInconsistentCollationColumns}}
+							<li>{{.}}</li>
+						{{end}}
+						</ul>
+					</details>
+				</div>
+			{{end}}
+		</div>
+	{{end}}
+
+	{{if .CacheError}}
+		<div class="ui red message">{{ctx.Locale.Tr "admin.config.cache_test_failed" .CacheError}}</div>
+	{{end}}
+	{{if .CacheSlow}}
+		<div class="ui warning message">{{ctx.Locale.Tr "admin.config.cache_test_slow" .CacheSlow}}</div>
+	{{end}}
+
+	{{/* only shown when there is no visible "self-check-problem" */}}
+	<div class="ui attached segment tw-hidden self-check-no-problem">
+		{{ctx.Locale.Tr "admin.self_check.no_problem_found"}}
+	</div>
+</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/stacktrace-row.tmpl b/admin/stacktrace-row.tmpl
new file mode 100644
index 0000000..97c361f
--- /dev/null
+++ b/admin/stacktrace-row.tmpl
@@ -0,0 +1,66 @@
+<div class="item">
+	<div class="tw-flex tw-items-center">
+		<div class="icon tw-ml-2 tw-mr-2">
+			{{if eq .Process.Type "request"}}
+				{{svg "octicon-globe" 16}}
+			{{else if eq .Process.Type "system"}}
+				{{svg "octicon-cpu" 16}}
+			{{else if eq .Process.Type "normal"}}
+				{{svg "octicon-terminal" 16}}
+			{{else}}
+				{{svg "octicon-code" 16}}
+			{{end}}
+		</div>
+		<div class="content tw-flex-1">
+			<div class="header">{{.Process.Description}}</div>
+			<div class="description">{{if ne .Process.Type "none"}}{{DateUtils.TimeSince .Process.Start}}{{end}}</div>
+		</div>
+		<div>
+			{{if or (eq .Process.Type "request") (eq .Process.Type "normal")}}
+				<a class="delete-button icon" href="" data-url="{{.root.Link}}/cancel/{{.Process.PID}}" data-id="{{.Process.PID}}" data-name="{{.Process.Description}}">{{svg "octicon-trash" 16 "text-red"}}</a>
+			{{end}}
+		</div>
+	</div>
+	{{if .Process.Stacks}}
+		<div class="divided list tw-ml-2">
+			{{range .Process.Stacks}}
+				<div class="item">
+					<details>
+						<summary>
+							<div class="flex-text-inline">
+								<div class="header tw-ml-2">
+									<span class="icon tw-mr-2">{{svg "octicon-code" 16}}</span>{{.Description}}{{if gt .Count 1}} * {{.Count}}{{end}}
+								</div>
+								<div class="description">
+									{{range .Labels}}
+										<div class="ui label">{{.Name}}<div class="detail">{{.Value}}</div></div>
+									{{end}}
+								</div>
+							</div>
+						</summary>
+						<div class="list">
+							{{range .Entry}}
+								<div class="item tw-flex tw-items-center">
+									<span class="icon tw-mr-4">{{svg "octicon-dot-fill" 16}}</span>
+									<div class="content tw-flex-1">
+										<div class="header"><code>{{.Function}}</code></div>
+										<div class="description"><code>{{.File}}:{{.Line}}</code></div>
+									</div>
+								</div>
+							{{end}}
+						</div>
+					</details>
+				</div>
+			{{end}}
+		</div>
+	{{end}}
+
+	{{if .Process.Children}}
+		<div class="divided list">
+			{{range .Process.Children}}
+				{{template "admin/stacktrace-row" dict "Process" . "root" $.root}}
+			{{end}}
+		</div>
+	{{end}}
+
+</div>
diff --git a/admin/stacktrace.tmpl b/admin/stacktrace.tmpl
new file mode 100644
index 0000000..ce03d80
--- /dev/null
+++ b/admin/stacktrace.tmpl
@@ -0,0 +1,48 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
+<div class="admin-setting-content">
+
+	<div class="tw-flex tw-items-center">
+		<div class="tw-flex-1">
+			<div class="ui compact small menu">
+				<a class="{{if eq .ShowGoroutineList "process"}}active {{end}}item" href="?show=process">{{ctx.Locale.Tr "admin.monitor.process"}}</a>
+				<a class="{{if eq .ShowGoroutineList "stacktrace"}}active {{end}}item" href="?show=stacktrace">{{ctx.Locale.Tr "admin.monitor.stacktrace"}}</a>
+			</div>
+		</div>
+		<form target="_blank" action="{{AppSubUrl}}/-/admin/monitor/diagnosis" class="ui form">
+			<div class="ui inline field">
+				<button class="ui primary small button">{{ctx.Locale.Tr "admin.monitor.download_diagnosis_report"}}</button>
+				<input name="seconds" size="3" maxlength="3" value="10"> {{ctx.Locale.Tr "tool.raw_seconds"}}
+			</div>
+		</form>
+	</div>
+
+	<div class="divider"></div>
+
+	<h4 class="ui top attached header">
+		{{printf "%d Goroutines" .GoroutineCount}}{{/* Goroutine is non-translatable*/}}
+		{{- if .ProcessCount -}}, {{ctx.Locale.Tr "admin.monitor.processes_count" .ProcessCount}}{{- end -}}
+	</h4>
+
+	{{if .ProcessStacks}}
+	<div class="ui attached segment">
+		<div class="ui relaxed divided list">
+			{{range .ProcessStacks}}
+				{{template "admin/stacktrace-row" dict "Process" . "root" $}}
+			{{end}}
+		</div>
+	</div>
+	{{end}}
+</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{ctx.Locale.Tr "admin.monitor.process.cancel"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "admin.monitor.process.cancel_notices" (`<span class="name"></span>`|SafeHTML)}}</p>
+		<p>{{ctx.Locale.Tr "admin.monitor.process.cancel_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/stats.tmpl b/admin/stats.tmpl
new file mode 100644
index 0000000..04fa862
--- /dev/null
+++ b/admin/stats.tmpl
@@ -0,0 +1,17 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
+<div class="admin-setting-content">
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "admin.dashboard.statistic"}}
+	</h4>
+	<div class="ui attached table segment">
+		<table class="ui very basic striped table unstackable">
+			{{range $statsKey := .StatsKeys}}
+			<tr>
+				<td width="200">{{$statsKey}}</td>
+				<td>{{index $.StatsCounter $statsKey}}</td>
+			</tr>
+			{{end}}
+		</table>
+	</div>
+</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/system_status.tmpl b/admin/system_status.tmpl
new file mode 100644
index 0000000..7b5c9be
--- /dev/null
+++ b/admin/system_status.tmpl
@@ -0,0 +1,62 @@
+<dl class="admin-dl-horizontal">
+	<dt>{{ctx.Locale.Tr "admin.dashboard.server_uptime"}}</dt>
+	<dd><relative-time format="duration" datetime="{{.SysStatus.StartTime}}">{{.SysStatus.StartTime}}</relative-time></dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.current_goroutine"}}</dt>
+	<dd>{{.SysStatus.NumGoroutine}}</dd>
+	<div class="divider"></div>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.current_memory_usage"}}</dt>
+	<dd>{{.SysStatus.MemAllocated}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.total_memory_allocated"}}</dt>
+	<dd>{{.SysStatus.MemTotal}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.memory_obtained"}}</dt>
+	<dd>{{.SysStatus.MemSys}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
+	<dd>{{.SysStatus.Lookups}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.memory_allocate_times"}}</dt>
+	<dd>{{.SysStatus.MemMallocs}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.memory_free_times"}}</dt>
+	<dd>{{.SysStatus.MemFrees}}</dd>
+	<div class="divider"></div>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.current_heap_usage"}}</dt>
+	<dd>{{.SysStatus.HeapAlloc}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
+	<dd>{{.SysStatus.HeapSys}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.heap_memory_idle"}}</dt>
+	<dd>{{.SysStatus.HeapIdle}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
+	<dd>{{.SysStatus.HeapInuse}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.heap_memory_released"}}</dt>
+	<dd>{{.SysStatus.HeapReleased}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.heap_objects"}}</dt>
+	<dd>{{.SysStatus.HeapObjects}}</dd>
+	<div class="divider"></div>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
+	<dd>{{.SysStatus.StackInuse}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
+	<dd>{{.SysStatus.StackSys}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
+	<dd>{{.SysStatus.MSpanInuse}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
+	<dd>{{.SysStatus.MSpanSys}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
+	<dd>{{.SysStatus.MCacheInuse}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
+	<dd>{{.SysStatus.MCacheSys}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
+	<dd>{{.SysStatus.BuckHashSys}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
+	<dd>{{.SysStatus.GCSys}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
+	<dd>{{.SysStatus.OtherSys}}</dd>
+	<div class="divider"></div>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.next_gc_recycle"}}</dt>
+	<dd>{{.SysStatus.NextGC}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.last_gc_time"}}</dt>
+	<dd><relative-time format="duration" datetime="{{.SysStatus.LastGCTime}}">{{.SysStatus.LastGCTime}}</relative-time></dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.total_gc_pause"}}</dt>
+	<dd>{{.SysStatus.PauseTotalNs}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.last_gc_pause"}}</dt>
+	<dd>{{.SysStatus.PauseNs}}</dd>
+	<dt>{{ctx.Locale.Tr "admin.dashboard.gc_times"}}</dt>
+	<dd>{{.SysStatus.NumGC}}</dd>
+</dl>
diff --git a/admin/user/edit.tmpl b/admin/user/edit.tmpl
new file mode 100644
index 0000000..41b00de
--- /dev/null
+++ b/admin/user/edit.tmpl
@@ -0,0 +1,231 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit user")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.users.edit_account"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="./edit" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<div class="field {{if .Err_UserName}}error{{end}}">
+					<label for="user_name">{{ctx.Locale.Tr "username"}}</label>
+					<input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal}}disabled{{end}} maxlength="40">
+				</div>
+				<!-- Types and name -->
+				<div class="inline required field {{if .Err_LoginType}}error{{end}}">
+					<label>{{ctx.Locale.Tr "admin.users.auth_source"}}</label>
+					<div class="ui selection type dropdown">
+						<input type="hidden" id="login_type" name="login_type" value="{{.LoginSource.Type.Int}}-{{.LoginSource.ID}}" required>
+						<div class="text">{{ctx.Locale.Tr "admin.users.local"}}</div>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu">
+							<div class="item" data-value="0-0">{{ctx.Locale.Tr "admin.users.local"}}</div>
+							{{range .Sources}}
+								<div class="item" data-value="{{.Type.Int}}-{{.ID}}">{{.Name}}</div>
+							{{end}}
+						</div>
+					</div>
+				</div>
+
+				<div class="inline field {{if .Err_Visibility}}error{{end}}">
+					<span class="inline required field"><label for="visibility">{{ctx.Locale.Tr "settings.visibility"}}</label></span>
+					<div class="ui selection type dropdown">
+						{{if .User.Visibility.IsPublic}}<input type="hidden" id="visibility" name="visibility" value="0">{{end}}
+						{{if .User.Visibility.IsLimited}}<input type="hidden" id="visibility" name="visibility" value="1">{{end}}
+						{{if .User.Visibility.IsPrivate}}<input type="hidden" id="visibility" name="visibility" value="2">{{end}}
+						<div class="text">
+							{{if .User.Visibility.IsPublic}}{{ctx.Locale.Tr "settings.visibility.public"}}{{end}}
+							{{if .User.Visibility.IsLimited}}{{ctx.Locale.Tr "settings.visibility.limited"}}{{end}}
+							{{if .User.Visibility.IsPrivate}}{{ctx.Locale.Tr "settings.visibility.private"}}{{end}}
+						</div>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu">
+							{{range $mode := .AllowedUserVisibilityModes}}
+								{{if $mode.IsPublic}}
+									<div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{ctx.Locale.Tr "settings.visibility.public"}}</div>
+								{{else if $mode.IsLimited}}
+									<div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{ctx.Locale.Tr "settings.visibility.limited"}}</div>
+								{{else if $mode.IsPrivate}}
+									<div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{ctx.Locale.Tr "settings.visibility.private"}}</div>
+								{{end}}
+							{{end}}
+						</div>
+					</div>
+				</div>
+
+				<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}tw-hidden{{end}}">
+					<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
+					<input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
+				</div>
+				<div class="field {{if .Err_FullName}}error{{end}}">
+					<label for="full_name">{{ctx.Locale.Tr "settings.full_name"}}</label>
+					<input id="full_name" name="full_name" value="{{.User.FullName}}" maxlength="100">
+				</div>
+				<div class="required field {{if .Err_Email}}error{{end}}">
+					<label for="email">{{ctx.Locale.Tr "email"}}</label>
+					<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
+				</div>
+				<div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}tw-hidden{{end}}">
+					<label for="password">{{ctx.Locale.Tr "password"}}</label>
+					<input id="password" name="password" type="password" autocomplete="new-password">
+					<p class="help">{{ctx.Locale.Tr "admin.users.password_helper"}}</p>
+				</div>
+
+				<div class="field {{if .Err_Language}}error{{end}}">
+					<label for="language">{{ctx.Locale.Tr "settings.language"}}</label>
+					<div class="ui selection dropdown">
+						<input name="language" type="hidden" value="{{.User.Language}}">
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="text">{{range .AllLangs}}{{if eq $.User.Language .Lang}}{{.Name}}{{end}}{{end}}</div>
+						<div class="menu">
+						{{range .AllLangs}}
+							<div class="item{{if eq $.User.Language .Lang}} active selected{{end}}" data-value="{{.Lang}}">{{.Name}}</div>
+						{{end}}
+						</div>
+					</div>
+				</div>
+
+				<div class="field {{if .Err_Website}}error{{end}}">
+					<label for="website">{{ctx.Locale.Tr "settings.website"}}</label>
+					<input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="http://mydomain.com or https://mydomain.com" maxlength="255">
+				</div>
+				<div class="field {{if .Err_Location}}error{{end}}">
+					<label for="location">{{ctx.Locale.Tr "settings.location"}}</label>
+					<input id="location" name="location" value="{{.User.Location}}" maxlength="50">
+				</div>
+
+				<div class="divider"></div>
+
+				<div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
+					<label for="max_repo_creation">{{ctx.Locale.Tr "admin.users.max_repo_creation"}}</label>
+					<input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.User.MaxRepoCreation}}">
+					<p class="help">{{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}</p>
+				</div>
+
+				<div class="divider"></div>
+
+				<div class="inline field">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.users.is_activated"}}</strong></label>
+						<input name="active" type="checkbox" {{if .User.IsActive}}checked{{end}}>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.users.prohibit_login"}}</strong></label>
+						<input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}checked{{end}} {{if (eq .User.ID .SignedUserID)}}disabled{{end}}>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.users.is_admin"}}</strong></label>
+						<input name="admin" type="checkbox" {{if .User.IsAdmin}}checked{{end}}>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.users.is_restricted"}}</strong></label>
+						<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
+					</div>
+				</div>
+				<div class="inline field {{if DisableGitHooks}}tw-hidden{{end}}">
+					<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}">
+						<label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label>
+						<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
+					</div>
+				</div>
+				<div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label>
+						<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
+					</div>
+				</div>
+				{{if not .DisableRegularOrgCreation}}
+				<div class="inline field">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.users.allow_create_organization"}}</strong></label>
+						<input name="allow_create_organization" type="checkbox" {{if .User.CanCreateOrganization}}checked{{end}}>
+					</div>
+				</div>
+				{{end}}
+
+				{{if .TwoFactorEnabled}}
+				<div class="divider"></div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "admin.users.reset_2fa"}}</strong></label>
+						<input name="reset_2fa" type="checkbox">
+					</div>
+				</div>
+				{{end}}
+
+				<div class="divider"></div>
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "admin.users.update_profile"}}</button>
+					<button class="ui red button show-modal" data-modal="#delete-user-modal">{{ctx.Locale.Tr "admin.users.delete_account"}}</button>
+				</div>
+			</form>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.avatar"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="./avatar" method="post" enctype="multipart/form-data">
+				{{.CsrfTokenHtml}}
+				{{if not .DisableGravatar}}
+				<div class="inline field">
+					<div class="ui radio checkbox">
+						<input name="source" value="lookup" type="radio" {{if not .User.UseCustomAvatar}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.lookup_avatar_by_mail"}}</label>
+					</div>
+				</div>
+				<div class="field tw-pl-4 {{if .Err_Gravatar}}error{{end}}">
+					<label for="gravatar">Avatar {{ctx.Locale.Tr "email"}}</label>
+					<input id="gravatar" name="gravatar" value="{{.User.AvatarEmail}}">
+				</div>
+				{{end}}
+
+				<div class="inline field">
+					<div class="ui radio checkbox">
+						<input name="source" value="local" type="radio" {{if .User.UseCustomAvatar}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.enable_custom_avatar"}}</label>
+					</div>
+				</div>
+
+				<div class="inline field tw-pl-4">
+					<label for="avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label>
+					<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
+				</div>
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button>
+					<button class="ui red button link-action" data-url="./avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+
+<div class="ui g-modal-confirm delete modal" id="delete-user-modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "settings.delete_account_title"}}
+	</div>
+	<form class="ui form" method="post" action="./delete">
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.delete_account_desc"}}</p>
+			{{$.CsrfTokenHtml}}
+			<div class="field">
+				<div class="ui checkbox">
+					<label for="purge">{{ctx.Locale.Tr "admin.users.purge"}}</label>
+					<input name="purge" type="checkbox">
+				</div>
+				<p class="help">{{ctx.Locale.Tr "admin.users.purge_help"}}</p>
+			</div>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</form>
+</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/user/list.tmpl b/admin/user/list.tmpl
new file mode 100644
index 0000000..7e4c885
--- /dev/null
+++ b/admin/user/list.tmpl
@@ -0,0 +1,119 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.users.user_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
+			<div class="ui right">
+				<a class="ui primary tiny button" href="{{AppSubUrl}}/-/admin/users/new">{{ctx.Locale.Tr "admin.users.new_account"}}</a>
+			</div>
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form ignore-dirty flex-text-block" id="user-list-search-form">
+				<div class="tw-flex-1">
+					{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}}
+				</div>
+				<!-- Right Menu -->
+				<div class="ui secondary menu tw-m-0">
+					<!-- Status Filter Menu Item -->
+					<div class="ui dropdown type jump item">
+						<span class="text">{{ctx.Locale.Tr "admin.users.list_status_filter.menu_text"}}</span>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu flex-items-menu">
+							<a class="item j-reset-status-filter">{{ctx.Locale.Tr "admin.users.list_status_filter.reset"}}</a>
+							<div class="divider"></div>
+							<label class="item"><input type="radio" name="status_filter[is_admin]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_admin"}}</label>
+							<label class="item"><input type="radio" name="status_filter[is_admin]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_admin"}}</label>
+							<div class="divider"></div>
+							<label class="item"><input type="radio" name="status_filter[is_active]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_active"}}</label>
+							<label class="item"><input type="radio" name="status_filter[is_active]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_active"}}</label>
+							<div class="divider"></div>
+							<label class="item"><input type="radio" name="status_filter[is_restricted]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_restricted"}}</label>
+							<label class="item"><input type="radio" name="status_filter[is_restricted]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_restricted"}}</label>
+							<div class="divider"></div>
+							<label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_prohibit_login"}}</label>
+							<label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_prohibit_login"}}</label>
+							<div class="divider"></div>
+							<label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_2fa_enabled"}}</label>
+							<label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_2fa_enabled"}}</label>
+						</div>
+					</div>
+
+					<!-- Sort Menu Item -->
+					<div class="ui dropdown type jump item">
+						<span class="text">
+							{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+						</span>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu">
+							<button class="item" name="sort" value="oldest">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</button>
+							<button class="item" name="sort" value="newest">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</button>
+							<button class="item" name="sort" value="alphabetically">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</button>
+							<button class="item" name="sort" value="reversealphabetically">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</button>
+							<button class="item" name="sort" value="recentupdate">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</button>
+							<button class="item" name="sort" value="leastupdate">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</button>
+						</div>
+					</div>
+				</div>
+			</form>
+		</div>
+		<div class="ui attached table segment">
+			<table class="ui very basic striped table unstackable">
+				<thead>
+					<tr>
+						<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" .SortType false}}</th>
+						<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically" data-sortt-default="true">
+							{{ctx.Locale.Tr "admin.users.name"}}
+							{{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
+						</th>
+						<th>{{ctx.Locale.Tr "email"}}</th>
+						<th>{{ctx.Locale.Tr "admin.users.activated"}}</th>
+						<th>{{ctx.Locale.Tr "admin.users.restricted"}}</th>
+						<th>{{ctx.Locale.Tr "admin.users.2fa"}}</th>
+						<th>{{ctx.Locale.Tr "admin.users.created"}}</th>
+						<th data-sortt-asc="lastlogin" data-sortt-desc="reverselastlogin">
+							{{ctx.Locale.Tr "admin.users.last_login"}}
+							{{SortArrow "lastlogin" "reverselastlogin" $.SortType false}}
+						</th>
+						<th></th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .Users}}
+						<tr>
+							<td>{{.ID}}</td>
+							<td>
+								<a href="{{.HomeLink}}">{{.Name}}</a>
+								{{if .IsAdmin}}
+									<span class="ui mini label">{{ctx.Locale.Tr "admin.users.admin"}}</span>
+								{{else if eq 2 .Type}}{{/* Reserved user */}}
+									<span class="ui mini label">{{ctx.Locale.Tr "admin.users.reserved"}}</span>
+								{{else if eq 4 .Type}}{{/* Bot "user" */}}
+									<span class="ui mini label">{{ctx.Locale.Tr "admin.users.bot"}}</span>
+								{{else if eq 5 .Type}}{{/* Remote user */}}
+									<span class="ui mini label">{{ctx.Locale.Tr "admin.users.remote"}}</span>
+								{{end}}
+							</td>
+							<td class="gt-ellipsis tw-max-w-48">{{.Email}}</td>
+							<td>{{svg (Iif .IsActive "octicon-check" "octicon-x")}}</td>
+							<td>{{svg (Iif .IsRestricted "octicon-check" "octicon-x")}}</td>
+							<td>{{svg (Iif (index $.UsersTwoFaStatus .ID) "octicon-check" "octicon-x")}}</td>
+							<td>{{DateUtils.AbsoluteShort .CreatedUnix}}</td>
+							{{if .LastLoginUnix}}
+								<td>{{DateUtils.AbsoluteShort .LastLoginUnix}}</td>
+							{{else}}
+								<td><span>{{ctx.Locale.Tr "admin.users.never_login"}}</span></td>
+							{{end}}
+							<td>
+								<div class="tw-flex tw-gap-2">
+									<a href="{{$.Link}}/{{.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.users.details"}}">{{svg "octicon-person"}}</a>
+									<a href="{{$.Link}}/{{.ID}}/edit" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a>
+								</div>
+							</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+
+		{{template "base/paginate" .}}
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/user/new.tmpl b/admin/user/new.tmpl
new file mode 100644
index 0000000..b04ebc4
--- /dev/null
+++ b/admin/user/new.tmpl
@@ -0,0 +1,90 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new user")}}
+	<div class="admin-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "admin.users.new_account"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<!-- Types and name -->
+				<div class="inline required field {{if .Err_LoginType}}error{{end}}">
+					<label>{{ctx.Locale.Tr "admin.users.auth_source"}}</label>
+					<div class="ui selection type dropdown">
+						<input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
+						<div class="text">{{ctx.Locale.Tr "admin.users.local"}}</div>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu">
+							<div class="item" data-value="0-0">{{ctx.Locale.Tr "admin.users.local"}}</div>
+							{{range .Sources}}
+								<div class="item" data-value="{{.Type.Int}}-{{.ID}}">{{.Name}}</div>
+							{{end}}
+						</div>
+					</div>
+				</div>
+
+				<div class="inline field {{if .Err_Visibility}}error{{end}}">
+					<span class="inline required field"><label for="visibility">{{ctx.Locale.Tr "settings.visibility"}}</label></span>
+					<div class="ui selection type dropdown">
+						<input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{printf "%d" .visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}">
+						<div class="text">
+							{{if .DefaultUserVisibilityMode.IsPublic}}{{ctx.Locale.Tr "settings.visibility.public"}}{{end}}
+							{{if .DefaultUserVisibilityMode.IsLimited}}{{ctx.Locale.Tr "settings.visibility.limited"}}{{end}}
+							{{if .DefaultUserVisibilityMode.IsPrivate}}{{ctx.Locale.Tr "settings.visibility.private"}}{{end}}
+						</div>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu">
+							{{range $mode := .AllowedUserVisibilityModes}}
+								{{if $mode.IsPublic}}
+									<div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{ctx.Locale.Tr "settings.visibility.public"}}</div>
+								{{else if $mode.IsLimited}}
+									<div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{ctx.Locale.Tr "settings.visibility.limited"}}</div>
+								{{else if $mode.IsPrivate}}
+									<div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{ctx.Locale.Tr "settings.visibility.private"}}</div>
+								{{end}}
+							{{end}}
+						</div>
+					</div>
+				</div>
+
+				<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}tw-hidden{{end}}">
+					<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
+					<input id="login_name" name="login_name" value="{{.login_name}}">
+				</div>
+				<div class="required field {{if .Err_UserName}}error{{end}}">
+					<label for="user_name">{{ctx.Locale.Tr "username"}}</label>
+					<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required maxlength="40">
+				</div>
+				<div class="required field {{if .Err_Email}}error{{end}}">
+					<label for="email">{{ctx.Locale.Tr "email"}}</label>
+					<input id="email" name="email" type="email" value="{{.email}}" required>
+				</div>
+				<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}tw-hidden{{end}}">
+					<label for="password">{{ctx.Locale.Tr "password"}}</label>
+					<input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
+				</div>
+
+				<div class="inline field local {{if ne .login_type "0-0"}}tw-hidden{{end}}">
+					<div class="ui checkbox">
+						<label><strong>{{ctx.Locale.Tr "auth.allow_password_change"}}</strong></label>
+						<input name="must_change_password" type="checkbox" checked>
+					</div>
+				</div>
+
+				<!-- Send register notify e-mail -->
+				{{if .CanSendEmail}}
+					<div class="inline field">
+						<div class="ui checkbox">
+							<label><strong>{{ctx.Locale.Tr "admin.users.send_register_notify"}}</strong></label>
+							<input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
+						</div>
+					</div>
+				{{end}}
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "admin.users.new_account"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+{{template "admin/layout_footer" .}}
diff --git a/admin/user/view.tmpl b/admin/user/view.tmpl
new file mode 100644
index 0000000..21943a8
--- /dev/null
+++ b/admin/user/view.tmpl
@@ -0,0 +1,48 @@
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin view user")}}
+
+<div class="admin-setting-content">
+	<div class="admin-responsive-columns">
+		<div class="tw-flex-1">
+			<h4 class="ui top attached header">
+				{{.Title}}
+				<div class="ui right">
+					<a class="ui primary tiny button" href="{{.Link}}/edit">{{ctx.Locale.Tr "admin.users.edit"}}</a>
+				</div>
+			</h4>
+			<div class="ui attached segment">
+				{{template "admin/user/view_details" .}}
+			</div>
+		</div>
+		<div class="tw-flex-1">
+			<h4 class="ui top attached header">
+				{{ctx.Locale.Tr "admin.emails"}}
+				<div class="ui right">
+					{{.EmailsTotal}}
+				</div>
+			</h4>
+			<div class="ui attached segment">
+				{{template "admin/user/view_emails" .}}
+			</div>
+		</div>
+	</div>
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "admin.repositories"}}
+		<div class="ui right">
+			{{.ReposTotal}}
+		</div>
+	</h4>
+	<div class="ui attached segment">
+		{{template "explore/repo_list" .}}
+	</div>
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "settings.organization"}}
+		<div class="ui right">
+			{{.OrgsTotal}}
+		</div>
+	</h4>
+	<div class="ui attached segment">
+		{{template "explore/user_list" .}}
+	</div>
+</div>
+
+{{template "admin/layout_footer" .}}
diff --git a/admin/user/view_details.tmpl b/admin/user/view_details.tmpl
new file mode 100644
index 0000000..be2f32b
--- /dev/null
+++ b/admin/user/view_details.tmpl
@@ -0,0 +1,74 @@
+<div class="flex-list">
+	<div class="flex-item">
+		<div class="flex-item-leading">
+			{{ctx.AvatarUtils.Avatar .User 48}}
+		</div>
+		<div class="flex-item-main">
+			<div class="flex-item-title">
+				{{template "shared/user/name" .User}}
+				{{if .User.IsAdmin}}
+					<span class="ui basic label">{{ctx.Locale.Tr "admin.users.admin"}}</span>
+				{{end}}
+			</div>
+			<div class="flex-item-body">
+				<b>{{ctx.Locale.Tr "admin.users.auth_source"}}:</b>
+				{{if eq .LoginSource.ID 0}}
+					{{ctx.Locale.Tr "admin.users.local"}}
+				{{else}}
+					{{.LoginSource.Name}}
+				{{end}}
+			</div>
+			<div class="flex-item-body">
+				<b>{{ctx.Locale.Tr "admin.users.activated"}}:</b>
+				{{if .User.IsActive}}
+					{{svg "octicon-check"}}
+				{{else}}
+					{{svg "octicon-x"}}
+				{{end}}
+			</div>
+			<div class="flex-item-body">
+				<b>{{ctx.Locale.Tr "admin.users.restricted"}}:</b>
+				{{if .User.IsRestricted}}
+					{{svg "octicon-check"}}
+				{{else}}
+					{{svg "octicon-x"}}
+				{{end}}
+			</div>
+			<div class="flex-item-body">
+				<b>{{ctx.Locale.Tr "settings.visibility"}}:</b>
+				{{if .User.Visibility.IsPublic}}{{ctx.Locale.Tr "settings.visibility.public"}}{{end}}
+				{{if .User.Visibility.IsLimited}}{{ctx.Locale.Tr "settings.visibility.limited"}}{{end}}
+				{{if .User.Visibility.IsPrivate}}{{ctx.Locale.Tr "settings.visibility.private"}}{{end}}
+			</div>
+			<div class="flex-item-body">
+				<b>{{ctx.Locale.Tr "admin.users.2fa"}}:</b>
+				{{if .TwoFactorEnabled}}
+					<span class="text green">{{svg "octicon-check"}}</span>
+				{{else}}
+					{{svg "octicon-x"}}
+				{{end}}
+			</div>
+			{{if .User.Language}}
+				<div class="flex-item-body">
+					<span class="flex-text-inline">
+						<b>{{ctx.Locale.Tr "settings.language"}}:</b>
+						{{range .AllLangs}}{{if eq $.User.Language .Lang}}{{.Name}}{{end}}{{end}}
+					</span>
+				</div>
+			{{end}}
+			{{if .User.Location}}
+				<div class="flex-item-body">
+					<span class="flex-text-inline">{{svg "octicon-location"}}{{.User.Location}}</span>
+				</div>
+			{{end}}
+			{{if .User.Website}}
+				<div class="flex-item-body">
+					<span class="flex-text-inline">
+						{{svg "octicon-link"}}
+						<a target="_blank" href="{{.User.Website}}">{{.User.Website}}</a>
+					</span>
+				</div>
+			{{end}}
+		</div>
+	</div>
+</div>
diff --git a/admin/user/view_emails.tmpl b/admin/user/view_emails.tmpl
new file mode 100644
index 0000000..22ce305
--- /dev/null
+++ b/admin/user/view_emails.tmpl
@@ -0,0 +1,19 @@
+<div class="flex-list">
+	{{range .Emails}}
+		<div class="flex-item">
+			<div class="flex-item-main">
+				<div class="flex-text-block">
+					{{.Email}}
+					{{if .IsPrimary}}
+						<div class="ui primary label">{{ctx.Locale.Tr "settings.primary"}}</div>
+					{{end}}
+					{{if .IsActivated}}
+						<div class="ui green label">{{ctx.Locale.Tr "settings.activated"}}</div>
+					{{else}}
+						<div class="ui label">{{ctx.Locale.Tr "settings.requires_activation"}}</div>
+					{{end}}
+				</div>
+			</div>
+		</div>
+	{{end}}
+</div>
diff --git a/api/packages/pypi/simple.tmpl b/api/packages/pypi/simple.tmpl
new file mode 100644
index 0000000..85aa730
--- /dev/null
+++ b/api/packages/pypi/simple.tmpl
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>Links for {{.PackageDescriptor.Package.Name}}</title>
+	</head>
+	<body>
+		{{- /* PEP 503 – Simple Repository API: https://peps.python.org/pep-0503/ */ -}}
+		<h1>Links for {{.PackageDescriptor.Package.Name}}</h1>
+		{{range .PackageDescriptors}}
+			{{$pd := .}}
+			{{range .Files}}
+				<a href="{{$.RegistryURL}}/files/{{$pd.Package.LowerName}}/{{$pd.Version.Version}}/{{.File.Name}}#sha256={{.Blob.HashSHA256}}"{{if $pd.Metadata.RequiresPython}} data-requires-python="{{$pd.Metadata.RequiresPython}}"{{end}}>{{.File.Name}}</a><br>
+			{{end}}
+		{{end}}
+	</body>
+</html>
diff --git a/base/alert.tmpl b/base/alert.tmpl
new file mode 100644
index 0000000..760d3bf
--- /dev/null
+++ b/base/alert.tmpl
@@ -0,0 +1,20 @@
+{{if .Flash.ErrorMsg}}
+	<div class="ui negative message flash-message flash-error">
+		<p>{{.Flash.ErrorMsg | SanitizeHTML}}</p>
+	</div>
+{{end}}
+{{if .Flash.SuccessMsg}}
+	<div class="ui positive message flash-message flash-success">
+		<p>{{.Flash.SuccessMsg | SanitizeHTML}}</p>
+	</div>
+{{end}}
+{{if .Flash.InfoMsg}}
+	<div class="ui info message flash-message flash-info">
+		<p>{{.Flash.InfoMsg | SanitizeHTML}}</p>
+	</div>
+{{end}}
+{{if .Flash.WarningMsg}}
+	<div class="ui warning message flash-message flash-warning">
+		<p>{{.Flash.WarningMsg | SanitizeHTML}}</p>
+	</div>
+{{end}}
diff --git a/base/alert_details.tmpl b/base/alert_details.tmpl
new file mode 100644
index 0000000..6d4c1fb
--- /dev/null
+++ b/base/alert_details.tmpl
@@ -0,0 +1,11 @@
+{{.Message}}
+{{if .Details}}
+<details>
+	<summary>{{.Summary}}</summary>
+	<code>{{.Details | SanitizeHTML}}</code>
+</details>
+{{else}}
+<div>
+	{{.Summary}}
+</div>
+{{end}}
diff --git a/base/disable_form_autofill.tmpl b/base/disable_form_autofill.tmpl
new file mode 100644
index 0000000..6f06395
--- /dev/null
+++ b/base/disable_form_autofill.tmpl
@@ -0,0 +1,31 @@
+{{/*
+Why we need to disable form autofill:
+1. Many pages contain different password inputs for different usages, eg: repo setting, autofill will make a mess.
+2. We have `areYouSure` confirm dialog if a user leaves a pages without submit.
+Autofill will make the form changed even if the user didn't input anything. Then the user keeps seeing annoying confirm dialog.
+
+In history, Gitea put `<input class="fake" type="password">` in forms to bypass the autofill,
+but there were still many forms suffered the autofill problem.
+
+Now we improve it.
+
+Solutions which do NOT work:
+1. Adding `autocomplete=off` doesn't help. New Chrome completely ignores it.
+2. Use a JavaScript to run in a few seconds later after the page is loaded to process the autofilled inputs, it doesn't work.
+Because for security reason, the inputs won't be filled before the user makes an interaction in the page.
+So we can not predict the correct time to run the JavaScript code.
+
+Solutions which work:
+1. Some hacky methods like: https://github.com/matteobad/detect-autofill
+2. This solution: use invisible inputs. Be aware of:
+(a) The inputs must be at the beginning of the form, and can not be hidden.
+(b) The input for username must have a valid name.
+(c) There should be no negative word (eg: fake) in the `name` attribute.
+(d) Chrome seems to use a weighted algorithm to choose an input to fill text, so the using "username" as input name is better than using "user".
+We make the names of these dummy inputs begin with an underline to indicate it is for special usage,
+and these dummy form values won't be used by backend code.
+*/}}
+<div class="autofill-dummy" aria-hidden="true">
+	<input type="text" name="_autofill_dummy_username" class="ays-ignore" tabindex="-1">
+	<input type="password" name="_autofill_dummy_password" class="ays-ignore" tabindex="-1">
+</div>
diff --git a/base/footer.tmpl b/base/footer.tmpl
new file mode 100644
index 0000000..fed426a
--- /dev/null
+++ b/base/footer.tmpl
@@ -0,0 +1,20 @@
+{{if false}}
+	{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+<html>
+<body>
+	<div>
+{{end}}
+
+	{{template "custom/body_inner_post" .}}
+
+	</div>
+
+	{{template "custom/body_outer_post" .}}
+
+	{{template "base/footer_content" .}}
+
+	<script src="{{AssetUrlPrefix}}/js/index.js?v={{AssetVersion}}" onerror="alert('Failed to load asset files from ' + this.src + '. Please make sure the asset files can be accessed.')"></script>
+
+	{{template "custom/footer" .}}
+</body>
+</html>
diff --git a/base/footer_content.tmpl b/base/footer_content.tmpl
new file mode 100644
index 0000000..60eb2fe
--- /dev/null
+++ b/base/footer_content.tmpl
@@ -0,0 +1,32 @@
+<footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}">
+	<div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}">
+		{{if ShowFooterPoweredBy}}
+			<a target="_blank" rel="noopener noreferrer" href="https://about.gitea.com">{{ctx.Locale.Tr "powered_by" "Gitea"}}</a>
+		{{end}}
+		{{if (or .ShowFooterVersion .PageIsAdmin)}}
+			{{ctx.Locale.Tr "version"}}:
+			{{if .IsAdmin}}
+				<a href="{{AppSubUrl}}/-/admin/config">{{AppVer}}</a>
+			{{else}}
+				{{AppVer}}
+			{{end}}
+		{{end}}
+		{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
+			{{ctx.Locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
+			{{ctx.Locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>
+		{{end}}
+	</div>
+	<div class="right-links" role="group" aria-label="{{ctx.Locale.Tr "aria.footer.links"}}">
+		<div class="ui dropdown upward">
+			<span class="flex-text-inline">{{svg "octicon-globe" 14}} {{ctx.Locale.LangName}}</span>
+			<div class="menu language-menu">
+				{{range .AllLangs -}}
+				<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq ctx.Locale.Lang .Lang}}selected{{end}}">{{.Name}}</a>
+				{{end -}}
+			</div>
+		</div>
+		<a href="{{AssetUrlPrefix}}/licenses.txt">{{ctx.Locale.Tr "licenses"}}</a>
+		{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
+		{{template "custom/extra_links_footer" .}}
+	</div>
+</footer>
diff --git a/base/head.tmpl b/base/head.tmpl
new file mode 100644
index 0000000..174267f
--- /dev/null
+++ b/base/head.tmpl
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html lang="{{ctx.Locale.Lang}}" data-theme="{{UserThemeName .SignedUser}}">
+<head>
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+	<title>{{if .Title}}{{.Title}} - {{end}}{{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}}</title>
+	{{if .ManifestData}}<link rel="manifest" href="data:{{.ManifestData}}">{{end}}
+	<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}">
+	<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}">
+	<meta name="keywords" content="{{MetaKeywords}}">
+	<meta name="referrer" content="no-referrer">
+{{if .GoGetImport}}
+	<meta name="go-import" content="{{.GoGetImport}} git {{.RepoCloneLink.HTTPS}}">
+	<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
+{{end}}
+{{if and .EnableFeed .FeedURL}}
+	<link rel="alternate" type="application/atom+xml" title="" href="{{.FeedURL}}.atom">
+	<link rel="alternate" type="application/rss+xml" title="" href="{{.FeedURL}}.rss">
+{{end}}
+	<link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml">
+	<link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
+	{{template "base/head_script" .}}
+	<noscript>
+		<style>
+			.dropdown:hover > .menu { display: block; }
+			.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
+		</style>
+	</noscript>
+	{{template "base/head_opengraph" .}}
+	{{template "base/head_style" .}}
+	{{template "custom/header" .}}
+</head>
+<body hx-headers='{"x-csrf-token": "{{.CsrfToken}}"}' hx-swap="outerHTML" hx-ext="morph" hx-push-url="false">
+	{{template "custom/body_outer_pre" .}}
+
+	<div class="full height">
+		<noscript>{{ctx.Locale.Tr "enable_javascript"}}</noscript>
+
+		{{template "custom/body_inner_pre" .}}
+
+		{{if not .PageIsInstall}}
+			{{template "base/head_navbar" .}}
+		{{end}}
+
+{{if false}}
+	{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+	</div>
+</body>
+</html>
+{{end}}
diff --git a/base/head_navbar.tmpl b/base/head_navbar.tmpl
new file mode 100644
index 0000000..86d73a2
--- /dev/null
+++ b/base/head_navbar.tmpl
@@ -0,0 +1,214 @@
+{{$notificationUnreadCount := 0}}
+{{if and .IsSigned .NotificationUnreadCount}}
+	{{$notificationUnreadCount = call .NotificationUnreadCount}}
+{{end}}
+
+<nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
+	<div class="navbar-left">
+		<!-- the logo -->
+		<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
+			<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
+		</a>
+
+		<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
+		<div class="ui secondary menu navbar-mobile-right only-mobile">
+			{{if and .IsSigned EnableTimetracking .ActiveStopwatch}}
+			<a id="mobile-stopwatch-icon" class="active-stopwatch item tw-mx-0" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{.ActiveStopwatch.Seconds}}">
+				<div class="tw-relative">
+					{{svg "octicon-stopwatch"}}
+					<span class="header-stopwatch-dot"></span>
+				</div>
+			</a>
+			{{end}}
+			{{if .IsSigned}}
+			<a id="mobile-notifications-icon" class="item tw-w-auto tw-p-2" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
+				<div class="tw-relative">
+					{{svg "octicon-bell"}}
+					<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
+				</div>
+			</a>
+			{{end}}
+			<button class="item tw-w-auto ui icon mini button tw-p-2 tw-m-0" id="navbar-expand-toggle" aria-label="{{ctx.Locale.Tr "home.nav_menu"}}">{{svg "octicon-three-bars"}}</button>
+		</div>
+
+		<!-- navbar links non-mobile -->
+		{{if and .IsSigned .MustChangePassword}}
+			{{/* No links */}}
+		{{else if .IsSigned}}
+			{{if not ctx.Consts.RepoUnitTypeIssues.UnitGlobalDisabled}}
+				<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{ctx.Locale.Tr "issues"}}</a>
+			{{end}}
+			{{if not ctx.Consts.RepoUnitTypePullRequests.UnitGlobalDisabled}}
+				<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{ctx.Locale.Tr "pull_requests"}}</a>
+			{{end}}
+			{{if not (and ctx.Consts.RepoUnitTypeIssues.UnitGlobalDisabled ctx.Consts.RepoUnitTypePullRequests.UnitGlobalDisabled)}}
+				{{if .ShowMilestonesDashboardPage}}
+					<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{ctx.Locale.Tr "milestones"}}</a>
+				{{end}}
+			{{end}}
+			<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
+		{{else if .IsLandingPageOrganizations}}
+			<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore"}}</a>
+		{{else}}
+			<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
+		{{end}}
+
+		{{template "custom/extra_links" .}}
+
+		{{if not .IsSigned}}
+			<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
+		{{end}}
+	</div>
+
+	<!-- the full dropdown menus -->
+	<div class="navbar-right">
+		{{if and .IsSigned .MustChangePassword}}
+			<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
+				<span class="text tw-flex tw-items-center">
+					{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
+					<span class="only-mobile tw-ml-2">{{.SignedUser.Name}}</span>
+					<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
+				</span>
+				<div class="menu user-menu">
+					<div class="header">
+						{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
+					</div>
+
+					<div class="divider"></div>
+					<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
+						{{svg "octicon-sign-out"}}
+						{{ctx.Locale.Tr "sign_out"}}
+					</a>
+				</div><!-- end content avatar menu -->
+			</div><!-- end dropdown avatar menu -->
+		{{else if .IsSigned}}
+			{{if and EnableTimetracking .ActiveStopwatch}}
+			<a class="item not-mobile active-stopwatch tw-mx-0" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{.ActiveStopwatch.Seconds}}">
+				<div class="tw-relative">
+					{{svg "octicon-stopwatch"}}
+					<span class="header-stopwatch-dot"></span>
+				</div>
+			</a>
+			{{end}}
+
+			<a class="item not-mobile tw-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
+				<div class="tw-relative">
+					{{svg "octicon-bell"}}
+					<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
+				</div>
+			</a>
+
+			<div class="ui dropdown jump item tw-mx-0 tw-pr-2" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
+				<span class="text">
+					{{svg "octicon-plus"}}
+					<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
+					<span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
+				</span>
+				<div class="menu">
+					<a class="item" href="{{AppSubUrl}}/repo/create">
+						{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
+					</a>
+					{{if not .DisableMigrations}}
+						<a class="item" href="{{AppSubUrl}}/repo/migrate">
+							{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
+						</a>
+					{{end}}
+					{{if .SignedUser.CanCreateOrganization}}
+					<a class="item" href="{{AppSubUrl}}/org/create">
+						{{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
+					</a>
+					{{end}}
+				</div><!-- end content create new menu -->
+			</div><!-- end dropdown menu create new -->
+
+			<div class="ui dropdown jump item tw-mx-0 tw-pr-2" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
+				<span class="text tw-flex tw-items-center">
+					{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
+					<span class="only-mobile tw-ml-2">{{.SignedUser.Name}}</span>
+					<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
+				</span>
+				<div class="menu user-menu">
+					<div class="header">
+						{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
+					</div>
+
+					<div class="divider"></div>
+					<a class="item" href="{{.SignedUser.HomeLink}}">
+						{{svg "octicon-person"}}
+						{{ctx.Locale.Tr "your_profile"}}
+					</a>
+					{{if not .DisableStars}}
+						<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
+							{{svg "octicon-star"}}
+							{{ctx.Locale.Tr "your_starred"}}
+						</a>
+					{{end}}
+					<a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
+						{{svg "octicon-bell"}}
+						{{ctx.Locale.Tr "notification.subscriptions"}}
+					</a>
+					<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
+						{{svg "octicon-tools"}}
+						{{ctx.Locale.Tr "your_settings"}}
+					</a>
+					<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
+						{{svg "octicon-question"}}
+						{{ctx.Locale.Tr "help"}}
+					</a>
+					{{if .IsAdmin}}
+						<div class="divider"></div>
+
+						<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/-/admin">
+							{{svg "octicon-server"}}
+							{{ctx.Locale.Tr "admin_panel"}}
+						</a>
+					{{end}}
+
+					<div class="divider"></div>
+					<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
+						{{svg "octicon-sign-out"}}
+						{{ctx.Locale.Tr "sign_out"}}
+					</a>
+				</div><!-- end content avatar menu -->
+			</div><!-- end dropdown avatar menu -->
+		{{else}}
+			{{if .ShowRegistrationButton}}
+				<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
+					{{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
+				</a>
+			{{end}}
+			<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
+				{{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
+			</a>
+		{{end}}
+	</div><!-- end full right menu -->
+
+	{{if and .IsSigned EnableTimetracking .ActiveStopwatch}}
+		<div class="active-stopwatch-popup tippy-target">
+			<div class="tw-flex tw-items-center tw-gap-2 tw-p-3">
+				<a class="stopwatch-link tw-flex tw-items-center tw-gap-2 muted" href="{{.ActiveStopwatch.IssueLink}}">
+					{{svg "octicon-issue-opened" 16}}
+					<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
+				</a>
+				<div class="tw-flex tw-gap-1">
+					<form class="stopwatch-commit form-fetch-action" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
+						{{.CsrfTokenHtml}}
+						<button
+							type="submit"
+							class="ui button mini compact basic icon tw-mr-0"
+							data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
+						>{{svg "octicon-square-fill"}}</button>
+					</form>
+					<form class="stopwatch-cancel form-fetch-action" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
+						{{.CsrfTokenHtml}}
+						<button
+							type="submit"
+							class="ui button mini compact basic icon tw-mr-0"
+							data-tooltip-content="{{ctx.Locale.Tr "repo.issues.cancel_tracking"}}"
+						>{{svg "octicon-trash"}}</button>
+					</form>
+				</div>
+			</div>
+		</div>
+	{{end}}
+</nav>
diff --git a/base/head_opengraph.tmpl b/base/head_opengraph.tmpl
new file mode 100644
index 0000000..f1f3899
--- /dev/null
+++ b/base/head_opengraph.tmpl
@@ -0,0 +1,47 @@
+{{- /* og:description - a one to two sentence description of your object, maybe it only needs at most 300 bytes */ -}}
+{{if .PageIsUserProfile}}
+	<meta property="og:title" content="{{.ContextUser.DisplayName}}">
+	<meta property="og:type" content="profile">
+	<meta property="og:image" content="{{.ContextUser.AvatarLink ctx}}">
+	<meta property="og:url" content="{{.ContextUser.HTMLURL}}">
+	{{if .ContextUser.Description}}
+		<meta property="og:description" content="{{StringUtils.EllipsisString .ContextUser.Description 300}}">
+	{{end}}
+{{else if .Repository}}
+	{{if .Issue}}
+		<meta property="og:title" content="{{.Issue.Title}}">
+		<meta property="og:url" content="{{.Issue.HTMLURL}}">
+		{{if .Issue.Content}}
+			<meta property="og:description" content="{{StringUtils.EllipsisString .Issue.Content 300}}">
+		{{end}}
+	{{else if or .PageIsDiff .IsViewFile}}
+		<meta property="og:title" content="{{.Title}}">
+		<meta property="og:url" content="{{AppUrl}}{{.Link}}">
+		{{if and .PageIsDiff .Commit}}
+			{{- $commitMessageParts := StringUtils.Cut .Commit.Message "\n" -}}
+			{{- $commitMessageBody := index $commitMessageParts 1 -}}
+			{{- if $commitMessageBody -}}
+				<meta property="og:description" content="{{StringUtils.EllipsisString $commitMessageBody 300}}">
+			{{- end -}}
+		{{end}}
+	{{else}}
+		<meta property="og:title" content="{{.Repository.Name}}">
+		<meta property="og:url" content="{{.Repository.HTMLURL}}">
+		{{if .Repository.Description}}
+			<meta property="og:description" content="{{StringUtils.EllipsisString .Repository.Description 300}}">
+		{{end}}
+	{{end}}
+	<meta property="og:type" content="object">
+	{{if (.Repository.AvatarLink ctx)}}
+		<meta property="og:image" content="{{.Repository.AvatarLink ctx}}">
+	{{else}}
+		<meta property="og:image" content="{{.Repository.Owner.AvatarLink ctx}}">
+	{{end}}
+{{else}}
+	<meta property="og:title" content="{{AppName}}">
+	<meta property="og:type" content="website">
+	<meta property="og:image" content="{{AssetUrlPrefix}}/img/logo.png">
+	<meta property="og:url" content="{{AppUrl}}">
+	<meta property="og:description" content="{{MetaDescription}}">
+{{end}}
+<meta property="og:site_name" content="{{AppName}}">
diff --git a/base/head_script.tmpl b/base/head_script.tmpl
new file mode 100644
index 0000000..c0c7235
--- /dev/null
+++ b/base/head_script.tmpl
@@ -0,0 +1,50 @@
+{{/*
+==== DO NOT EDIT ====
+If you are customizing Gitea, please do not change this file.
+If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly.
+*/}}
+<script>
+	{{/* before our JS code gets loaded, use arrays to store errors, then the arrays will be switched to our error handler later */}}
+	window.addEventListener('error', function(e) {window._globalHandlerErrors=window._globalHandlerErrors||[]; window._globalHandlerErrors.push(e);});
+	window.addEventListener('unhandledrejection', function(e) {window._globalHandlerErrors=window._globalHandlerErrors||[]; window._globalHandlerErrors.push(e);});
+	window.config = {
+		appUrl: '{{AppUrl}}',
+		appSubUrl: '{{AppSubUrl}}',
+		assetVersionEncoded: encodeURIComponent('{{AssetVersion}}'), // will be used in URL construction directly
+		assetUrlPrefix: '{{AssetUrlPrefix}}',
+		runModeIsProd: {{.RunModeIsProd}},
+		customEmojis: {{CustomEmojis}},
+		csrfToken: '{{.CsrfToken}}',
+		pageData: {{.PageData}},
+		notificationSettings: {{NotificationSettings}}, {{/*a map provided by NewFuncMap in helper.go*/}}
+		enableTimeTracking: {{EnableTimetracking}},
+		{{if or .Participants .Assignees .MentionableTeams}}
+		mentionValues: Array.from(new Map([
+			{{- range .Participants -}}
+				['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}', name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink ctx}}'}],
+			{{- end -}}
+			{{- range .Assignees -}}
+				['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}', name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink ctx}}'}],
+			{{- end -}}
+			{{- range .MentionableTeams -}}
+				['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}', name: '{{$.MentionableTeamsOrg}}/{{.Name}}', avatar: '{{$.MentionableTeamsOrgAvatar}}'}],
+			{{- end -}}
+		]).values()),
+		{{end}}
+		mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}},
+		{{/* this global i18n object should only contain general texts. for specialized texts, it should be provided inside the related modules by: (1) API response (2) HTML data-attribute (3) PageData */}}
+		i18n: {
+			copy_success: {{ctx.Locale.Tr "copy_success"}},
+			copy_error: {{ctx.Locale.Tr "copy_error"}},
+			error_occurred: {{ctx.Locale.Tr "error.occurred"}},
+			network_error: {{ctx.Locale.Tr "error.network_error"}},
+			remove_label_str: {{ctx.Locale.Tr "remove_label_str"}},
+			modal_confirm: {{ctx.Locale.Tr "modal.confirm"}},
+			modal_cancel: {{ctx.Locale.Tr "modal.cancel"}},
+			more_items: {{ctx.Locale.Tr "more_items"}},
+		},
+	};
+	{{/* in case some pages don't render the pageData, we make sure it is an object to prevent null access */}}
+	window.config.pageData = window.config.pageData || {};
+</script>
+<script src="{{AssetUrlPrefix}}/js/webcomponents.js?v={{AssetVersion}}"></script>
diff --git a/base/head_style.tmpl b/base/head_style.tmpl
new file mode 100644
index 0000000..f97e188
--- /dev/null
+++ b/base/head_style.tmpl
@@ -0,0 +1,2 @@
+<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/index.css?v={{AssetVersion}}">
+<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{UserThemeName .SignedUser | PathEscape}}.css?v={{AssetVersion}}">
diff --git a/base/markup_codepreview.tmpl b/base/markup_codepreview.tmpl
new file mode 100644
index 0000000..a1a4f26
--- /dev/null
+++ b/base/markup_codepreview.tmpl
@@ -0,0 +1,25 @@
+<div class="code-preview-container file-content">
+	<div class="code-preview-header">
+		<a href="{{.FullURL}}" class="muted" rel="nofollow">{{.FilePath}}</a>
+		{{$link := HTMLFormat `<a href="%s/src/commit/%s" rel="nofollow">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
+		{{- if eq .LineStart .LineStop -}}
+			{{ctx.Locale.Tr "repo.code_preview_line_in" .LineStart $link}}
+		{{- else -}}
+			{{ctx.Locale.Tr "repo.code_preview_line_from_to" .LineStart .LineStop $link}}
+		{{- end}}
+	</div>
+	<table class="file-view">
+		<tbody>
+			{{- range $idx, $line := .HighlightLines -}}
+			<tr>
+				<td class="lines-num"><span data-line-number="{{$line.Num}}"></span></td>
+				{{- if $.EscapeStatus.Escaped -}}
+					{{- $lineEscapeStatus := index $.LineEscapeStatus $idx -}}
+					<td class="lines-escape">{{if $lineEscapeStatus.Escaped}}<a href="#" class="toggle-escape-button btn interact-bg" title="{{if $lineEscapeStatus.HasInvisible}}{{ctx.Locale.Tr "repo.invisible_runes_line"}} {{end}}{{if $lineEscapeStatus.HasAmbiguous}}{{ctx.Locale.Tr "repo.ambiguous_runes_line"}}{{end}}"></a>{{end}}</td>
+				{{- end}}
+				<td class="lines-code chroma"><div class="code-inner">{{$line.FormattedContent}}</div></td>{{/* only div works, span generates incorrect HTML structure */}}
+			</tr>
+			{{- end -}}
+		</tbody>
+	</table>
+</div>
diff --git a/base/modal_actions_confirm.tmpl b/base/modal_actions_confirm.tmpl
new file mode 100644
index 0000000..9f7eb4a
--- /dev/null
+++ b/base/modal_actions_confirm.tmpl
@@ -0,0 +1,27 @@
+{{/*
+Two buttons (negative, positive):
+* ModalButtonTypes: "yes" (default) or "confirm"
+* ModalButtonCancelText
+* ModalButtonOkText
+
+Single danger button (GitHub-like):
+* ModalButtonDangerText "This action will destroy your data"
+
+The ".ok.button" and ".cancel.button" selectors are also used by Fomantic Modal internally
+*/}}
+<div class="actions">
+	{{if .ModalButtonDangerText}}
+		<button class="ui danger red ok button">{{.ModalButtonDangerText}}</button>
+	{{else}}
+		{{$textNegitive := ctx.Locale.Tr "modal.no"}}
+		{{$textPositive := ctx.Locale.Tr "modal.yes"}}
+		{{if eq .ModalButtonTypes "confirm"}}
+			{{$textNegitive = ctx.Locale.Tr "modal.cancel"}}
+			{{$textPositive = ctx.Locale.Tr "modal.confirm"}}
+		{{end}}
+		{{if .ModalButtonCancelText}}{{$textNegitive = .ModalButtonCancelText}}{{end}}
+		{{if .ModalButtonOkText}}{{$textPositive = .ModalButtonOkText}}{{end}}
+		<button class="ui cancel button">{{svg "octicon-x"}} {{$textNegitive}}</button>
+		<button class="ui primary ok button">{{svg "octicon-check"}} {{$textPositive}}</button>
+	{{end}}
+</div>
diff --git a/base/paginate.tmpl b/base/paginate.tmpl
new file mode 100644
index 0000000..253892c
--- /dev/null
+++ b/base/paginate.tmpl
@@ -0,0 +1,34 @@
+{{$paginationParams := .Page.GetParams}}
+{{$paginationLink := $.Link}}
+{{if eq $paginationLink AppSubUrl}}{{$paginationLink = print $paginationLink "/"}}{{end}}
+{{with .Page.Paginater}}
+	{{if gt .TotalPages 1}}
+		<div class="center page buttons">
+			<div class="ui borderless pagination menu">
+				<a class="{{if .IsFirst}}disabled{{end}} item navigation" {{if not .IsFirst}}href="{{$paginationLink}}{{if $paginationParams}}?{{$paginationParams}}{{end}}"{{end}}>
+					{{svg "gitea-double-chevron-left" 16 "tw-mr-1"}}
+					<span class="navigation_label">{{ctx.Locale.Tr "admin.first_page"}}</span>
+				</a>
+				<a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$paginationLink}}?page={{.Previous}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
+					{{svg "octicon-chevron-left" 16 "tw-mr-1"}}
+					<span class="navigation_label">{{ctx.Locale.Tr "repo.issues.previous"}}</span>
+				</a>
+				{{range .Pages}}
+					{{if eq .Num -1}}
+						<a class="disabled item">...</a>
+					{{else}}
+						<a class="{{if .IsCurrent}}active {{end}}item" {{if not .IsCurrent}}href="{{$paginationLink}}?page={{.Num}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>{{.Num}}</a>
+					{{end}}
+				{{end}}
+				<a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$paginationLink}}?page={{.Next}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
+					<span class="navigation_label">{{ctx.Locale.Tr "repo.issues.next"}}</span>
+					{{svg "octicon-chevron-right" 16 "tw-ml-1"}}
+				</a>
+				<a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$paginationLink}}?page={{.TotalPages}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
+					<span class="navigation_label">{{ctx.Locale.Tr "admin.last_page"}}</span>
+					{{svg "gitea-double-chevron-right" 16 "tw-ml-1"}}
+				</a>
+			</div>
+		</div>
+	{{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_links_footer.tmpl b/custom/extra_links_footer.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/devtest/devtest-footer.tmpl b/devtest/devtest-footer.tmpl
new file mode 100644
index 0000000..a1b3b86
--- /dev/null
+++ b/devtest/devtest-footer.tmpl
@@ -0,0 +1,3 @@
+{{/* TODO: the devtest.js is isolated from index.js, so no module is shared and many index.js functions do not work in devtest.ts */}}
+<script src="{{AssetUrlPrefix}}/js/devtest.js?v={{AssetVersion}}"></script>
+{{template "base/footer" ctx.RootData}}
diff --git a/devtest/devtest-header.tmpl b/devtest/devtest-header.tmpl
new file mode 100644
index 0000000..ee08545
--- /dev/null
+++ b/devtest/devtest-header.tmpl
@@ -0,0 +1,2 @@
+{{template "base/head" ctx.RootData}}
+<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/devtest.css?v={{AssetVersion}}">
diff --git a/devtest/devtest-list.tmpl b/devtest/devtest-list.tmpl
new file mode 100644
index 0000000..71ee680
--- /dev/null
+++ b/devtest/devtest-list.tmpl
@@ -0,0 +1,13 @@
+{{template "devtest/devtest-header"}}
+<ul>
+	{{range .SubNames}}
+	<li><a href="{{AppSubUrl}}/devtest/{{.}}">{{.}}</a></li>
+	{{end}}
+</ul>
+
+<style>
+ul {
+	line-height: 2em;
+}
+</style>
+{{template "devtest/devtest-footer"}}
diff --git a/devtest/fetch-action.tmpl b/devtest/fetch-action.tmpl
new file mode 100644
index 0000000..4ee824f
--- /dev/null
+++ b/devtest/fetch-action.tmpl
@@ -0,0 +1,45 @@
+{{template "devtest/devtest-header"}}
+<div class="page-content devtest ui container">
+	{{template "base/alert" .}}
+	<div>
+		<h1>link-action</h1>
+		<div>
+			Use "window.fetch" to send a request to backend, the request is defined in an "A" or "BUTTON" element.
+			It might be renamed to "link-fetch-action" to match the "form-fetch-action".
+		</div>
+		<div>
+			<button class="link-action" data-url="fetch-action-test?k=1">test action</button>
+			<button class="link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with confirm</button>
+			<button class="ui red button link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with risky confirm</button>
+			<button class="ui button link-action" data-url="fetch-action-test?k=1" data-modal-confirm-header="confirm header" data-modal-confirm-content="confirm content">test with confirm header</button>
+		</div>
+	</div>
+	<div>
+		<h1>form-fetch-action</h1>
+		<div>Use "window.fetch" to send a form request to backend</div>
+		<div>
+			<form method="get" action="fetch-action-test?k=1" class="form-fetch-action">
+				<button name="btn">submit get</button>
+			</form>
+			<form method="post" action="fetch-action-test?k=1" class="form-fetch-action">
+				<div><textarea name="text" rows="3"></textarea></div>
+				<div><label><input name="check" type="checkbox"> check</label></div>
+				<div><button name="btn">submit post</button></div>
+			</form>
+			<form method="post" action="no-such-uri" class="form-fetch-action">
+				<div class="tw-py-8">bad action url</div>
+				<div><button name="btn">submit test</button></div>
+			</form>
+		</div>
+	</div>
+</div>
+<style>
+	.ui.message.flash-message {
+		text-align: left;
+	}
+	.form-fetch-action {
+		margin-bottom: 1em;
+		border: 1px red dashed; /* show the border for demo purpose */
+	}
+</style>
+{{template "devtest/devtest-footer"}}
diff --git a/devtest/flex-list.tmpl b/devtest/flex-list.tmpl
new file mode 100644
index 0000000..11d71d5
--- /dev/null
+++ b/devtest/flex-list.tmpl
@@ -0,0 +1,114 @@
+{{template "devtest/devtest-header"}}
+<div class="page-content devtest">
+	<div class="ui container">
+		<h1>Flex List (standalone)</h1>
+		<div class="divider"></div>
+		<div class="flex-list">
+			<div class="flex-item">
+				<div class="flex-item-leading">
+					{{svg "octicon-info" 32}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-title">
+						Flex Item
+						<span class="ui basic label">
+							with label
+						</span>
+					</div>
+					<div class="flex-item-body">
+						consists of leading/main/trailing part
+					</div>
+					<div class="flex-item-body">
+						main part contains title and (multiple) body lines
+					</div>
+				</div>
+				<div class="flex-item-trailing">
+					<button class="ui tiny red button">
+						{{svg "octicon-alert" 14}} CJK文本测试
+					</button>
+					<button class="ui tiny primary button">
+						{{svg "octicon-info" 14}} Button
+					</button>
+					<button class="ui tiny primary button">
+						Button with long text
+					</button>
+				</div>
+			</div>
+
+			<div class="flex-item">
+				<div class="flex-item-leading">
+					{{svg "octicon-info" 32}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-title">
+						Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong title
+					</div>
+					<div class="flex-item-body">
+						consists of leading/main/trailing part
+					</div>
+					<div class="flex-item-body">
+						Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content
+						<span class="text truncate">Truncate very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content</span>
+					</div>
+				</div>
+				<div class="flex-item-trailing">
+					<button class="ui tiny red button">
+						{{svg "octicon-alert" 12}} CJK文本测试 <!-- single CJK text test, it shouldn't be horizontal -->
+					</button>
+				</div>
+			</div>
+
+			<div class="flex-item">
+				<div class="flex-item-leading">
+					{{svg "octicon-repo" 32}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-header">
+						<div class="flex-item-title">
+							<a class="text primary" href="{{$.Link}}">
+								gitea-org / gitea
+							</a>
+							<span data-tooltip-content="{{ctx.Locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
+						</div>
+						<div class="flex-item-trailing">
+							<a class="muted" href="{{$.Link}}">
+								<span class="flex-text-inline"><i class="color-icon tw-mr-2 tw-bg-blue"></i>Go</span>
+							</a>
+							<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-star" 16}}45000</a>
+							<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-git-branch" 16}}1234</a>
+						</div>
+					</div>
+					<div class="flex-item-body">
+						when inside header, the trailing part will wrap below the title
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<div class="divider"></div>
+
+		<h1>Flex List (with "ui segment")</h1>
+		<div class="ui attached segment">
+			<div class="flex-list">
+				<div class="flex-item">item 1</div>
+				<div class="flex-item">item 2</div>
+			</div>
+		</div>
+		<div class="ui attached segment">
+			<h1>Flex List (with "ui segment")</h1>
+			<div class="flex-list">
+				<div class="flex-item">item 1</div>
+				<div class="flex-item">item 2</div>
+			</div>
+		</div>
+
+		<h1>If parent provides the padding/margin space:</h1>
+		<div class="tw-border tw-border-secondary tw-py-4">
+			<div class="flex-list flex-space-fitted">
+				<div class="flex-item">item 1 (no padding top)</div>
+				<div class="flex-item">item 2 (no padding bottom)</div>
+			</div>
+		</div>
+	</div>
+</div>
+{{template "devtest/devtest-footer"}}
diff --git a/devtest/fomantic-dropdown.tmpl b/devtest/fomantic-dropdown.tmpl
new file mode 100644
index 0000000..d41a161
--- /dev/null
+++ b/devtest/fomantic-dropdown.tmpl
@@ -0,0 +1,130 @@
+{{template "devtest/devtest-header"}}
+<div class="page-content devtest ui container">
+	<div>
+		<h2>Dropdown</h2>
+		<div>
+			<div class="ui dropdown tw-border tw-border-red tw-border-dashed" data-tooltip-content="border for demo purpose only">
+				<span class="text">search-input &amp; flex-item in menu</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				<div class="menu flex-items-menu">
+					<div class="ui icon search input"><i class="icon">{{svg "octicon-search"}}</i><input type="text" value="search input in menu"></div>
+					<div class="item"><input type="radio">item</div>
+					<div class="item"><input type="radio">item</div>
+				</div>
+			</div>
+			<div class="ui search selection dropdown">
+				<span class="text">search ...</span>
+				<input name="value" class="search">
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				{{svg "octicon-x" 14 "remove icon"}}
+				<div class="menu">
+					<div class="item">item</div>
+				</div>
+			</div>
+			<div class="ui multiple selection dropdown">
+				<input class="hidden" value="1">
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				{{svg "octicon-x" 14 "remove icon"}}
+				<div class="default text">empty multiple dropdown</div>
+				<div class="menu">
+					<div class="item">item</div>
+					<div class="item">sm1</div>
+					<div class="item">sm2</div>
+					<div class="item">medium1</div>
+					<div class="item">medium2</div>
+					<div class="item">large item1</div>
+					<div class="item">large item2</div>
+					<div class="item">large item3</div>
+					<div class="item">very large item test 1</div>
+					<div class="item">very large item test 2</div>
+					<div class="item">very large item test 3</div>
+				</div>
+			</div>
+			<div class="ui buttons">
+				<button class="ui button">Button with Dropdown</button>
+				<div class="ui dropdown button icon">
+					{{svg "octicon-triangle-down"}}
+					<div class="menu">
+						<div class="item">item</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div>
+			<div class="ui multiple clearable search selection dropdown tw-max-w-[220px]">
+				<input type="hidden" value="1,2,3,4,5,10">
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				{{svg "octicon-x" 14 "remove icon"}}
+				<div class="default text">clearable search dropdown</div>
+				<div class="menu">
+					<div class="item" data-value="1">item</div>
+					<div class="item" data-value="2">sm1</div>
+					<div class="item" data-value="3">sm2</div>
+					<div class="item" data-value="4">medium1</div>
+					<div class="item" data-value="5">medium2</div>
+					<div class="item" data-value="6">large item1</div>
+					<div class="item" data-value="7">large item2</div>
+					<div class="item" data-value="8">large item3</div>
+					<div class="item" data-value="9">very large item test 1</div>
+					<div class="item" data-value="10">very large item test 2</div>
+					<div class="item" data-value="11">very large item test 3</div>
+				</div>
+			</div>
+		</div>
+
+		<h2>Selection</h2>
+		<div>
+			{{/* the "selection" class is optional, it will be added by JS automatically */}}
+			<select class="ui dropdown selection ellipsis-items-nowrap">
+				<option>a</option>
+				<option>abcdefuvwxyz</option>
+				<option>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooong</option>
+			</select>
+			<select class="ui dropdown ellipsis-items-nowrap tw-max-w-[8em]">
+				<option>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooong</option>
+				<option>abcdefuvwxyz</option>
+				<option>a</option>
+			</select>
+		</div>
+		<h2>Dropdown Button (demo only without menu)</h2>
+		<div>
+			<div class="ui dropdown mini button">
+				<span class="text">mini dropdown</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			</div>
+			<div class="ui dropdown tiny button">
+				<span class="text">tiny dropdown</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			</div>
+			<div class="ui button dropdown">
+				<span class="text">button dropdown</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			</div>
+		</div>
+
+		<div>
+			<div class="ui dropdown mini compact button">
+				<span class="text">mini compact</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			</div>
+			<div class="ui dropdown tiny compact button">
+				<span class="text">tiny compact</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			</div>
+			<div class="ui button compact dropdown">
+				<span class="text">button compact</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			</div>
+		</div>
+
+		<div>
+			<hr>
+			<div class="ui tiny button">Other button align with ...</div>
+			<div class="ui dropdown tiny button">
+				<span class="text">... Dropdown Button</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			</div>
+		</div>
+	</div>
+</div>
+{{template "devtest/devtest-footer"}}
diff --git a/devtest/fomantic-modal.tmpl b/devtest/fomantic-modal.tmpl
new file mode 100644
index 0000000..2fbe2bd
--- /dev/null
+++ b/devtest/fomantic-modal.tmpl
@@ -0,0 +1,95 @@
+{{template "devtest/devtest-header"}}
+<div class="page-content devtest ui container">
+	{{template "base/alert" .}}
+	<div class="modal-buttons flex-text-block tw-flex-wrap"></div>
+	<script type="module">
+		for (const el of $('.ui.modal:not([data-skip-button])')) {
+			const $btn = $('<button class="ui button">').text(`${el.id}`).on('click', () => {
+				$(el).modal({onApprove() {alert('confirmed')}}).modal('show');
+			});
+			$('.modal-buttons').append($btn);
+		}
+	</script>
+
+	<div id="test-modal-form-1" class="ui mini modal">
+		<div class="header">Form dialog (layout 1)</div>
+		<form class="content" method="post">
+			<div class="ui input tw-w-full"><input name="user_input"></div>
+			{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+		</form>
+	</div>
+
+	<div id="test-modal-form-2" class="ui mini modal">
+		<div class="header">Form dialog (layout 2)</div>
+		<form method="post">
+			<div class="content">
+				<div class="ui input tw-w-full"><input name="user_input"></div>
+				{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+			</div>
+		</form>
+	</div>
+
+	<div id="test-modal-form-3" class="ui mini modal">
+		<div class="header">Form dialog (layout 3)</div>
+		<form method="post">
+			<div class="content">
+				<div class="ui input tw-w-full"><input name="user_input"></div>
+			</div>
+			{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+		</form>
+	</div>
+
+	<div id="test-modal-form-4" class="ui mini modal">
+		<div class="header">Form dialog (layout 4)</div>
+		<div class="content">
+			<div class="ui input tw-w-full"><input name="user_input"></div>
+		</div>
+		<form method="post">
+			{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+		</form>
+	</div>
+
+	<div class="ui g-modal-confirm modal" id="test-modal-default">
+		<div class="header">{{svg "octicon-file"}} Default dialog <span>title</span></div>
+		<div class="content">
+			very long aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+		</div>
+		{{template "base/modal_actions_confirm"}}
+	</div>
+
+	<div class="ui g-modal-confirm modal" id="test-modal-confirm">
+		<div class="header">Confirm dialog</div>
+		<div class="content">hello, this is the modal dialog content</div>
+		{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+	</div>
+
+	<div class="ui g-modal-confirm modal" id="test-modal-danger">
+		{{svg "octicon-x" 16 "inside close"}}
+		<div class="header">dangerous action dialog</div>
+		<div class="content">hello, this is the modal dialog content, this is a dangerous operation</div>
+		{{template "base/modal_actions_confirm" (dict "ModalButtonDangerText" "I know and must do  this is dangerous operation")}}
+	</div>
+
+	<div class="divider"></div>
+
+	<button class="show-modal" data-modal="#test-modal-fill-values"
+		data-modal-fill-by-id="value for id"
+		data-modal-fill-by-name="value for name"
+		data-modal-fill-by-class="value for class"
+		data-modal-p="value for tag"
+		data-modal-a.text-content="fill with attr"
+	>test-modal-fill-values</button>
+
+	<div id="test-modal-fill-values" class="ui mini modal" data-skip-button>
+		<div class="header">Modal dialog (fill values)</div>
+		<form class="content">
+			<div id="fill-by-id"></div>
+			<input name="fill-by-name">
+			<div class="fill-by-class"></div>
+			<p></p>
+			<a href="#">link</a>
+			{{template "base/modal_actions_confirm" dict}}
+		</form>
+	</div>
+</div>
+{{template "devtest/devtest-footer"}}
diff --git a/devtest/gitea-ui.tmpl b/devtest/gitea-ui.tmpl
new file mode 100644
index 0000000..5b40268
--- /dev/null
+++ b/devtest/gitea-ui.tmpl
@@ -0,0 +1,194 @@
+{{template "devtest/devtest-header"}}
+<div class="page-content devtest ui container">
+	<div>
+		<h1>Link</h1>
+		<div>
+			<a href="#">normal</a>
+			<a class="muted" href="#">muted</a>
+			<a class="suppressed" href="#">suppressed</a>
+			<a class="silenced" href="#">silenced</a>
+		</div>
+		<h1>Button</h1>
+		<div>
+			Style:
+			<label><input type="checkbox" name="button-style-compact" value="compact">compact</label>
+			<label><input type="radio" name="button-style-size" value="">(normal)</label>
+			<label><input type="radio" name="button-style-size" value="tiny">tiny</label>
+			<label><input type="radio" name="button-style-size" value="mini">mini</label>
+		</div>
+		<div>
+			State:
+			<label><input type="checkbox" name="button-state-disabled" value="disabled">disabled</label>
+		</div>
+		<div id="devtest-button-samples">
+			<ul class="button-sample-groups">
+				<li class="sample-group">
+					<h2>General purpose:</h2>
+					<button class="ui button">Unclassed</button>
+					<button class="ui basic button">Basic Unclassed</button>
+					<button class="ui primary button">Primary</button>
+					<button class="ui basic primary button">Basic Primary</button>
+				</li>
+				<li class="sample-group">
+					<h2>Recommended colors:</h2>
+					<button class="ui red button">Red</button>
+					<button class="ui basic red button">Basic Red</button>
+					<button class="ui green button">Green</button>
+					<button class="ui basic green button">Basic Green</button>
+				</li>
+				<li class="sample-group">
+					<h2>Inline / Plain:</h2>
+					<div class="tw-my-1">
+						<button class="btn tw-p-2">Plain button</button>
+						<button class="btn interact-fg tw-p-2">Plain button with interact fg</button>
+						<button class="btn interact-bg tw-p-2">Plain button with interact bg</button>
+					</div>
+				</li>
+			</ul>
+			<script type="module">
+				const $buttons = $('#devtest-button-samples').find('button.ui');
+
+				const $buttonStyles = $('input[name*="button-style"]');
+				$buttonStyles.on('click', () => $buttonStyles.map((_ ,el) => $buttons.toggleClass(el.value, el.checked)));
+
+				const $buttonStates = $('input[name*="button-state"]');
+				$buttonStates.on('click', () => $buttonStates.map((_ ,el) => $buttons.prop(el.value, el.checked)));
+			</script>
+		</div>
+	</div>
+
+	<div>
+		<h1>Buttons</h1>
+		<div class="ui buttons"><button class="ui button">1</button><button class="ui button">2</button><button class="ui button">3</button></div>
+		<div class="ui buttons"><button class="ui button active">1</button><button class="ui button">2</button><button class="ui button">3</button></div>
+		<div class="ui buttons"><button class="ui button">1</button><button class="ui button active">2</button><button class="ui button">3</button></div>
+		<div class="ui buttons"><button class="ui button">1</button><button class="ui button">2</button><button class="ui button active">3</button></div>
+	</div>
+
+	<div>
+		<h1>Tooltip</h1>
+		<div><span data-tooltip-content="test tooltip">text with tooltip</span></div>
+		<div><span data-tooltip-content="test tooltip" data-tooltip-interactive="true">text with interactive tooltip</span></div>
+	</div>
+
+	<div>
+		<h1>Loading</h1>
+		<div class="is-loading loading-icon-2px tw-border tw-border-secondary tw-py-1"><span>loading ...</span></div>
+		<div class="is-loading tw-border tw-border-secondary tw-py-4">
+			<p>loading ...</p>
+			<p>loading ...</p>
+			<p>loading ...</p>
+			<p>loading ...</p>
+		</div>
+	</div>
+
+	<div>
+		<h1>&lt;origin-url&gt;</h1>
+		<div><origin-url data-url="test/url"></origin-url></div>
+		<div><origin-url data-url="/test/url"></origin-url></div>
+	</div>
+
+	<div>
+		<h1>&lt;overflow-menu&gt;</h1>
+		<overflow-menu class="ui secondary pointing tabular borderless menu">
+			<div class="overflow-menu-items">
+				<a class="active item">item</a>
+				<a class="item">item 1</a>
+				<a class="item">item 2</a>
+				<a class="item">item 3</a>
+				<a class="item">item 4</a>
+				<a class="item">item 5</a>
+				<a class="item">item 6</a>
+				<a class="item">item 7</a>
+				<a class="item">item 8</a>
+				<a class="item">item 9</a>
+				<a class="item">item 10</a>
+				<a class="item">item 11</a>
+				<a class="item">item 12</a>
+				<a class="item">item 13</a>
+				<a class="item">item 14</a>
+				<a class="item">item 15</a>
+				<a class="item">item 16</a>
+				<a class="item">item 17</a>
+				<a class="item">item 18</a>
+			</div>
+		</overflow-menu>
+	</div>
+
+	<div>
+		<h1>GiteaAbsoluteDate</h1>
+		<div><absolute-date date="2024-03-11" year="numeric" day="numeric" month="short"></absolute-date></div>
+		<div><absolute-date date="2024-03-11" year="numeric" day="numeric" month="long"></absolute-date></div>
+		<div><absolute-date date="2024-03-11" year="" day="numeric" month="numeric"></absolute-date></div>
+		<div><absolute-date date="2024-03-11" year="" day="numeric" month="numeric" weekday="long"></absolute-date></div>
+		<div><absolute-date date="2024-03-11T19:00:00-05:00" year="" day="numeric" month="numeric" weekday="long"></absolute-date></div>
+		<div class="tw-text-text-light-2">relative-time: <relative-time format="datetime" datetime="2024-03-11" year="" day="numeric" month="numeric"></relative-time></div>
+	</div>
+
+	<div>
+		<h1>LocaleNumber</h1>
+		<div>{{ctx.Locale.PrettyNumber 1}}</div>
+		<div>{{ctx.Locale.PrettyNumber 12}}</div>
+		<div>{{ctx.Locale.PrettyNumber 123}}</div>
+		<div>{{ctx.Locale.PrettyNumber 1234}}</div>
+		<div>{{ctx.Locale.PrettyNumber 12345}}</div>
+		<div>{{ctx.Locale.PrettyNumber 123456}}</div>
+		<div>{{ctx.Locale.PrettyNumber 1234567}}</div>
+	</div>
+
+	<div>
+		<h1>TimeSince</h1>
+		<div>Now: {{DateUtils.TimeSince .TimeNow}}</div>
+		<div>5s past: {{DateUtils.TimeSince .TimePast5s}}</div>
+		<div>5s future: {{DateUtils.TimeSince .TimeFuture5s}}</div>
+		<div>2m past: {{DateUtils.TimeSince .TimePast2m}}</div>
+		<div>2m future: {{DateUtils.TimeSince .TimeFuture2m}}</div>
+		<div>1y past: {{DateUtils.TimeSince .TimePast1y}}</div>
+		<div>1y future: {{DateUtils.TimeSince .TimeFuture1y}}</div>
+	</div>
+
+	<div>
+		<h1>SVG alignment</h1>
+
+		<h2>Text with SVG</h2>
+		<div class="flex-text-block">{{svg "octicon-alert"}} {{svg "octicon-x"}} text (block)</div>
+		<div><div class="flex-text-inline">{{svg "octicon-alert"}} {{svg "octicon-x"}} text</div> (inline)</div>
+
+		<div class="flex-text-block">{{svg "octicon-alert"}} flex item with very very very very very very very very long content</div>
+
+		<div class="flex-items-block">
+			<div class="item">{{svg "octicon-alert"}} flex every line</div>
+			<div class="item">{{svg "octicon-alert"}} flex every item</div>
+			<div class="item">{{svg "octicon-alert"}} flex item with very very very very very very very very long content</div>
+		</div>
+
+		<h2>Button with SVG</h2>
+		<div>
+			<button class="ui red button">{{svg "octicon-alert" 24}} {{svg "octicon-x" 24}} text</button>
+			<div class="ui labeled button">
+				<button class="ui basic button">labeled button</button>
+				<a class="ui basic label">123</a>
+			</div>
+			<button class="ui button">{{svg "octicon-x" 16}} button with very very very very very very very very long text</button>
+		</div>
+
+		<h2>Input with SVG</h2>
+		<div>
+			<div class="ui icon search input">
+				<i class="icon">{{svg "octicon-search"}}</i>
+				<input type="text" placeholder="place holder">
+			</div>
+		</div>
+	</div>
+
+	<div>
+		<h1>ComboMarkdownEditor</h1>
+		{{template "shared/combomarkdowneditor" dict "MarkdownPreviewContext" "/owner/path"}}
+	</div>
+
+	<h1>Tailwind CSS Demo</h1>
+	<div>
+		<button class="{{if true}}tw-bg-red{{end}} tw-p-5 tw-border tw-rounded hover:tw-bg-blue active:tw-bg-yellow">Button</button>
+	</div>
+</div>
+{{template "devtest/devtest-footer"}}
diff --git a/devtest/global-button.tmpl b/devtest/global-button.tmpl
new file mode 100644
index 0000000..9df303d
--- /dev/null
+++ b/devtest/global-button.tmpl
@@ -0,0 +1,16 @@
+{{template "devtest/devtest-header"}}
+<div class="page-content devtest ui container">
+	<div>
+		<h1>Show/Hide panel</h1>
+		<div>
+			<!-- to test Space/Enter also works on non-button buttons with children -->
+			<div tabindex="0" class="ui button show-panel toggle" data-panel="#devtest-panel-show-hide"><span>Toggle panel 1</span></div>
+			<span tabindex="0" class="ui button show-panel" data-panel="#devtest-panel-show-hide"><span>Show panel 1</span></span>
+		</div>
+		<div id="devtest-panel-show-hide">
+			<div>Panel 1 content</div>
+			<div class="ui button hide-panel" data-panel-closest="div">Hide panel 1</div>
+		</div>
+	</div>
+</div>
+{{template "devtest/devtest-footer"}}
diff --git a/devtest/label.tmpl b/devtest/label.tmpl
new file mode 100644
index 0000000..6c48f0c
--- /dev/null
+++ b/devtest/label.tmpl
@@ -0,0 +1,26 @@
+{{template "devtest/devtest-header"}}
+<div class="page-content devtest ui container">
+	<div>
+		<h1>Label</h1>
+		<div class="flex-text-block tw-my-2">
+			<span class="ui label">simple label</span>
+			<span class="ui red label">red label</span>
+			<span class="ui green label">green label</span>
+		</div>
+		<div class="flex-text-block tw-my-2">
+			<span class="ui basic label">basic label</span>
+			<span class="ui basic red label">basic red label</span>
+			<span class="ui basic green label">basic green label</span>
+		</div>
+		<div class="flex-text-block tw-my-2">
+			<span class="ui label">long content must be in a non-flex "gt-ellipsis" element, otherwise it won't get ellipsis. very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label</span>
+		</div>
+		<div class="flex-text-block tw-my-2">
+			<span class="ui label"><span class="gt-ellipsis">very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label</span></span>
+		</div>
+		<div class="tw-my-2">
+			<span class="ui label tw-max-w-full"><span class="gt-ellipsis">very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label</span></span>
+		</div>
+	</div>
+</div>
+{{template "devtest/devtest-footer"}}
diff --git a/devtest/repo-action-view.tmpl b/devtest/repo-action-view.tmpl
new file mode 100644
index 0000000..1fa71c0
--- /dev/null
+++ b/devtest/repo-action-view.tmpl
@@ -0,0 +1,30 @@
+{{template "base/head" .}}
+<div class="page-content">
+	<div id="repo-action-view"
+			data-run-index="1"
+			data-job-index="2"
+			data-actions-url="{{AppSubUrl}}/devtest/actions-mock"
+			data-locale-approve="approve"
+			data-locale-cancel="cancel"
+			data-locale-rerun="re-run"
+			data-locale-rerun-all="re-run all"
+			data-locale-runs-scheduled="scheduled"
+			data-locale-runs-commit="commit"
+			data-locale-runs-pushed-by="pushed by"
+			data-locale-status-unknown="unknown"
+			data-locale-status-waiting="waiting"
+			data-locale-status-running="running"
+			data-locale-status-success="success"
+			data-locale-status-failure="failure"
+			data-locale-status-cancelled="cancelled"
+			data-locale-status-skipped="skipped"
+			data-locale-status-blocked="blocked"
+			data-locale-artifacts-title="artifacts"
+			data-locale-confirm-delete-artifact="confirm delete artifact"
+			data-locale-show-timestamps="show timestamps"
+			data-locale-show-log-seconds="show log seconds"
+			data-locale-show-full-screen="show full screen"
+			data-locale-download-logs="download logs"
+	></div>
+</div>
+{{template "base/footer" .}}
diff --git a/devtest/tmplerr-sub.tmpl b/devtest/tmplerr-sub.tmpl
new file mode 100644
index 0000000..f7974eb
--- /dev/null
+++ b/devtest/tmplerr-sub.tmpl
@@ -0,0 +1,3 @@
+sub template triggers an executing error
+
+		{{ctx.Locale.NoSuch "asdf"}}
diff --git a/devtest/tmplerr.tmpl b/devtest/tmplerr.tmpl
new file mode 100644
index 0000000..b3a2ffa
--- /dev/null
+++ b/devtest/tmplerr.tmpl
@@ -0,0 +1,12 @@
+{{template "devtest/devtest-header"}}
+<div class="page-content devtest">
+	<div class="tw-flex">
+		<div class="tw-w-4/5">
+			hello hello hello hello hello hello hello hello hello hello
+		</div>
+		<div class="tw-w-1/5">
+			{{template "devtest/tmplerr-sub" .}}
+		</div>
+	</div>
+</div>
+{{template "devtest/devtest-footer"}}
diff --git a/devtest/toast.tmpl b/devtest/toast.tmpl
new file mode 100644
index 0000000..597b415
--- /dev/null
+++ b/devtest/toast.tmpl
@@ -0,0 +1,11 @@
+{{template "devtest/devtest-header"}}
+<div>
+	<h1>Toast</h1>
+	<div>
+		<button class="ui button toast-test-button" data-toast-level="info" data-toast-message="test info">Show Info Toast</button>
+		<button class="ui button toast-test-button" data-toast-level="warning" data-toast-message="test warning">Show Warning Toast</button>
+		<button class="ui button toast-test-button" data-toast-level="error" data-toast-message="test error">Show Error Toast</button>
+		<button class="ui button toast-test-button" data-toast-level="error" data-toast-message="very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong message">Show Error Toast (long)</button>
+	</div>
+</div>
+{{template "devtest/devtest-footer"}}
diff --git a/explore/code.tmpl b/explore/code.tmpl
new file mode 100644
index 0000000..039933f
--- /dev/null
+++ b/explore/code.tmpl
@@ -0,0 +1,8 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content explore users">
+	{{template "explore/navbar" .}}
+	<div class="ui container">
+		{{template "shared/search/code/search" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/explore/navbar.tmpl b/explore/navbar.tmpl
new file mode 100644
index 0000000..6b595af
--- /dev/null
+++ b/explore/navbar.tmpl
@@ -0,0 +1,22 @@
+<overflow-menu class="ui secondary pointing tabular top attached borderless menu secondary-nav">
+	<div class="overflow-menu-items tw-justify-center">
+		<a class="{{if .PageIsExploreRepositories}}active {{end}}item" href="{{AppSubUrl}}/explore/repos">
+			{{svg "octicon-repo"}} {{ctx.Locale.Tr "explore.repos"}}
+		</a>
+		{{if not .UsersPageIsDisabled}}
+			<a class="{{if .PageIsExploreUsers}}active {{end}}item" href="{{AppSubUrl}}/explore/users">
+				{{svg "octicon-person"}} {{ctx.Locale.Tr "explore.users"}}
+			</a>
+		{{end}}
+		{{if not .OrganizationsPageIsDisabled}}
+		<a class="{{if .PageIsExploreOrganizations}}active {{end}}item" href="{{AppSubUrl}}/explore/organizations">
+			{{svg "octicon-organization"}} {{ctx.Locale.Tr "explore.organizations"}}
+		</a>
+		{{end}}
+		{{if and (not ctx.Consts.RepoUnitTypeCode.UnitGlobalDisabled) .IsRepoIndexerEnabled (not .CodePageIsDisabled)}}
+		<a class="{{if .PageIsExploreCode}}active {{end}}item" href="{{AppSubUrl}}/explore/code">
+			{{svg "octicon-code"}} {{ctx.Locale.Tr "explore.code"}}
+		</a>
+		{{end}}
+	</div>
+</overflow-menu>
diff --git a/explore/repo_list.tmpl b/explore/repo_list.tmpl
new file mode 100644
index 0000000..219b125
--- /dev/null
+++ b/explore/repo_list.tmpl
@@ -0,0 +1,71 @@
+<div class="flex-list">
+	{{range .Repos}}
+		<div class="flex-item">
+			<div class="flex-item-leading">
+				{{template "repo/icon" .}}
+			</div>
+			<div class="flex-item-main">
+				<div class="flex-item-header">
+					<div class="flex-item-title">
+						{{if and (or $.PageIsExplore $.PageIsProfileStarList) .Owner}}
+						<a class="text primary name" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/
+						{{end}}
+						<a class="text primary name" href="{{.Link}}">{{.Name}}</a>
+						<span class="label-list">
+							{{if .IsArchived}}
+								<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
+							{{end}}
+							{{if .IsPrivate}}
+								<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
+							{{else}}
+								{{if .Owner.Visibility.IsPrivate}}
+									<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
+								{{end}}
+							{{end}}
+							{{if .IsTemplate}}
+								<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
+							{{end}}
+							{{if eq .ObjectFormatName "sha256"}}
+								<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
+							{{end}}
+						</span>
+					</div>
+					<div class="flex-item-trailing muted-links">
+						{{if .PrimaryLanguage}}
+							<a class="flex-text-inline" href="?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}{{if $.TabName}}&tab={{$.TabName}}{{end}}">
+								<i class="color-icon tw-mr-2" style="background-color: {{.PrimaryLanguage.Color}}"></i>
+								{{.PrimaryLanguage.Language}}
+							</a>
+						{{end}}
+						{{if not $.DisableStars}}
+							<a class="flex-text-inline" href="{{.Link}}/stars">
+								<span aria-label="{{ctx.Locale.Tr "repo.stars"}}">{{svg "octicon-star" 16}}</span>
+								<span {{if ge .NumStars 1000}}data-tooltip-content="{{.NumStars}}"{{end}}>{{CountFmt .NumStars}}</span>
+							</a>
+						{{end}}
+						<a class="flex-text-inline" href="{{.Link}}/forks">
+							<span aria-label="{{ctx.Locale.Tr "repo.forks"}}">{{svg "octicon-git-branch" 16}}</span>
+							<span {{if ge .NumForks 1000}}data-tooltip-content="{{.NumForks}}"{{end}}>{{CountFmt .NumForks}}</span>
+						</a>
+					</div>
+				</div>
+				{{$description := .DescriptionHTML ctx}}
+				{{if $description}}
+					<div class="flex-item-body">{{$description}}</div>
+				{{end}}
+				{{if .Topics}}
+					<div class="label-list">
+					{{range .Topics}}
+						{{if ne . ""}}<a class="ui label" href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1">{{.}}</a>{{end}}
+					{{end}}
+					</div>
+				{{end}}
+				<div class="flex-item-body">{{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .UpdatedUnix}}</div>
+			</div>
+		</div>
+	{{else}}
+	<div>
+		{{ctx.Locale.Tr "search.no_results"}}
+	</div>
+	{{end}}
+</div>
diff --git a/explore/repos.tmpl b/explore/repos.tmpl
new file mode 100644
index 0000000..53742bf
--- /dev/null
+++ b/explore/repos.tmpl
@@ -0,0 +1,10 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content explore repositories">
+	{{template "explore/navbar" .}}
+	<div class="ui container">
+		{{template "shared/repo_search" .}}
+		{{template "explore/repo_list" .}}
+		{{template "base/paginate" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/explore/search.tmpl b/explore/search.tmpl
new file mode 100644
index 0000000..1d984a2
--- /dev/null
+++ b/explore/search.tmpl
@@ -0,0 +1,23 @@
+<div class="ui small secondary filter menu tw-items-center tw-mx-0">
+	<form class="ui form ignore-dirty tw-flex-1">
+		{{if .PageIsExploreUsers}}
+			{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}}
+		{{else}}
+			{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.org_kind")}}
+		{{end}}
+	</form>
+	<!-- Sort -->
+	<div class="ui small dropdown type jump item tw-mr-0">
+		<span class="text">
+			{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+		</span>
+		{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+		<div class="menu">
+			<a class="{{if eq .SortType "newest"}}active {{end}}item" href="?sort=newest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
+			<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="?sort=oldest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
+			<a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="?sort=alphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
+			<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="?sort=reversealphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
+		</div>
+	</div>
+</div>
+<div class="divider"></div>
diff --git a/explore/user_list.tmpl b/explore/user_list.tmpl
new file mode 100644
index 0000000..4128a48
--- /dev/null
+++ b/explore/user_list.tmpl
@@ -0,0 +1,33 @@
+<div class="flex-list">
+	{{range .Users}}
+		<div class="flex-item tw-items-center">
+			<div class="flex-item-leading">
+				{{ctx.AvatarUtils.Avatar . 48}}
+			</div>
+			<div class="flex-item-main">
+				<div class="flex-item-title">
+					{{template "shared/user/name" .}}
+					{{if .Visibility.IsPrivate}}
+						<span class="ui basic tiny label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
+					{{end}}
+				</div>
+				<div class="flex-item-body">
+					{{if .Location}}
+						<span class="flex-text-inline">{{svg "octicon-location"}}{{.Location}}</span>
+					{{end}}
+					{{if and .Email (or (and $.ShowUserEmail $.IsSigned (not .KeepEmailPrivate)) $.PageIsAdminUsers)}}
+						<span class="flex-text-inline">
+							{{svg "octicon-mail"}}
+							<a href="mailto:{{.Email}}">{{.Email}}</a>
+						</span>
+					{{end}}
+					<span class="flex-text-inline">{{svg "octicon-calendar"}}{{ctx.Locale.Tr "user.joined_on" (DateUtils.AbsoluteShort .CreatedUnix)}}</span>
+				</div>
+			</div>
+		</div>
+	{{else}}
+		<div class="flex-item">
+			{{ctx.Locale.Tr "search.no_results"}}
+		</div>
+	{{end}}
+</div>
diff --git a/explore/users.tmpl b/explore/users.tmpl
new file mode 100644
index 0000000..e904612
--- /dev/null
+++ b/explore/users.tmpl
@@ -0,0 +1,10 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content explore users">
+	{{template "explore/navbar" .}}
+	<div class="ui container">
+		{{template "explore/search" .}}
+		{{template "explore/user_list" .}}
+		{{template "base/paginate" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/home.tmpl b/home.tmpl
new file mode 100644
index 0000000..116dc48
--- /dev/null
+++ b/home.tmpl
@@ -0,0 +1,51 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}" class="page-content home">
+	<div class="tw-mb-8 tw-px-8">
+		<div class="center">
+			<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
+			<div class="hero">
+				<h1 class="ui icon header title">
+					{{AppName}}
+				</h1>
+				<h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
+			</div>
+		</div>
+	</div>
+	<div class="ui stackable middle very relaxed page grid">
+		<div class="eight wide center column">
+			<h1 class="hero ui icon header">
+				{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
+			</h1>
+			<p class="large">
+				{{ctx.Locale.Tr "startpage.install_desc" "https://docs.gitea.com/installation/install-from-binary" "https://github.com/go-gitea/gitea/tree/master/docker" "https://docs.gitea.com/installation/install-from-package"}}
+			</p>
+		</div>
+		<div class="eight wide center column">
+			<h1 class="hero ui icon header">
+				{{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}
+			</h1>
+			<p class="large">
+				{{ctx.Locale.Tr "startpage.platform_desc" "https://go.dev/"}}
+			</p>
+		</div>
+	</div>
+	<div class="ui stackable middle very relaxed page grid">
+		<div class="eight wide center column">
+			<h1 class="hero ui icon header">
+				{{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}}
+			</h1>
+			<p class="large">
+				{{ctx.Locale.Tr "startpage.lightweight_desc"}}
+			</p>
+		</div>
+		<div class="eight wide center column">
+			<h1 class="hero ui icon header">
+				{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
+			</h1>
+			<p class="large">
+				{{ctx.Locale.Tr "startpage.license_desc" "https://code.gitea.io/gitea" "code.gitea.io/gitea" "https://github.com/go-gitea/gitea"}}
+			</p>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/install.tmpl b/install.tmpl
new file mode 100644
index 0000000..6c4cc7d
--- /dev/null
+++ b/install.tmpl
@@ -0,0 +1,355 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content install">
+	<div class="ui grid install-config-container">
+		<div class="sixteen wide center aligned centered column">
+			<h3 class="ui top attached header">
+				{{ctx.Locale.Tr "install.title"}}
+			</h3>
+			<div class="ui attached segment">
+				{{template "base/alert" .}}
+
+				<p>{{ctx.Locale.Tr "install.docker_helper" "https://docs.gitea.com/installation/install-with-docker"}}</p>
+
+				<form class="ui form" action="{{AppSubUrl}}/" method="post">
+					<!-- Database Settings -->
+					<h4 class="ui dividing header">{{ctx.Locale.Tr "install.db_title"}}</h4>
+					<p>{{ctx.Locale.Tr "install.require_db_desc"}}</p>
+					<div class="inline required field {{if .Err_DbType}}error{{end}}">
+						<label>{{ctx.Locale.Tr "install.db_type"}}</label>
+						<div class="ui selection database type dropdown">
+							<input type="hidden" id="db_type" name="db_type" value="{{.CurDbType}}">
+							<div class="text">{{.CurDbType}}</div>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu">
+								{{range .DbTypeNames}}
+									<div class="item" data-value="{{.type}}">{{.name}}</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="tw-mt-4 tw-hidden" data-db-setting-for="common-host">
+						<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
+							<label for="db_host">{{ctx.Locale.Tr "install.host"}}</label>
+							<input id="db_host" name="db_host" value="{{.db_host}}">
+						</div>
+						<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
+							<label for="db_user">{{ctx.Locale.Tr "install.user"}}</label>
+							<input id="db_user" name="db_user" value="{{.db_user}}">
+						</div>
+						<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
+							<label for="db_passwd">{{ctx.Locale.Tr "install.password"}}</label>
+							<input id="db_passwd" name="db_passwd" type="password" value="{{.db_passwd}}">
+						</div>
+						<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
+							<label for="db_name">{{ctx.Locale.Tr "install.db_name"}}</label>
+							<input id="db_name" name="db_name" value="{{.db_name}}">
+						</div>
+					</div>
+
+					<div class="tw-mt-4 tw-hidden" data-db-setting-for="postgres">
+						<div class="inline required field">
+							<label>{{ctx.Locale.Tr "install.ssl_mode"}}</label>
+							<div class="ui selection database type dropdown">
+								<input type="hidden" name="ssl_mode" value="{{if .ssl_mode}}{{.ssl_mode}}{{else}}disable{{end}}">
+								<div class="default text">disable</div>
+								{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+								<div class="menu">
+									<div class="item" data-value="disable">Disable</div>
+									<div class="item" data-value="require">Require</div>
+									<div class="item" data-value="verify-full">Verify Full</div>
+								</div>
+							</div>
+						</div>
+						<div class="inline field {{if .Err_DbSetting}}error{{end}}">
+							<label for="db_schema">{{ctx.Locale.Tr "install.db_schema"}}</label>
+							<input id="db_schema" name="db_schema" value="{{.db_schema}}">
+							<span class="help">{{ctx.Locale.Tr "install.db_schema_helper"}}</span>
+						</div>
+					</div>
+
+					<div class="tw-mt-4 tw-hidden" data-db-setting-for="sqlite3">
+						<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
+							<label for="db_path">{{ctx.Locale.Tr "install.path"}}</label>
+							<input id="db_path" name="db_path" value="{{.db_path}}">
+							<span class="help">{{ctx.Locale.Tr "install.sqlite_helper"}}</span>
+						</div>
+					</div>
+
+					{{if .Err_DbInstalledBefore}}
+					<div>
+						<p class="reinstall-message">{{ctx.Locale.Tr "install.reinstall_confirm_message"}}</p>
+						<div class="reinstall-confirm">
+							<div class="ui checkbox">
+								<label>{{ctx.Locale.Tr "install.reinstall_confirm_check_1"}}</label>
+								<input name="reinstall_confirm_first" type="checkbox">
+							</div>
+						</div>
+						<div class="reinstall-confirm">
+							<div class="ui checkbox">
+								<label>{{ctx.Locale.Tr "install.reinstall_confirm_check_2"}}</label>
+								<input name="reinstall_confirm_second" type="checkbox">
+							</div>
+						</div>
+						<div class="reinstall-confirm">
+							<div class="ui checkbox">
+								<label>{{ctx.Locale.Tr "install.reinstall_confirm_check_3"}}</label>
+								<input name="reinstall_confirm_third" type="checkbox">
+							</div>
+						</div>
+					</div>
+					{{end}}
+
+					<!-- General Settings -->
+					<h4 class="ui dividing header">{{ctx.Locale.Tr "install.general_title"}}</h4>
+					<div class="inline required field {{if .Err_AppName}}error{{end}}">
+						<label for="app_name">{{ctx.Locale.Tr "install.app_name"}}</label>
+						<input id="app_name" name="app_name" value="{{.app_name}}" required>
+						<span class="help">{{ctx.Locale.Tr "install.app_name_helper"}}</span>
+					</div>
+					<div class="inline required field {{if .Err_RepoRootPath}}error{{end}}">
+						<label for="repo_root_path">{{ctx.Locale.Tr "install.repo_path"}}</label>
+						<input id="repo_root_path" name="repo_root_path" value="{{.repo_root_path}}" required>
+						<span class="help">{{ctx.Locale.Tr "install.repo_path_helper"}}</span>
+					</div>
+					<div class="inline field {{if .Err_LFSRootPath}}error{{end}}">
+						<label for="lfs_root_path">{{ctx.Locale.Tr "install.lfs_path"}}</label>
+						<input id="lfs_root_path" name="lfs_root_path" value="{{.lfs_root_path}}">
+						<span class="help">{{ctx.Locale.Tr "install.lfs_path_helper"}}</span>
+					</div>
+					<div class="inline required field {{if .Err_RunUser}}error{{end}}">
+						<label for="run_user">{{ctx.Locale.Tr "install.run_user"}}</label>
+						<input id="run_user" name="run_user" value="{{.run_user}}" readonly>
+						<span class="help">{{ctx.Locale.Tr "install.run_user_helper"}}</span>
+					</div>
+					<div class="inline required field">
+						<label for="domain">{{ctx.Locale.Tr "install.domain"}}</label>
+						<input id="domain" name="domain" value="{{.domain}}" placeholder="demo.gitea.com" required>
+						<span class="help">{{ctx.Locale.Tr "install.domain_helper"}}</span>
+					</div>
+					<div class="inline field">
+						<label for="ssh_port">{{ctx.Locale.Tr "install.ssh_port"}}</label>
+						<input id="ssh_port" name="ssh_port" value="{{.ssh_port}}">
+						<span class="help">{{ctx.Locale.Tr "install.ssh_port_helper"}}</span>
+					</div>
+					<div class="inline required field">
+						<label for="http_port">{{ctx.Locale.Tr "install.http_port"}}</label>
+						<input id="http_port" name="http_port" value="{{.http_port}}" required>
+						<span class="help">{{ctx.Locale.Tr "install.http_port_helper"}}</span>
+					</div>
+					<div class="inline required field">
+						<label for="app_url">{{ctx.Locale.Tr "install.app_url"}}</label>
+						<input id="app_url" name="app_url" value="{{.app_url}}" placeholder="https://demo.gitea.com" required>
+						<span class="help">{{ctx.Locale.Tr "install.app_url_helper"}}</span>
+					</div>
+					<div class="inline required field">
+						<label for="log_root_path">{{ctx.Locale.Tr "install.log_root_path"}}</label>
+						<input id="log_root_path" name="log_root_path" value="{{.log_root_path}}" placeholder="log" required>
+						<span class="help">{{ctx.Locale.Tr "install.log_root_path_helper"}}</span>
+					</div>
+					<div class="inline field">
+						<div class="ui checkbox">
+							<label>{{ctx.Locale.Tr "install.enable_update_checker"}}</label>
+							<input name="enable_update_checker" type="checkbox">
+						</div>
+						<span class="help">{{ctx.Locale.Tr "install.enable_update_checker_helper"}}</span>
+					</div>
+
+					<!-- Optional Settings -->
+					<h4 class="ui dividing header">{{ctx.Locale.Tr "install.optional_title"}}</h4>
+					<div>
+						<!-- Email -->
+						<details class="optional field">
+							<summary class="right-content tw-py-2{{if .Err_SMTP}} text red{{end}}">
+								{{ctx.Locale.Tr "install.email_title"}}
+							</summary>
+							<div class="inline field">
+								<label for="smtp_addr">{{ctx.Locale.Tr "install.smtp_addr"}}</label>
+								<input id="smtp_addr" name="smtp_addr" value="{{.smtp_addr}}">
+							</div>
+							<div class="inline field">
+								<label for="smtp_port">{{ctx.Locale.Tr "install.smtp_port"}}</label>
+								<input id="smtp_port" name="smtp_port" value="{{.smtp_port}}">
+							</div>
+							<div class="inline field {{if .Err_SMTPFrom}}error{{end}}">
+								<label for="smtp_from">{{ctx.Locale.Tr "install.smtp_from"}}</label>
+								<input id="smtp_from" name="smtp_from" value="{{.smtp_from}}">
+								<span class="help">{{ctx.Locale.TrString "install.smtp_from_helper"}}{{/* it contains lt/gt chars*/}}</span>
+							</div>
+							<div class="inline field {{if .Err_SMTPUser}}error{{end}}">
+								<label for="smtp_user">{{ctx.Locale.Tr "install.mailer_user"}}</label>
+								<input id="smtp_user" name="smtp_user" value="{{.smtp_user}}">
+							</div>
+							<div class="inline field">
+								<label for="smtp_passwd">{{ctx.Locale.Tr "install.mailer_password"}}</label>
+								<input id="smtp_passwd" name="smtp_passwd" type="password" value="{{.smtp_passwd}}">
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox">
+									<label>{{ctx.Locale.Tr "install.register_confirm"}}</label>
+									<input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox">
+									<label>{{ctx.Locale.Tr "install.mail_notify"}}</label>
+									<input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}>
+								</div>
+							</div>
+						</details>
+
+						<!-- Server and other services -->
+						<details class="optional field">
+							<summary class="right-content tw-py-2{{if .Err_Services}} text red{{end}}">
+								{{ctx.Locale.Tr "install.server_service_title"}}
+							</summary>
+							<div class="inline field">
+								<div class="ui checkbox" id="offline-mode">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.offline_mode_popup"}}">{{ctx.Locale.Tr "install.offline_mode"}}</label>
+									<input name="offline_mode" type="checkbox" {{if .offline_mode}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox" id="disable-gravatar">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.disable_gravatar_popup"}}">{{ctx.Locale.Tr "install.disable_gravatar"}}</label>
+									<input name="disable_gravatar" type="checkbox" {{if .disable_gravatar}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox" id="federated-avatar-lookup">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.federated_avatar_lookup_popup"}}">{{ctx.Locale.Tr "install.federated_avatar_lookup"}}</label>
+									<input name="enable_federated_avatar" type="checkbox" {{if .enable_federated_avatar}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox" id="enable-openid-signin">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.openid_signin_popup"}}">{{ctx.Locale.Tr "install.openid_signin"}}</label>
+									<input name="enable_open_id_sign_in" type="checkbox" {{if .enable_open_id_sign_in}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox" id="disable-registration">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.disable_registration_popup"}}">{{ctx.Locale.Tr "install.disable_registration"}}</label>
+									<input name="disable_registration" type="checkbox" {{if .disable_registration}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox" id="allow-only-external-registration">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.allow_only_external_registration_popup"}}">{{ctx.Locale.Tr "install.allow_only_external_registration_popup"}}</label>
+									<input name="allow_only_external_registration" type="checkbox" {{if .allow_only_external_registration}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox" id="enable-openid-signup">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.openid_signup_popup"}}">{{ctx.Locale.Tr "install.openid_signup"}}</label>
+									<input name="enable_open_id_sign_up" type="checkbox" {{if .enable_open_id_sign_up}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox" id="enable-captcha">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.enable_captcha_popup"}}">{{ctx.Locale.Tr "install.enable_captcha"}}</label>
+									<input name="enable_captcha" type="checkbox" {{if .enable_captcha}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.require_sign_in_view_popup"}}">{{ctx.Locale.Tr "install.require_sign_in_view"}}</label>
+									<input name="require_sign_in_view" type="checkbox" {{if .require_sign_in_view}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.default_keep_email_private_popup"}}">{{ctx.Locale.Tr "install.default_keep_email_private"}}</label>
+									<input name="default_keep_email_private" type="checkbox" {{if .default_keep_email_private}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.default_allow_create_organization_popup"}}">{{ctx.Locale.Tr "install.default_allow_create_organization"}}</label>
+									<input name="default_allow_create_organization" type="checkbox" {{if .default_allow_create_organization}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<div class="ui checkbox">
+									<label data-tooltip-content="{{ctx.Locale.Tr "install.default_enable_timetracking_popup"}}">{{ctx.Locale.Tr "install.default_enable_timetracking"}}</label>
+									<input name="default_enable_timetracking" type="checkbox" {{if .default_enable_timetracking}}checked{{end}}>
+								</div>
+							</div>
+							<div class="inline field">
+								<label for="no_reply_address">{{ctx.Locale.Tr "install.no_reply_address"}}</label>
+								<input id="_no_reply_address" name="no_reply_address" value="{{.no_reply_address}}">
+								<span class="help">{{ctx.Locale.Tr "install.no_reply_address_helper"}}</span>
+							</div>
+							<div class="inline field">
+								<label for="password_algorithm">{{ctx.Locale.Tr "install.password_algorithm"}}</label>
+								<div class="ui selection dropdown">
+									<input id="password_algorithm" type="hidden" name="password_algorithm" value="{{.password_algorithm}}">
+									<div class="text">{{.password_algorithm}}</div>
+									{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+									<div class="menu">
+										{{range .PasswordHashAlgorithms}}
+											<div class="item" data-value="{{.}}">{{.}}</div>
+										{{end}}
+									</div>
+								</div>
+								<span class="help">{{ctx.Locale.Tr "install.password_algorithm_helper"}}</span>
+							</div>
+						</details>
+
+						<!-- Admin -->
+						<details class="optional field">
+							<summary class="right-content tw-py-2{{if .Err_Admin}} text red{{end}}">
+								{{ctx.Locale.Tr "install.admin_title"}}
+							</summary>
+							<p class="center">{{ctx.Locale.Tr "install.admin_setting_desc"}}</p>
+							<div class="inline field {{if .Err_AdminName}}error{{end}}">
+								<label for="admin_name">{{ctx.Locale.Tr "install.admin_name"}}</label>
+								<input id="admin_name" name="admin_name" value="{{.admin_name}}">
+							</div>
+							<div class="inline field {{if .Err_AdminEmail}}error{{end}}">
+								<label for="admin_email">{{ctx.Locale.Tr "install.admin_email"}}</label>
+								<input id="admin_email" name="admin_email" type="email" value="{{.admin_email}}">
+							</div>
+							<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
+								<label for="admin_passwd">{{ctx.Locale.Tr "install.admin_password"}}</label>
+								<input id="admin_passwd" name="admin_passwd" type="password" autocomplete="new-password" value="{{.admin_passwd}}">
+							</div>
+							<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
+								<label for="admin_confirm_passwd">{{ctx.Locale.Tr "install.confirm_password"}}</label>
+								<input id="admin_confirm_passwd" name="admin_confirm_passwd" autocomplete="new-password" type="password" value="{{.admin_confirm_passwd}}">
+							</div>
+						</details>
+					</div>
+
+					<div class="divider"></div>
+
+					{{if .EnvConfigKeys}}
+					<!-- Environment Config -->
+					<h4 class="ui dividing header">{{ctx.Locale.Tr "install.env_config_keys"}}</h4>
+					<div class="inline field">
+						<div class="right-content">
+							{{ctx.Locale.Tr "install.env_config_keys_prompt"}}
+						</div>
+						<div class="right-content tw-mt-2">
+							{{range .EnvConfigKeys}}<span class="ui label">{{.}}</span>{{end}}
+						</div>
+					</div>
+					{{end}}
+
+					<div class="inline field">
+						<div class="right-content">
+							{{$copyBtn := svg "octicon-copy" 14}}
+							{{$filePath := HTMLFormat `<span class="ui label">%s</span> <button class="btn interact-fg" data-clipboard-text="%s">%s</button>` .CustomConfFile .CustomConfFile $copyBtn}}
+							{{ctx.Locale.Tr "install.config_write_file_prompt" $filePath}}
+						</div>
+						<div class="tw-mt-4 tw-mb-2 tw-text-center">
+							<button class="ui primary button">{{ctx.Locale.Tr "install.install_btn_confirm"}}</button>
+						</div>
+					</div>
+				</form>
+			</div>
+		</div>
+	</div>
+</div>
+<img class="tw-hidden" src="{{AssetUrlPrefix}}/img/loading.png">
+{{template "base/footer" .}}
diff --git a/mail/auth/activate.tmpl b/mail/auth/activate.tmpl
new file mode 100644
index 0000000..b1bb4cb
--- /dev/null
+++ b/mail/auth/activate.tmpl
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
+	<title>{{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}}</title>
+</head>
+
+{{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}}
+<body>
+	<p>{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}}</p><br>
+	<p>{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br>
+	<p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p>
+
+	<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
+</body>
+</html>
diff --git a/mail/auth/activate_email.tmpl b/mail/auth/activate_email.tmpl
new file mode 100644
index 0000000..3d32f80
--- /dev/null
+++ b/mail/auth/activate_email.tmpl
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta Name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
+	<title>{{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}}</title>
+</head>
+
+{{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}}
+<body>
+	<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br>
+	<p>{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br>
+	<p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p>
+
+	<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
+</body>
+</html>
diff --git a/mail/auth/register_notify.tmpl b/mail/auth/register_notify.tmpl
new file mode 100644
index 0000000..62dbf7d
--- /dev/null
+++ b/mail/auth/register_notify.tmpl
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
+	<title>{{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}}</title>
+</head>
+
+{{$set_pwd_url := printf "%[1]suser/forgot_password" AppUrl}}
+<body>
+	<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br>
+	<p>{{.locale.Tr "mail.register_notify.text_1" AppName}}</p><br>
+	<p>{{.locale.Tr "mail.register_notify.text_2" .Username}}</p><p><a href="{{AppUrl}}user/login">{{AppUrl}}user/login</a></p><br>
+	<p>{{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}}</p><br>
+
+	<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
+</body>
+</html>
diff --git a/mail/auth/reset_passwd.tmpl b/mail/auth/reset_passwd.tmpl
new file mode 100644
index 0000000..55b1ece
--- /dev/null
+++ b/mail/auth/reset_passwd.tmpl
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
+	<title>{{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}}</title>
+</head>
+
+{{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}}
+<body>
+	<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br>
+	<p>{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}}</p><p><a href="{{$recover_url}}">{{$recover_url}}</a></p><br>
+	<p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p>
+
+	<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
+</body>
+</html>
diff --git a/mail/issue/assigned.tmpl b/mail/issue/assigned.tmpl
new file mode 100644
index 0000000..5720319
--- /dev/null
+++ b/mail/issue/assigned.tmpl
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<style>
+		.footer { font-size:small; color:#666;}
+	</style>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<title>{{.Subject}}</title>
+</head>
+
+{{$repo_url := HTMLFormat "<a href='%s'>%s</a>" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}
+{{$link := HTMLFormat "<a href='%s'>#%d</a>" .Link .Issue.Index}}
+<body>
+	<p>
+		{{if .IsPull}}
+			{{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}}
+		{{else}}
+			{{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}}
+		{{end}}
+	</p>
+	<div class="footer">
+		<p>
+			---
+			<br>
+			<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>.
+		</p>
+	</div>
+</body>
+</html>
diff --git a/mail/issue/default.tmpl b/mail/issue/default.tmpl
new file mode 100644
index 0000000..395b118
--- /dev/null
+++ b/mail/issue/default.tmpl
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<title>{{.Subject}}</title>
+
+	<style>
+		blockquote { padding-left: 1em; margin: 1em 0; border-left: 1px solid grey; color: #777}
+		.footer { font-size:small; color:#666;}
+		{{if .ReviewComments}}
+			.review { padding-left: 1em; margin: 1em 0; }
+			.review > pre { padding: 1em; border-left: 1px solid grey; }
+		{{end}}
+	</style>
+
+</head>
+
+<body>
+	{{if .IsMention}}<p>{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}</p>{{end}}
+	{{if eq .ActionName "push"}}
+		<p>
+			{{if .Comment.IsForcePush}}
+				{{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}}
+				{{$oldShortSha := ShortSha .Comment.OldCommit}}
+				{{$oldCommitLink := HTMLFormat "<a href='%[1]s'><b>%[2]s</b></a>" $oldCommitUrl $oldShortSha}}
+
+				{{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}}
+				{{$newShortSha := ShortSha .Comment.NewCommit}}
+				{{$newCommitLink := HTMLFormat "<a href='%[1]s'><b>%[2]s</b></a>" $newCommitUrl $newShortSha}}
+
+				{{.locale.Tr "mail.issue.action.force_push" .Doer.Name .Comment.Issue.PullRequest.HeadBranch $oldCommitLink $newCommitLink}}
+			{{else}}
+				{{.locale.TrN (len .Comment.Commits) "mail.issue.action.push_1" "mail.issue.action.push_n" .Doer.Name .Comment.Issue.PullRequest.HeadBranch (len .Comment.Commits)}}
+			{{end}}
+		</p>
+	{{end}}
+	<p>
+		{{if eq .ActionName "close"}}
+			{{.locale.Tr "mail.issue.action.close" .Doer.Name .Issue.Index}}
+		{{else if eq .ActionName "reopen"}}
+			{{.locale.Tr "mail.issue.action.reopen" .Doer.Name .Issue.Index}}
+		{{else if eq .ActionName "merge"}}
+			{{.locale.Tr "mail.issue.action.merge" .Doer.Name .Issue.Index .Issue.PullRequest.BaseBranch}}
+		{{else if eq .ActionName "approve"}}
+			{{.locale.Tr "mail.issue.action.approve" .Doer.Name}}
+		{{else if eq .ActionName "reject"}}
+			{{.locale.Tr "mail.issue.action.reject" .Doer.Name}}
+		{{else if eq .ActionName "review"}}
+			{{.locale.Tr "mail.issue.action.review" .Doer.Name}}
+		{{else if eq .ActionName "review_dismissed"}}
+			{{.locale.Tr "mail.issue.action.review_dismissed" .Doer.Name .Comment.Review.Reviewer.Name}}
+		{{else if eq .ActionName "ready_for_review"}}
+			{{.locale.Tr "mail.issue.action.ready_for_review" .Doer.Name}}
+		{{end}}
+
+		{{- if eq .Body ""}}
+			{{if eq .ActionName "new"}}
+				{{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}}
+			{{end}}
+		{{else}}
+			{{.Body}}
+		{{end -}}
+		{{- range .ReviewComments}}
+			<hr>
+			{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}
+			<div class="review">
+				<pre>{{.Patch}}</pre>
+				<div>{{.RenderedContent}}</div>
+			</div>
+		{{end -}}
+		{{if eq .ActionName "push"}}
+			<ul>
+			{{range .Comment.Commits}}
+				<li>
+					<a href="{{$.Comment.Issue.PullRequest.BaseRepo.HTMLURL}}/commit/{{.ID}}">
+						{{ShortSha .ID.String}}
+					</a>  -  {{.Summary}}
+				</li>
+			{{end}}
+			</ul>
+		{{end}}
+	</p>
+	<div class="footer">
+	<p>
+		---
+		<br>
+		<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>{{if .CanReply}} {{.locale.Tr "mail.reply"}}{{end}}.
+	</p>
+	</div>
+</body>
+</html>
diff --git a/mail/notify/collaborator.tmpl b/mail/notify/collaborator.tmpl
new file mode 100644
index 0000000..9810c70
--- /dev/null
+++ b/mail/notify/collaborator.tmpl
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<style>
+		.footer { font-size:small; color:#666;}
+	</style>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<title>{{.Subject}}</title>
+</head>
+
+<body>
+	<p>{{.locale.Tr "mail.repo.collaborator.added.text"}} <code>{{.RepoName}}</code></p>
+	<div class="footer">
+		<p>
+			---
+			<br>
+			<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>.
+		</p>
+	</div>
+</body>
+</html>
diff --git a/mail/notify/repo_transfer.tmpl b/mail/notify/repo_transfer.tmpl
new file mode 100644
index 0000000..8c8b276
--- /dev/null
+++ b/mail/notify/repo_transfer.tmpl
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<title>{{.Subject}}</title>
+</head>
+
+{{$url := HTMLFormat "<a href='%[1]s'>%[2]s</a>" .Link .Repo}}
+<body>
+	<p>{{.Subject}}.
+		{{.locale.Tr "mail.repo.transfer.body" $url}}
+	</p>
+	<p>
+		---
+		<br>
+		<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>.
+	</p>
+</body>
+</html>
diff --git a/mail/release.tmpl b/mail/release.tmpl
new file mode 100644
index 0000000..90a3caa
--- /dev/null
+++ b/mail/release.tmpl
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<title>{{.Subject}}</title>
+
+	<style>
+		blockquote { padding-left: 1em; margin: 1em 0; border-left: 1px solid grey; color: #777}
+		.footer { font-size:small; color:#666;}
+	</style>
+
+</head>
+
+{{$release_url := HTMLFormat "<a href='%s'>%s</a>" .Release.HTMLURL .Release.TagName}}
+{{$repo_url := HTMLFormat "<a href='%s'>%s</a>" .Release.Repo.HTMLURL .Release.Repo.FullName}}
+<body>
+	<p>
+		{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}}
+	</p>
+	<h4>{{.locale.Tr "mail.release.title" .Release.Title}}</h4>
+	<p>
+		{{.locale.Tr "mail.release.note"}}<br>
+		{{- if eq .Release.RenderedNote ""}}
+		{{else}}
+			{{.Release.RenderedNote}}
+		{{end -}}
+	</p>
+	<br><br>
+	<p>
+		---
+		<br>
+		{{.locale.Tr "mail.release.downloads"}}
+		<ul>
+			{{if not .DisableDownloadSourceArchives}}
+			<li>
+				<a href="{{.Release.Repo.Link}}/archive/{{.Release.TagName | PathEscapeSegments}}.zip" rel="nofollow"><strong>{{.locale.Tr "mail.release.download.zip"}}</strong></a>
+			</li>
+			<li>
+				<a href="{{.Release.Repo.Link}}/archive/{{.Release.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow"><strong>{{.locale.Tr "mail.release.download.targz"}}</strong></a>
+			</li>
+			{{end}}
+			{{if .Release.Attachments}}
+				{{range .Release.Attachments}}
+					<li>
+						<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
+							<strong>{{.Name}} ({{.Size | FileSize}})</strong>
+						</a>
+					</li>
+				{{end}}
+			{{end}}
+		</ul>
+	</p>
+	<div class="footer">
+	<p>
+		---
+		<br>
+		<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>.
+	</p>
+	</div>
+</body>
+</html>
diff --git a/mail/team_invite.tmpl b/mail/team_invite.tmpl
new file mode 100644
index 0000000..cb0c0c0
--- /dev/null
+++ b/mail/team_invite.tmpl
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
+</head>
+<body>
+	<p>{{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}}</p>
+	<p>{{.locale.Tr "mail.team_invite.text_2"}}</p><p><a href="{{.InviteURL}}">{{.InviteURL}}</a></p>
+	<p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p>
+	<p>{{.locale.Tr "mail.team_invite.text_3" .Invite.Email}}</p>
+
+	<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
+</body>
+</html>
diff --git a/org/create.tmpl b/org/create.tmpl
new file mode 100644
index 0000000..004cd9b
--- /dev/null
+++ b/org/create.tmpl
@@ -0,0 +1,57 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization new org">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "new_org"}}
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_OrgName}}error{{end}}">
+						<label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}</label>
+						<input id="org_name" name="org_name" value="{{.org_name}}" autofocus required maxlength="40">
+						<span class="help">{{ctx.Locale.Tr "org.org_name_helper"}}</span>
+					</div>
+
+					<div class="inline field {{if .Err_OrgVisibility}}error{{end}}">
+						<span class="inline required field"><label for="visibility">{{ctx.Locale.Tr "org.settings.visibility"}}</label></span>
+						<div class="inline-grouped-list">
+							<div class="ui radio checkbox">
+								<input class="enable-system-radio" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "org.settings.visibility.public"}}</label>
+							</div>
+							<div class="ui radio checkbox">
+								<input class="enable-system-radio" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "org.settings.visibility.limited"}}</label>
+							</div>
+							<div class="ui radio checkbox">
+								<input class="enable-system-radio" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "org.settings.visibility.private"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div class="inline field" id="permission_box">
+						<label>{{ctx.Locale.Tr "org.settings.permission"}}</label>
+						<div class="inline-grouped-list">
+							<div class="ui checkbox">
+								<input type="checkbox" name="repo_admin_change_team_access" checked>
+								<label>{{ctx.Locale.Tr "org.settings.repoadminchangeteam"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "org.create_org"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/org/follow_unfollow.tmpl b/org/follow_unfollow.tmpl
new file mode 100644
index 0000000..ba0bd01
--- /dev/null
+++ b/org/follow_unfollow.tmpl
@@ -0,0 +1,7 @@
+<button class="ui basic button tw-mr-0" hx-post="{{.Org.HomeLink}}?action={{if $.IsFollowing}}unfollow{{else}}follow{{end}}">
+	{{if $.IsFollowing}}
+		{{ctx.Locale.Tr "user.unfollow"}}
+	{{else}}
+		{{ctx.Locale.Tr "user.follow"}}
+	{{end}}
+</button>
diff --git a/org/header.tmpl b/org/header.tmpl
new file mode 100644
index 0000000..8051936
--- /dev/null
+++ b/org/header.tmpl
@@ -0,0 +1,32 @@
+<div class="ui container tw-flex">
+	{{ctx.AvatarUtils.Avatar .Org 100 "org-avatar"}}
+	<div id="org-info" class="tw-flex tw-flex-col tw-flex-1 tw-break-anywhere">
+		<div class="ui header">
+			{{.Org.DisplayName}}
+			<span class="org-visibility">
+				{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
+				{{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
+			</span>
+			<span class="tw-flex tw-items-center tw-gap-1 tw-ml-auto tw-text-16 tw-whitespace-nowrap">
+				{{if .EnableFeed}}
+					<a class="ui basic label button tw-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
+						{{svg "octicon-rss" 24}}
+					</a>
+				{{end}}
+				{{if .IsSigned}}
+					{{template "org/follow_unfollow" .}}
+				{{end}}
+			</span>
+		</div>
+		{{if .RenderedDescription}}<div class="render-content markup tw-break-anywhere">{{.RenderedDescription}}</div>{{end}}
+		<div class="text light meta tw-mt-1">
+			{{if .Org.Location}}<div class="flex-text-block">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
+			{{if .Org.Website}}<div class="flex-text-block">{{svg "octicon-link"}} <a class="muted" target="_blank" rel="noopener noreferrer me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
+			{{if .IsSigned}}
+				{{if .Org.Email}}<div class="flex-text-block">{{svg "octicon-mail"}} <a class="muted" href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></div>{{end}}
+			{{end}}
+		</div>
+	</div>
+</div>
+
+{{template "org/menu" .}}
diff --git a/org/home.tmpl b/org/home.tmpl
new file mode 100644
index 0000000..4851b69
--- /dev/null
+++ b/org/home.tmpl
@@ -0,0 +1,68 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization profile">
+	{{template "org/header" .}}
+
+	<div class="ui container">
+		<div class="ui mobile reversed stackable grid">
+			<div class="ui {{if .ShowMemberAndTeamTab}}eleven wide{{end}} column">
+				{{if .ProfileReadme}}
+					<div id="readme_profile" class="markup">{{.ProfileReadme}}</div>
+				{{end}}
+				{{template "shared/repo_search" .}}
+				{{template "explore/repo_list" .}}
+				{{template "base/paginate" .}}
+			</div>
+
+			{{if .ShowMemberAndTeamTab}}
+			<div class="ui five wide column">
+				{{if .CanCreateOrgRepo}}
+					<div class="center aligned tw-mb-4">
+						<a class="ui primary button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{ctx.Locale.Tr "new_repo"}}</a>
+						{{if not .DisableNewPullMirrors}}
+							<a class="ui primary button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{ctx.Locale.Tr "new_migrate"}}</a>
+						{{end}}
+					</div>
+					<div class="divider"></div>
+				{{end}}
+				{{if .NumMembers}}
+					<h4 class="ui top attached header tw-flex">
+						<strong class="tw-flex-1">{{ctx.Locale.Tr "org.members"}}</strong>
+						<a class="text grey tw-flex tw-items-center" href="{{.OrgLink}}/members"><span>{{.NumMembers}}</span> {{svg "octicon-chevron-right"}}</a>
+					</h4>
+					<div class="ui attached segment members">
+						{{$isMember := .IsOrganizationMember}}
+						{{range .Members}}
+							{{if or $isMember (call $.IsPublicMember .ID)}}
+								<a href="{{.HomeLink}}" title="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}">{{ctx.AvatarUtils.Avatar . 48}}</a>
+							{{end}}
+						{{end}}
+					</div>
+				{{end}}
+				{{if .IsOrganizationMember}}
+					<div class="ui top attached header tw-flex">
+						<strong class="tw-flex-1">{{ctx.Locale.Tr "org.teams"}}</strong>
+						<a class="text grey tw-flex tw-items-center" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right"}}</a>
+					</div>
+					<div class="ui attached table segment teams">
+						{{range .Teams}}
+							<div class="item">
+								<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong class="team-name">{{.Name}}</strong></a>
+								<p class="text grey">
+									<a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{ctx.Locale.Tr "org.lower_members"}}</a> ·
+									<a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{ctx.Locale.Tr "org.lower_repositories"}}</a>
+								</p>
+							</div>
+						{{end}}
+					</div>
+					{{if .IsOrganizationOwner}}
+						<div class="ui bottom attached segment">
+							<a class="ui primary small button" href="{{.OrgLink}}/teams/new">{{ctx.Locale.Tr "org.create_new_team"}}</a>
+						</div>
+					{{end}}
+				{{end}}
+			</div>
+			{{end}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/org/member/members.tmpl b/org/member/members.tmpl
new file mode 100644
index 0000000..4388dc9
--- /dev/null
+++ b/org/member/members.tmpl
@@ -0,0 +1,90 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization members">
+	{{template "org/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+
+		<div class="flex-list">
+			{{range .Members}}
+				{{$isPublic := index $.MembersIsPublicMember .ID}}
+				<div class="flex-item {{if $.PublicOnly}}tw-items-center{{end}}">
+					<div class="flex-item-leading">
+						<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 48}}</a>
+					</div>
+					<div class="flex-item-main">
+						<div class="flex-item-title">
+							{{template "shared/user/name" .}}
+							{{if not $isPublic}}
+								<span class="ui basic tiny label">{{ctx.Locale.Tr "org.members.private"}}</span>
+							{{end}}
+						</div>
+						{{if not $.PublicOnly}}
+							<div class="flex-item-body">
+								{{ctx.Locale.Tr "org.members.member_role"}}
+								<strong class="flex-text-inline">{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{ctx.Locale.Tr "org.members.owner"}}{{else}}{{ctx.Locale.Tr "org.members.member"}}{{end}}</strong>
+							</div>
+							{{if $.IsOrganizationOwner}}
+							<div class="flex-item-body">
+								{{ctx.Locale.Tr "admin.users.2fa"}}
+								<strong>
+									{{if index $.MembersTwoFaStatus .ID}}
+										<span class="text green">{{svg "octicon-check"}}</span>
+									{{else}}
+										{{svg "octicon-x"}}
+									{{end}}
+								</strong>
+							</div>
+							{{end}}
+						{{end}}
+					</div>
+					<div class="flex-item-trailing">
+						{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}
+							{{if $isPublic}}
+								<a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{ctx.Locale.Tr "org.members.public_helper"}}</a>
+							{{else}}
+								<a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{svg "octicon-eye" 12 "icon"}}{{ctx.Locale.Tr "org.members.private_helper"}}</a>
+							{{end}}
+						{{end}}
+						{{if eq $.SignedUser.ID .ID}}
+							<form>
+								<button class="ui red tiny button delete-button" data-modal-id="leave-organization"
+									data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}"
+									data-name="{{.DisplayName}}"
+									data-data-organization-name="{{$.Org.DisplayName}}">{{ctx.Locale.Tr "org.members.leave"}}</button>
+							</form>
+						{{else if $.IsOrganizationOwner}}
+							<form>
+								<button class="ui red tiny button delete-button" data-modal-id="remove-organization-member"
+									data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}"
+									data-name="{{.DisplayName}}"
+									data-data-organization-name="{{$.Org.DisplayName}}">{{ctx.Locale.Tr "org.members.remove"}}</button>
+							</form>
+						{{end}}
+					</div>
+				</div>
+			{{end}}
+		</div>
+
+		{{template "base/paginate" .}}
+	</div>
+</div>
+<div class="ui g-modal-confirm delete modal" id="leave-organization">
+	<div class="header">
+		{{ctx.Locale.Tr "org.members.leave"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "org.members.leave.detail" (`<span class="dataOrganizationName"></span>`|SafeHTML)}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+<div class="ui g-modal-confirm delete modal" id="remove-organization-member">
+	<div class="header">
+		{{ctx.Locale.Tr "org.members.remove"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "org.members.remove.detail" (`<span class="name"></span>`|SafeHTML) (`<span class="dataOrganizationName"></span>`|SafeHTML)}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "base/footer" .}}
diff --git a/org/menu.tmpl b/org/menu.tmpl
new file mode 100644
index 0000000..29238f8
--- /dev/null
+++ b/org/menu.tmpl
@@ -0,0 +1,55 @@
+<div class="ui container">
+	<overflow-menu class="ui secondary pointing tabular borderless menu tw-mb-4">
+		<div class="overflow-menu-items">
+			{{if .HasProfileReadme}}
+				<a class="{{if .PageIsViewOverview}}active {{end}}item" href="{{$.Org.HomeLink}}">
+					{{svg "octicon-info"}} {{ctx.Locale.Tr "user.overview"}}
+				</a>
+			{{end}}
+			<a class="{{if .PageIsViewRepositories}}active {{end}}item" href="{{$.Org.HomeLink}}{{if .HasProfileReadme}}/-/repositories{{end}}">
+				{{svg "octicon-repo"}} {{ctx.Locale.Tr "user.repositories"}}
+				{{if .RepoCount}}
+					<div class="ui small label">{{.RepoCount}}</div>
+				{{end}}
+			</a>
+			{{if .CanReadProjects}}
+			<a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects">
+				{{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
+				{{if .ProjectCount}}
+					<div class="ui small label">{{.ProjectCount}}</div>
+				{{end}}
+			</a>
+			{{end}}
+			{{if and .IsPackageEnabled .CanReadPackages}}
+			<a class="{{if .IsPackagesPage}}active {{end}}item" href="{{$.Org.HomeLink}}/-/packages">
+				{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
+			</a>
+			{{end}}
+			{{if and .IsRepoIndexerEnabled .CanReadCode}}
+			<a class="{{if .IsCodePage}}active {{end}}item" href="{{$.Org.HomeLink}}/-/code">
+				{{svg "octicon-code"}} {{ctx.Locale.Tr "org.code"}}
+			</a>
+			{{end}}
+			{{if .NumMembers}}
+			<a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
+				{{svg "octicon-person"}} {{ctx.Locale.Tr "org.members"}}
+				<div class="ui small label">{{.NumMembers}}</div>
+			</a>
+			{{end}}
+			{{if .IsOrganizationMember}}
+			<a class="{{if $.PageIsOrgTeams}}active {{end}}item" href="{{$.OrgLink}}/teams">
+				{{svg "octicon-people"}} {{ctx.Locale.Tr "org.teams"}}
+				{{if .NumTeams}}
+					<div class="ui small label">{{.NumTeams}}</div>
+				{{end}}
+			</a>
+			{{end}}
+			{{if .IsOrganizationOwner}}
+			<span class="item-flex-space"></span>
+			<a class="{{if .PageIsOrgSettings}}active {{end}}item" href="{{.OrgLink}}/settings">
+				{{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
+			</a>
+			{{end}}
+		</div>
+	</overflow-menu>
+</div>
diff --git a/org/projects/list.tmpl b/org/projects/list.tmpl
new file mode 100644
index 0000000..80dde1c
--- /dev/null
+++ b/org/projects/list.tmpl
@@ -0,0 +1,24 @@
+{{template "base/head" .}}
+{{if .ContextUser.IsOrganization}}
+	<div role="main" aria-label="{{.Title}}" class="page-content organization projects">
+		{{template "org/header" .}}
+		<div class="ui container">
+			{{template "projects/list" .}}
+		</div>
+	</div>
+{{else}}
+	<div role="main" aria-label="{{.Title}}" class="page-content user profile">
+		<div class="ui container">
+			<div class="ui stackable grid">
+				<div class="ui four wide column">
+					{{template "shared/user/profile_big_avatar" .}}
+				</div>
+				<div class="ui twelve wide column tw-mb-4">
+					{{template "user/overview/header" .}}
+					{{template "projects/list" .}}
+				</div>
+			</div>
+		</div>
+	</div>
+{{end}}
+{{template "base/footer" .}}
diff --git a/org/projects/new.tmpl b/org/projects/new.tmpl
new file mode 100644
index 0000000..fc52130
--- /dev/null
+++ b/org/projects/new.tmpl
@@ -0,0 +1,9 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization projects edit-project new">
+	{{template "shared/user/org_profile_avatar" .}}
+	<div class="ui container">
+	{{template "user/overview/header" .}}
+	{{template "projects/new" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/org/projects/view.tmpl b/org/projects/view.tmpl
new file mode 100644
index 0000000..bd74114
--- /dev/null
+++ b/org/projects/view.tmpl
@@ -0,0 +1,15 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization repository projects view-project">
+	{{if .ContextUser.IsOrganization}}
+		{{template "org/header" .}}
+	{{else}}
+		{{template "shared/user/org_profile_avatar" .}}
+		<div class="ui container tw-mb-4">
+			{{template "user/overview/header" .}}
+		</div>
+	{{end}}
+	<div class="ui container fluid padded">
+		{{template "projects/view" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/org/settings/actions.tmpl b/org/settings/actions.tmpl
new file mode 100644
index 0000000..abb9c98
--- /dev/null
+++ b/org/settings/actions.tmpl
@@ -0,0 +1,11 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings actions")}}
+	<div class="org-setting-content">
+	{{if eq .PageType "runners"}}
+		{{template "shared/actions/runner_list" .}}
+	{{else if eq .PageType "secrets"}}
+		{{template "shared/secrets/add_list" .}}
+	{{else if eq .PageType "variables"}}
+		{{template "shared/variables/variable_list" .}}
+	{{end}}
+	</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/applications.tmpl b/org/settings/applications.tmpl
new file mode 100644
index 0000000..df5f4e9
--- /dev/null
+++ b/org/settings/applications.tmpl
@@ -0,0 +1,9 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}}
+			<div class="org-setting-content">
+				<h4 class="ui top attached header">
+					{{ctx.Locale.Tr "settings.applications"}}
+				</h4>
+
+				{{template "user/settings/applications_oauth2_list" .}}
+			</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/applications_oauth2_edit.tmpl b/org/settings/applications_oauth2_edit.tmpl
new file mode 100644
index 0000000..987803a
--- /dev/null
+++ b/org/settings/applications_oauth2_edit.tmpl
@@ -0,0 +1,5 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}}
+			<div class="org-setting-content">
+				{{template "user/settings/applications_oauth2_edit_form" .}}
+			</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/blocked_users.tmpl b/org/settings/blocked_users.tmpl
new file mode 100644
index 0000000..eab5ec0
--- /dev/null
+++ b/org/settings/blocked_users.tmpl
@@ -0,0 +1,5 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings blocked_users")}}
+<div class="org-setting-content">
+	{{template "shared/user/blocked_users" .}}
+</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/delete.tmpl b/org/settings/delete.tmpl
new file mode 100644
index 0000000..e1ef471
--- /dev/null
+++ b/org/settings/delete.tmpl
@@ -0,0 +1,35 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings delete")}}
+
+			<div class="org-setting-content">
+				<h4 class="ui top attached error header">
+					{{ctx.Locale.Tr "org.settings.delete_account"}}
+				</h4>
+				<div class="ui attached error segment">
+					<div class="ui red message">
+						<p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "org.settings.delete_prompt"}}</p>
+					</div>
+					<form class="ui form ignore-dirty" id="delete-form" action="{{.Link}}" method="post">
+						{{.CsrfTokenHtml}}
+						<div class="inline required field {{if .Err_OrgName}}error{{end}}">
+							<label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}</label>
+							<input id="org_name" name="org_name" value="" autocomplete="off" autofocus required>
+						</div>
+						<button class="ui red button delete-button" data-type="form" data-form="#delete-form">
+							{{ctx.Locale.Tr "org.settings.confirm_delete_account"}}
+						</button>
+					</form>
+				</div>
+			</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "org.settings.delete_org_title"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "org.settings.delete_org_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/hook_new.tmpl b/org/settings/hook_new.tmpl
new file mode 100644
index 0000000..f89ee5f
--- /dev/null
+++ b/org/settings/hook_new.tmpl
@@ -0,0 +1,7 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings new webhook")}}
+	<div class="org-setting-content">
+		{{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}}
+		{{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}}
+		{{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}}
+	</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/hooks.tmpl b/org/settings/hooks.tmpl
new file mode 100644
index 0000000..9f30796
--- /dev/null
+++ b/org/settings/hooks.tmpl
@@ -0,0 +1,5 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings webhooks")}}
+			<div class="org-setting-content">
+				{{template "repo/settings/webhook/list" .}}
+			</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/labels.tmpl b/org/settings/labels.tmpl
new file mode 100644
index 0000000..21d7c0e
--- /dev/null
+++ b/org/settings/labels.tmpl
@@ -0,0 +1,13 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings labels")}}
+<div class="org-setting-content">
+	<div class="tw-flex tw-items-center">
+		<div class="tw-flex-1">
+			{{ctx.Locale.Tr "org.settings.labels_desc"}}
+		</div>
+		<button class="ui small primary new-label button">{{ctx.Locale.Tr "repo.issues.new_label"}}</button>
+	</div>
+	<div class="divider"></div>
+	{{template "repo/issue/labels/label_list" .}}
+	{{template "repo/issue/labels/label_edit_modal" .}}
+</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/layout_footer.tmpl b/org/settings/layout_footer.tmpl
new file mode 100644
index 0000000..09d88c0
--- /dev/null
+++ b/org/settings/layout_footer.tmpl
@@ -0,0 +1,11 @@
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+<div class="page-content">
+	<div class="org-layout-right">
+		<div>
+		{{/* block: org-setting-content */}}
+{{end}}
+
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/org/settings/layout_head.tmpl b/org/settings/layout_head.tmpl
new file mode 100644
index 0000000..31dad2c
--- /dev/null
+++ b/org/settings/layout_head.tmpl
@@ -0,0 +1,14 @@
+{{template "base/head" .ctxData}}
+<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}">
+	{{template "org/header" .ctxData}}
+	<div class="ui container flex-container">
+		{{template "org/settings/navbar" .ctxData}}
+		<div class="flex-container-main">
+			{{template "base/alert" .ctxData}}
+			{{/* block: org-setting-content */}}
+
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+		</div>
+	</div>
+</div>
+{{end}}
diff --git a/org/settings/navbar.tmpl b/org/settings/navbar.tmpl
new file mode 100644
index 0000000..ce792f6
--- /dev/null
+++ b/org/settings/navbar.tmpl
@@ -0,0 +1,48 @@
+<div class="flex-container-nav">
+	<div class="ui fluid vertical menu">
+		<div class="header item">{{ctx.Locale.Tr "org.settings"}}</div>
+		<a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.OrgLink}}/settings">
+			{{ctx.Locale.Tr "org.settings.options"}}
+		</a>
+		{{if not DisableWebhooks}}
+		<a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.OrgLink}}/settings/hooks">
+			{{ctx.Locale.Tr "repo.settings.hooks"}}
+		</a>
+		{{end}}
+		<a class="{{if .PageIsOrgSettingsLabels}}active {{end}}item" href="{{.OrgLink}}/settings/labels">
+			{{ctx.Locale.Tr "repo.labels"}}
+		</a>
+		{{if .EnableOAuth2}}
+		<a class="{{if .PageIsSettingsApplications}}active {{end}}item" href="{{.OrgLink}}/settings/applications">
+			{{ctx.Locale.Tr "settings.applications"}}
+		</a>
+		{{end}}
+		<a class="{{if .PageIsSettingsBlockedUsers}}active {{end}}item" href="{{.OrgLink}}/settings/blocked_users">
+			{{ctx.Locale.Tr "user.block.list"}}
+		</a>
+		{{if .EnablePackages}}
+		<a class="{{if .PageIsSettingsPackages}}active {{end}}item" href="{{.OrgLink}}/settings/packages">
+			{{ctx.Locale.Tr "packages.title"}}
+		</a>
+		{{end}}
+		{{if .EnableActions}}
+		<details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}>
+			<summary>{{ctx.Locale.Tr "actions.actions"}}</summary>
+			<div class="menu">
+				<a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{.OrgLink}}/settings/actions/runners">
+					{{ctx.Locale.Tr "actions.runners"}}
+				</a>
+				<a class="{{if .PageIsSharedSettingsSecrets}}active {{end}}item" href="{{.OrgLink}}/settings/actions/secrets">
+					{{ctx.Locale.Tr "secrets.secrets"}}
+				</a>
+				<a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{.OrgLink}}/settings/actions/variables">
+					{{ctx.Locale.Tr "actions.variables"}}
+				</a>
+			</div>
+		</details>
+		{{end}}
+		<a class="{{if .PageIsSettingsDelete}}active {{end}}item" href="{{.OrgLink}}/settings/delete">
+			{{ctx.Locale.Tr "org.settings.delete"}}
+		</a>
+	</div>
+</div>
diff --git a/org/settings/options.tmpl b/org/settings/options.tmpl
new file mode 100644
index 0000000..3b817d0
--- /dev/null
+++ b/org/settings/options.tmpl
@@ -0,0 +1,103 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}}
+			<div class="org-setting-content">
+				<h4 class="ui top attached header">
+					{{ctx.Locale.Tr "org.settings.options"}}
+				</h4>
+				<div class="ui attached segment">
+					<form class="ui form" action="{{.Link}}" method="post">
+						{{.CsrfTokenHtml}}
+						<div class="required field {{if .Err_Name}}error{{end}}">
+							<label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}
+								<span class="text red tw-hidden" id="org-name-change-prompt">
+									<br>{{ctx.Locale.Tr "org.settings.change_orgname_prompt"}}<br>{{ctx.Locale.Tr "org.settings.change_orgname_redirect_prompt"}}
+								</span>
+							</label>
+							<input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required maxlength="40">
+						</div>
+						<div class="field {{if .Err_FullName}}error{{end}}">
+							<label for="full_name">{{ctx.Locale.Tr "org.org_full_name_holder"}}</label>
+							<input id="full_name" name="full_name" value="{{.Org.FullName}}" maxlength="100">
+						</div>
+						<div class="field {{if .Err_Email}}error{{end}}">
+							<label for="email">{{ctx.Locale.Tr "org.settings.email"}}</label>
+							<input id="email" name="email" type="email" value="{{.Org.Email}}" maxlength="255">
+						</div>
+						<div class="field {{if .Err_Description}}error{{end}}">
+							{{/* it is rendered as markdown, but the length is limited, so at the moment we do not use the markdown editor here */}}
+							<label for="description">{{ctx.Locale.Tr "org.org_desc"}}</label>
+							<textarea id="description" name="description" rows="2" maxlength="255">{{.Org.Description}}</textarea>
+						</div>
+						<div class="field {{if .Err_Website}}error{{end}}">
+							<label for="website">{{ctx.Locale.Tr "org.settings.website"}}</label>
+							<input id="website" name="website" type="url" value="{{.Org.Website}}" maxlength="255">
+						</div>
+						<div class="field">
+							<label for="location">{{ctx.Locale.Tr "org.settings.location"}}</label>
+							<input id="location" name="location"  value="{{.Org.Location}}" maxlength="50">
+						</div>
+
+						<div class="divider"></div>
+						<div class="field" id="visibility_box">
+							<label for="visibility">{{ctx.Locale.Tr "org.settings.visibility"}}</label>
+							<div class="field">
+								<div class="ui radio checkbox">
+									<input class="enable-system-radio" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}>
+									<label>{{ctx.Locale.Tr "org.settings.visibility.public"}}</label>
+								</div>
+							</div>
+							<div class="field">
+								<div class="ui radio checkbox">
+									<input class="enable-system-radio" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}>
+									<label>{{ctx.Locale.Tr "org.settings.visibility.limited"}}</label>
+								</div>
+							</div>
+							<div class="field">
+								<div class="ui radio checkbox">
+									<input class="enable-system-radio" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}>
+									<label>{{ctx.Locale.Tr "org.settings.visibility.private"}}</label>
+								</div>
+							</div>
+						</div>
+
+						<div class="field" id="permission_box">
+							<label>{{ctx.Locale.Tr "org.settings.permission"}}</label>
+							<div class="field">
+								<div class="ui checkbox">
+									<input type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}>
+									<label>{{ctx.Locale.Tr "org.settings.repoadminchangeteam"}}</label>
+								</div>
+							</div>
+						</div>
+
+						{{if .SignedUser.IsAdmin}}
+						<div class="divider"></div>
+
+						<div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
+							<label for="max_repo_creation">{{ctx.Locale.Tr "admin.users.max_repo_creation"}}</label>
+							<input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.Org.MaxRepoCreation}}">
+							<p class="help">{{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}</p>
+						</div>
+						{{end}}
+
+						<div class="field">
+							<button class="ui primary button">{{ctx.Locale.Tr "org.settings.update_settings"}}</button>
+						</div>
+					</form>
+
+					<div class="divider"></div>
+
+					<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
+						{{.CsrfTokenHtml}}
+						<div class="inline field">
+							<label for="avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label>
+							<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
+						</div>
+
+						<div class="field">
+							<button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button>
+							<button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button>
+						</div>
+					</form>
+				</div>
+			</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/packages.tmpl b/org/settings/packages.tmpl
new file mode 100644
index 0000000..91106c3
--- /dev/null
+++ b/org/settings/packages.tmpl
@@ -0,0 +1,6 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}}
+			<div class="org-setting-content">
+				{{template "package/shared/cleanup_rules/list" .}}
+				{{template "package/shared/cargo" .}}
+			</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/packages_cleanup_rules_edit.tmpl b/org/settings/packages_cleanup_rules_edit.tmpl
new file mode 100644
index 0000000..ff4c2dd
--- /dev/null
+++ b/org/settings/packages_cleanup_rules_edit.tmpl
@@ -0,0 +1,5 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}}
+			<div class="org-setting-content">
+				{{template "package/shared/cleanup_rules/edit" .}}
+			</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/packages_cleanup_rules_preview.tmpl b/org/settings/packages_cleanup_rules_preview.tmpl
new file mode 100644
index 0000000..5a2f061
--- /dev/null
+++ b/org/settings/packages_cleanup_rules_preview.tmpl
@@ -0,0 +1,5 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}}
+			<div class="org-setting-content">
+				{{template "package/shared/cleanup_rules/preview" .}}
+			</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/settings/runners_edit.tmpl b/org/settings/runners_edit.tmpl
new file mode 100644
index 0000000..acd67a4
--- /dev/null
+++ b/org/settings/runners_edit.tmpl
@@ -0,0 +1,5 @@
+{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings runners")}}
+			<div class="org-setting-content">
+				{{template "shared/actions/runner_edit" .}}
+			</div>
+{{template "org/settings/layout_footer" .}}
diff --git a/org/team/invite.tmpl b/org/team/invite.tmpl
new file mode 100644
index 0000000..1167828
--- /dev/null
+++ b/org/team/invite.tmpl
@@ -0,0 +1,23 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization invite">
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<div class="ui centered card">
+			<div class="image">
+				{{ctx.AvatarUtils.Avatar .Organization 140}}
+			</div>
+			<div class="content">
+				<div class="header">{{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name}}</div>
+				<div class="meta">{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}</div>
+				<div class="description">{{ctx.Locale.Tr "org.teams.invite.description"}}</div>
+			</div>
+			<div class="extra content">
+				<form class="ui form" action="" method="post">
+					{{.CsrfTokenHtml}}
+					<button class="fluid ui primary button">{{ctx.Locale.Tr "org.teams.join"}}</button>
+				</form>
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/org/team/members.tmpl b/org/team/members.tmpl
new file mode 100644
index 0000000..5433f01
--- /dev/null
+++ b/org/team/members.tmpl
@@ -0,0 +1,88 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
+	{{template "org/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<div class="ui stackable grid">
+			{{template "org/team/sidebar" .}}
+			<div class="ui ten wide column">
+				{{template "org/team/navbar" .}}
+				{{if .IsOrganizationOwner}}
+					<div class="ui top attached segment">
+						<form class="ui form ignore-dirty tw-flex tw-flex-wrap tw-gap-2" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post">
+							{{.CsrfTokenHtml}}
+							<input type="hidden" name="uid" value="{{.SignedUser.ID}}">
+							<div id="search-user-box" class="ui search tw-mr-2"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{ctx.Locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}>
+								<div class="ui input">
+									<input class="prompt" name="uname" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" required>
+								</div>
+							</div>
+							<button class="ui primary button">{{ctx.Locale.Tr "org.teams.add_team_member"}}</button>
+						</form>
+					</div>
+				{{end}}
+				<div class="ui{{if not .IsOrganizationOwner}} top{{end}} attached segment">
+					<div class="flex-list">
+						{{range .Team.Members}}
+							<div class="flex-item tw-items-center">
+								<div class="flex-item-leading">
+									<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a>
+								</div>
+								<div class="flex-item-main">
+									<div class="flex-item-title">
+										{{template "shared/user/name" .}}
+									</div>
+								</div>
+								<div class="flex-item-trailing">
+									{{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}}
+										<form>
+											<button class="ui red button delete-button" data-modal-id="remove-team-member"
+												data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
+												data-name="{{.DisplayName}}"
+												data-data-team-name="{{$.Team.Name}}">{{ctx.Locale.Tr "org.members.remove"}}</button>
+										</form>
+									{{end}}
+								</div>
+							</div>
+						{{else}}
+							<div class="flex-item">
+								<span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.members.none"}}</span>
+							</div>
+						{{end}}
+					</div>
+				</div>
+				{{if and .Invites $.IsOrganizationOwner}}
+				<h4 class="ui top attached header">{{ctx.Locale.Tr "org.teams.invite_team_member.list"}}</h4>
+				<div class="ui attached segment">
+					<div class="flex-list">
+						{{range .Invites}}
+							<div class="flex-item tw-items-center">
+								<div class="flex-item-main">
+									{{.Email}}
+								</div>
+								<div class="flex-item-trailing">
+									<form action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove_invite" method="post">
+										{{$.CsrfTokenHtml}}
+										<input type="hidden" name="iid" value="{{.ID}}">
+										<button class="ui red button">{{ctx.Locale.Tr "org.members.remove"}}</button>
+									</form>
+								</div>
+							</div>
+						{{end}}
+					</div>
+				</div>
+				{{end}}
+			</div>
+		</div>
+	</div>
+</div>
+<div class="ui g-modal-confirm delete modal" id="remove-team-member">
+	<div class="header">
+		{{ctx.Locale.Tr "org.members.remove"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "org.members.remove.detail" (`<span class="name"></span>`|SafeHTML) (`<span class="dataTeamName"></span>`|SafeHTML)}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/org/team/navbar.tmpl b/org/team/navbar.tmpl
new file mode 100644
index 0000000..9704f63
--- /dev/null
+++ b/org/team/navbar.tmpl
@@ -0,0 +1,4 @@
+<div class="ui compact small menu small-menu-items org-team-navbar">
+	<a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{ctx.Locale.Tr "org.lower_members"}}</a>
+	<a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{ctx.Locale.Tr "org.lower_repositories"}}</a>
+</div>
diff --git a/org/team/new.tmpl b/org/team/new.tmpl
new file mode 100644
index 0000000..410a3c4
--- /dev/null
+++ b/org/team/new.tmpl
@@ -0,0 +1,161 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization new team">
+	{{template "org/header" .}}
+	<div class="ui container">
+		<div class="ui grid">
+			<div class="column">
+				<form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/delete" method="post">
+					{{.CsrfTokenHtml}}
+					<h3 class="ui top attached header">
+						{{if .PageIsOrgTeamsNew}}{{ctx.Locale.Tr "org.create_new_team"}}{{else}}{{ctx.Locale.Tr "org.teams.settings"}}{{end}}
+					</h3>
+					<div class="ui attached segment">
+						{{template "base/alert" .}}
+						<div class="required field {{if .Err_TeamName}}error{{end}}">
+							<label for="team_name">{{ctx.Locale.Tr "org.team_name"}}</label>
+							{{if eq .Team.LowerName "owners"}}
+								<input type="hidden" name="team_name" value="{{.Team.Name}}">
+							{{end}}
+							<input id="team_name" name="team_name" value="{{.Team.Name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus>
+							<span class="help">{{ctx.Locale.Tr "org.team_name_helper"}}</span>
+						</div>
+						<div class="field {{if .Err_Description}}error{{end}}">
+							<label for="description">{{ctx.Locale.Tr "org.team_desc"}}</label>
+							<input id="description" name="description" value="{{.Team.Description}}">
+							<span class="help">{{ctx.Locale.Tr "org.team_desc_helper"}}</span>
+						</div>
+						{{if not (eq .Team.LowerName "owners")}}
+							<div class="grouped field">
+								<label>{{ctx.Locale.Tr "org.team_access_desc"}}</label>
+								<br>
+								<div class="field">
+									<div class="ui radio checkbox">
+										<input type="radio" name="repo_access" value="specific" {{if not .Team.IncludesAllRepositories}}checked{{end}}>
+										<label>{{ctx.Locale.Tr "org.teams.specific_repositories"}}</label>
+										<span class="help">{{ctx.Locale.Tr "org.teams.specific_repositories_helper"}}</span>
+									</div>
+								</div>
+								<div class="field">
+									<div class="ui radio checkbox">
+										<input type="radio" name="repo_access" value="all" {{if .Team.IncludesAllRepositories}}checked{{end}}>
+										<label>{{ctx.Locale.Tr "org.teams.all_repositories"}}</label>
+										<span class="help">{{ctx.Locale.Tr "org.teams.all_repositories_helper"}}</span>
+									</div>
+								</div>
+
+								<div class="field">
+									<div class="ui checkbox">
+										<label for="can_create_org_repo">{{ctx.Locale.Tr "org.teams.can_create_org_repo"}}</label>
+										<input id="can_create_org_repo" name="can_create_org_repo" type="checkbox" {{if .Team.CanCreateOrgRepo}}checked{{end}}>
+										<span class="help">{{ctx.Locale.Tr "org.teams.can_create_org_repo_helper"}}</span>
+									</div>
+								</div>
+							</div>
+							<div class="grouped field">
+								<label>{{ctx.Locale.Tr "org.team_permission_desc"}}</label>
+								<br>
+								<div class="field">
+									<div class="ui radio checkbox">
+										<input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.AccessMode 1) (eq .Team.AccessMode 2)}}checked{{end}}>
+										<label>{{ctx.Locale.Tr "org.teams.general_access"}}</label>
+										<span class="help">{{ctx.Locale.Tr "org.teams.general_access_helper"}}</span>
+									</div>
+								</div>
+								<div class="field">
+									<div class="ui radio checkbox">
+										<input type="radio" name="permission" value="admin" {{if eq .Team.AccessMode 3}}checked{{end}}>
+										<label>{{ctx.Locale.Tr "org.teams.admin_access"}}</label>
+										<span class="help">{{ctx.Locale.Tr "org.teams.admin_access_helper"}}</span>
+									</div>
+								</div>
+							</div>
+							<div class="divider"></div>
+
+							<div class="team-units required grouped field {{if eq .Team.AccessMode 3}}tw-hidden{{end}}">
+								<label>{{ctx.Locale.Tr "org.team_unit_desc"}}</label>
+								<table class="ui celled table">
+									<thead>
+										<tr>
+											<th>{{ctx.Locale.Tr "units.unit"}}</th>
+											<th class="center aligned">{{ctx.Locale.Tr "org.teams.none_access"}}
+											<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th>
+											<th class="center aligned">{{ctx.Locale.Tr "org.teams.read_access"}}
+											<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th>
+											<th class="center aligned">{{ctx.Locale.Tr "org.teams.write_access"}}
+											<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th>
+										</tr>
+									</thead>
+									<tbody>
+										{{range $t, $unit := $.Units}}
+											{{if ge $unit.MaxPerm 2}}
+												<tr>
+													<td>
+														<div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{- else -}}class="field"{{end}}>
+															<div>
+																<label>{{ctx.Locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{ctx.Locale.Tr "org.team_unit_disabled"}}{{end}}</label>
+																<span class="help">{{ctx.Locale.Tr $unit.DescKey}}</span>
+															</div>
+														</div>
+													</td>
+													<td class="center aligned">
+														<div class="ui radio checkbox">
+															<input type="radio" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode ctx $unit.Type) 0)}} checked{{end}} title="{{ctx.Locale.Tr "org.teams.none_access"}}">
+														</div>
+													</td>
+													<td class="center aligned">
+														<div class="ui radio checkbox">
+															<input type="radio" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode ctx $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{ctx.Locale.Tr "org.teams.read_access"}}">
+														</div>
+													</td>
+													<td class="center aligned">
+														<div class="ui radio checkbox">
+															<input type="radio" name="unit_{{$unit.Type.Value}}" value="2"{{if (ge ($.Team.UnitAccessMode ctx $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{ctx.Locale.Tr "org.teams.write_access"}}">
+														</div>
+													</td>
+												</tr>
+											{{end}}
+										{{end}}
+									</tbody>
+								</table>
+								{{range $t, $unit := $.Units}}
+									{{if lt $unit.MaxPerm 2}}
+										<div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}>
+											<div class="ui checkbox">
+												<input type="checkbox" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode ctx $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
+												<label>{{ctx.Locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{ctx.Locale.Tr "org.team_unit_disabled"}}{{end}}</label>
+												<span class="help">{{ctx.Locale.Tr $unit.DescKey}}</span>
+											</div>
+										</div>
+									{{end}}
+								{{end}}
+							</div>
+						{{end}}
+
+						<div class="field">
+							{{if .PageIsOrgTeamsNew}}
+								<button class="ui primary button">{{ctx.Locale.Tr "org.create_team"}}</button>
+							{{else}}
+								<button class="ui primary button">{{ctx.Locale.Tr "org.teams.update_settings"}}</button>
+								{{if not (eq .Team.LowerName "owners")}}
+									<button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.Team.Name | PathEscape}}/delete">{{ctx.Locale.Tr "org.teams.delete_team"}}</button>
+								{{end}}
+							{{end}}
+						</div>
+					</div>
+				</form>
+			</div>
+		</div>
+	</div>
+</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "org.teams.delete_team_title"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "org.teams.delete_team_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/org/team/repositories.tmpl b/org/team/repositories.tmpl
new file mode 100644
index 0000000..502cf97
--- /dev/null
+++ b/org/team/repositories.tmpl
@@ -0,0 +1,61 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
+	{{template "org/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<div class="ui stackable grid">
+			{{template "org/team/sidebar" .}}
+			<div class="ui ten wide column">
+				{{template "org/team/navbar" .}}
+				{{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}}
+				{{if $canAddRemove}}
+					<div class="ui attached segment tw-flex tw-flex-wrap tw-gap-2">
+						<form class="ui form ignore-dirty tw-flex-1 tw-flex" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/add" method="post">
+							{{.CsrfTokenHtml}}
+							<div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search">
+								<div class="ui input">
+									<input class="prompt" name="repo_name" placeholder="{{ctx.Locale.Tr "search.repo_kind"}}" autocomplete="off" required>
+								</div>
+							</div>
+							<button class="ui primary button tw-ml-2">{{ctx.Locale.Tr "add"}}</button>
+						</form>
+						<div class="tw-inline-block">
+							<button class="ui primary button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{ctx.Locale.Tr "add_all"}}</button>
+							<button class="ui red button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.remove_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{ctx.Locale.Tr "remove_all"}}</button>
+						</div>
+					</div>
+				{{end}}
+				<div class="ui{{if not $canAddRemove}} top{{end}} attached segment">
+					<div class="flex-list">
+						{{range .Team.Repos}}
+							<div class="flex-item tw-items-center">
+								<div class="flex-item-leading">
+									{{template "repo/icon" .}}
+								</div>
+								<div class="flex-item-main">
+									<a class="flex-item-title text primary" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
+										{{$.Org.Name}}/{{.Name}}
+									</a>
+								</div>
+								<div class="flex-item-trailing">
+									{{if $canAddRemove}}
+										<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
+											{{$.CsrfTokenHtml}}
+											<button type="submit" class="ui red small button" name="repoid" value="{{.ID}}">{{ctx.Locale.Tr "remove"}}</button>
+										</form>
+									{{end}}
+								</div>
+							</div>
+						{{else}}
+							<div class="flex-item">
+								<span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.repos.none"}}</span>
+							</div>
+						{{end}}
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+
+{{template "base/footer" .}}
diff --git a/org/team/sidebar.tmpl b/org/team/sidebar.tmpl
new file mode 100644
index 0000000..c4acd8d
--- /dev/null
+++ b/org/team/sidebar.tmpl
@@ -0,0 +1,94 @@
+<div class="ui six wide column">
+	<h4 class="ui top attached header">
+		<strong>{{.Team.Name}}</strong>
+		<div class="ui right">
+			{{if .Team.IsMember ctx $.SignedUser.ID}}
+				<form>
+					<button class="ui red tiny button delete-button" data-modal-id="leave-team-sidebar"
+						data-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
+						data-name="{{.Team.Name}}">{{ctx.Locale.Tr "org.teams.leave"}}</button>
+				</form>
+			{{else if .IsOrganizationOwner}}
+				<form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/join">
+					{{$.CsrfTokenHtml}}
+					<input type="hidden" name="page" value="team">
+					<button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{ctx.Locale.Tr "org.teams.join"}}</button>
+				</form>
+			{{end}}
+		</div>
+	</h4>
+	<div class="ui attached table segment detail">
+		<div class="item">
+			{{if .Team.Description}}
+				{{.Team.Description}}
+			{{else}}
+				<span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.no_desc"}}</span>
+			{{end}}
+		</div>
+		{{if eq .Team.LowerName "owners"}}
+			<div class="item">
+				{{ctx.Locale.Tr "org.teams.owners_permission_desc"}}
+			</div>
+		{{else}}
+			<div class="item">
+				<h3>{{ctx.Locale.Tr "org.team_access_desc"}}</h3>
+				<ul>
+					{{if .Team.IncludesAllRepositories}}
+						<li>{{ctx.Locale.Tr "org.teams.all_repositories"}}</li>
+					{{else}}
+						<li>{{ctx.Locale.Tr "org.teams.specific_repositories"}}</li>
+					{{end}}
+					{{if .Team.CanCreateOrgRepo}}
+						<li>{{ctx.Locale.Tr "org.teams.can_create_org_repo"}}</li>
+					{{end}}
+				</ul>
+				{{if (eq .Team.AccessMode 2)}}
+					<h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3>
+					{{ctx.Locale.Tr "org.teams.write_permission_desc"}}
+				{{else if (eq .Team.AccessMode 3)}}
+					<h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3>
+					{{ctx.Locale.Tr "org.teams.admin_permission_desc"}}
+				{{else}}
+					<table class="ui table">
+						<thead>
+							<tr>
+								<th>{{ctx.Locale.Tr "units.unit"}}</th>
+								<th>{{ctx.Locale.Tr "org.team_permission_desc"}}</th>
+							</tr>
+						</thead>
+						<tbody>
+							{{range $t, $unit := $.Units}}
+								{{if (not $unit.Type.UnitGlobalDisabled)}}
+									<tr>
+										<td><strong>{{ctx.Locale.Tr $unit.NameKey}}</strong></td>
+										<td>{{if eq ($.Team.UnitAccessMode ctx $unit.Type) 0 -}}
+										{{ctx.Locale.Tr "org.teams.none_access"}}
+										{{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode ctx $unit.Type) 1) -}}
+										{{ctx.Locale.Tr "org.teams.read_access"}}
+										{{- else if eq ($.Team.UnitAccessMode ctx $unit.Type) 2 -}}
+										{{ctx.Locale.Tr "org.teams.write_access"}}
+										{{- end}}</td>
+									</tr>
+								{{end}}
+							{{end}}
+						</tbody>
+					</table>
+				{{end}}
+			</div>
+		{{end}}
+	</div>
+	{{if .IsOrganizationOwner}}
+		<div class="ui bottom attached segment">
+			<a class="ui small button" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit">{{svg "octicon-gear"}} {{ctx.Locale.Tr "org.teams.settings"}}</a>
+		</div>
+	{{end}}
+</div>
+<div class="ui g-modal-confirm delete modal" id="leave-team-sidebar">
+	<div class="header">
+		{{ctx.Locale.Tr "org.teams.leave"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "org.teams.leave.detail" (`<span class="name"></span>`|SafeHTML)}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
diff --git a/org/team/teams.tmpl b/org/team/teams.tmpl
new file mode 100644
index 0000000..53c909e
--- /dev/null
+++ b/org/team/teams.tmpl
@@ -0,0 +1,56 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
+	{{template "org/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		{{if .IsOrganizationOwner}}
+			<div class="text right">
+				<a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{ctx.Locale.Tr "org.create_new_team"}}</a>
+			</div>
+			<div class="divider"></div>
+		{{end}}
+
+		<div class="ui two column stackable grid">
+			{{range .Teams}}
+				<div class="column">
+					<div class="ui top attached header">
+						<a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.Name}}</strong></a>
+						<div class="ui right">
+							<a class="ui primary tiny button" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}">{{ctx.Locale.Tr "view"}}</a>
+							{{if .IsMember ctx $.SignedUser.ID}}
+								<form>
+									<button class="ui red tiny button delete-button" data-modal-id="leave-team"
+										data-url="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
+										data-name="{{.Name}}">{{ctx.Locale.Tr "org.teams.leave"}}</button>
+								</form>
+							{{else if $.IsOrganizationOwner}}
+								<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/join">
+									{{$.CsrfTokenHtml}}
+									<button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{ctx.Locale.Tr "org.teams.join"}}</button>
+								</form>
+							{{end}}
+						</div>
+					</div>
+					<div class="ui attached segment members">
+						{{range .Members}}
+							{{template "shared/user/avatarlink" dict "user" .}}
+						{{end}}
+					</div>
+					<div class="ui bottom attached header">
+						<p class="team-meta"><a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}">{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}}</a> · <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories">{{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}</a></p>
+					</div>
+				</div>
+			{{end}}
+		</div>
+	</div>
+</div>
+<div class="ui g-modal-confirm delete modal" id="leave-team">
+	<div class="header">
+		{{ctx.Locale.Tr "org.teams.leave"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "org.teams.leave.detail" (`<span class="name"></span>`|SafeHTML)}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/package/content/alpine.tmpl b/package/content/alpine.tmpl
new file mode 100644
index 0000000..5c144b9
--- /dev/null
+++ b/package/content/alpine.tmpl
@@ -0,0 +1,52 @@
+{{if eq .PackageDescriptor.Package.Type "alpine"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.alpine.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code><origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/alpine"></origin-url>/$branch/$repository</code></pre></div>
+				<p>{{ctx.Locale.Tr "packages.alpine.registry.info"}}</p>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.alpine.registry.key"}}</label>
+				<div class="markup"><pre class="code-block"><code>curl -JO <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/alpine/key"></origin-url></code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.alpine.install"}}</label>
+				<div class="markup">
+					<pre class="code-block"><code>sudo apk add {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}</code></pre>
+				</div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Alpine" "https://docs.gitea.com/usage/packages/alpine/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.alpine.repository"}}</h4>
+	<div class="ui attached segment">
+		<table class="ui single line very basic table">
+			<tbody>
+				<tr>
+					<td class="collapsing"><h5>{{ctx.Locale.Tr "packages.alpine.repository.branches"}}</h5></td>
+					<td>{{StringUtils.Join .Branches ", "}}</td>
+				</tr>
+				<tr>
+					<td class="collapsing"><h5>{{ctx.Locale.Tr "packages.alpine.repository.repositories"}}</h5></td>
+					<td>{{StringUtils.Join .Repositories ", "}}</td>
+				</tr>
+				<tr>
+					<td class="collapsing"><h5>{{ctx.Locale.Tr "packages.alpine.repository.architectures"}}</h5></td>
+					<td>{{StringUtils.Join .Architectures ", "}}</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{.PackageDescriptor.Metadata.Description}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/arch.tmpl b/package/content/arch.tmpl
new file mode 100644
index 0000000..1c568cb
--- /dev/null
+++ b/package/content/arch.tmpl
@@ -0,0 +1,41 @@
+{{if eq .PackageDescriptor.Package.Type "arch"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-gear"}} {{ctx.Locale.Tr "packages.arch.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>[{{.PackageDescriptor.Owner.LowerName}}.{{.PackageRegistryHost}}]
+SigLevel = Optional TrustAll
+Server = <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/arch/$repo/$arch"></origin-url></code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-sync"}} {{ctx.Locale.Tr "packages.arch.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>pacman -Sy {{.PackageDescriptor.Package.LowerName}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Arch" "https://docs.gitea.com/usage/packages/arch/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.arch.repository"}}</h4>
+	<div class="ui attached segment">
+		<table class="ui single line very basic table">
+			<tbody>
+				<tr>
+					<td class="collapsing"><h5>{{ctx.Locale.Tr "packages.arch.repository.repositories"}}</h5></td>
+					<td>{{StringUtils.Join .Repositories ", "}}</td>
+				</tr>
+				<tr>
+					<td class="collapsing"><h5>{{ctx.Locale.Tr "packages.arch.repository.architectures"}}</h5></td>
+					<td>{{StringUtils.Join .Architectures ", "}}</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>
+	{{end}}
+{{end}}
diff --git a/package/content/cargo.tmpl b/package/content/cargo.tmpl
new file mode 100644
index 0000000..8b51074
--- /dev/null
+++ b/package/content/cargo.tmpl
@@ -0,0 +1,63 @@
+{{if eq .PackageDescriptor.Package.Type "cargo"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.cargo.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>[registry]
+default = "gitea"
+
+[registries.gitea]
+index = "sparse+<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cargo/"></origin-url>" # Sparse index
+# index = "<origin-url data-url="{{AppSubUrl}}/{{.PackageDescriptor.Owner.Name}}/_cargo-index.git"></origin-url>" # Git
+
+[net]
+git-fetch-with-cli = true</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.cargo.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Cargo" "https://docs.gitea.com/usage/packages/cargo/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
+		{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment">{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.Readme}}</div>{{end}}
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Dependencies}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<table class="ui single line very basic table">
+				<thead>
+					<tr>
+						<th class="ten wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
+						<th class="six wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .PackageDescriptor.Metadata.Dependencies}}
+					<tr>
+						<td>{{.Name}}</td>
+						<td>{{.Req}}</td>
+					</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Keywords}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
+		<div class="ui attached segment">
+			{{range .PackageDescriptor.Metadata.Keywords}}
+				{{.}}
+			{{end}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/chef.tmpl b/package/content/chef.tmpl
new file mode 100644
index 0000000..b371380
--- /dev/null
+++ b/package/content/chef.tmpl
@@ -0,0 +1,48 @@
+{{if eq .PackageDescriptor.Package.Type "chef"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.chef.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>knife[:supermarket_site] = '<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/chef"></origin-url>'</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.chef.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>knife supermarket install {{.PackageDescriptor.Package.Name}} {{.PackageDescriptor.Version.Version}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Chef" "https://docs.gitea.com/usage/packages/chef/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{if .PackageDescriptor.Metadata.Description}}<p>{{.PackageDescriptor.Metadata.Description}}</p>{{end}}
+			{{if .PackageDescriptor.Metadata.LongDescription}}{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.LongDescription}}{{end}}
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Dependencies}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<table class="ui single line very basic table">
+				<thead>
+					<tr>
+						<th class="eleven wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
+						<th class="five wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range $dependency, $version := .PackageDescriptor.Metadata.Dependencies}}
+					<tr>
+						<td>{{$dependency}}</td>
+						<td>{{$version}}</td>
+					</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/composer.tmpl b/package/content/composer.tmpl
new file mode 100644
index 0000000..4569820
--- /dev/null
+++ b/package/content/composer.tmpl
@@ -0,0 +1,50 @@
+{{if eq .PackageDescriptor.Package.Type "composer"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.composer.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>{
+	"repositories": [{
+			"type": "composer",
+			"url": "<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/composer"></origin-url>"
+		}
+	]
+}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.composer.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Composer" "https://docs.gitea.com/usage/packages/composer/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Comments}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
+		{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment markup markdown">{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.Readme}}</div>{{end}}
+		{{if .PackageDescriptor.Metadata.Comments}}<div class="ui attached segment">{{StringUtils.Join .PackageDescriptor.Metadata.Comments " "}}</div>{{end}}
+	{{end}}
+
+	{{if or .PackageDescriptor.Metadata.Require .PackageDescriptor.Metadata.RequireDev}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<div class="ui list">
+				{{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Require "title" (ctx.Locale.Tr "packages.composer.dependencies")}}
+				{{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RequireDev "title" (ctx.Locale.Tr "packages.composer.dependencies.development")}}
+			</div>
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Keywords}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
+		<div class="ui attached segment">
+			{{range .PackageDescriptor.Metadata.Keywords}}
+				{{.}}
+			{{end}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/composer_dependencies.tmpl b/package/content/composer_dependencies.tmpl
new file mode 100644
index 0000000..dba4575
--- /dev/null
+++ b/package/content/composer_dependencies.tmpl
@@ -0,0 +1,19 @@
+{{if .dependencies}}
+<p><strong>{{.title}}</strong></p>
+<table class="ui single line very basic table">
+	<thead>
+		<tr>
+			<th class="eleven wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
+			<th class="five wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
+		</tr>
+	</thead>
+	<tbody>
+		{{range $dependency, $version := .dependencies}}
+		<tr>
+			<td>{{$dependency}}</td>
+			<td>{{$version}}</td>
+		</tr>
+		{{end}}
+	</tbody>
+</table>
+{{end}}
diff --git a/package/content/conan.tmpl b/package/content/conan.tmpl
new file mode 100644
index 0000000..b68a45f
--- /dev/null
+++ b/package/content/conan.tmpl
@@ -0,0 +1,34 @@
+{{if eq .PackageDescriptor.Package.Type "conan"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.conan.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>conan remote add gitea <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conan"></origin-url></code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.conan.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>conan install --remote=gitea {{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Conan" "https://docs.gitea.com/usage/packages/conan/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
+		</div>
+	{{end}}
+
+	{{if or .PackageDescriptor.Metadata.Keywords}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
+		<div class="ui attached segment">
+			{{range .PackageDescriptor.Metadata.Keywords}}
+				{{.}}
+			{{end}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/conda.tmpl b/package/content/conda.tmpl
new file mode 100644
index 0000000..031b51a
--- /dev/null
+++ b/package/content/conda.tmpl
@@ -0,0 +1,30 @@
+{{if eq .PackageDescriptor.Package.Type "conda"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.conda.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>channel_alias: <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conda"></origin-url>
+channels:
+&#32;&#32;- <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conda"></origin-url>
+default_channels:
+&#32;&#32;- <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conda"></origin-url></code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.conda.install"}}</label>
+				{{$channel := .PackageDescriptor.PackageProperties.GetByName "conda.channel"}}
+				<div class="markup"><pre class="code-block"><code>conda install{{if $channel}} -c {{$channel}}{{end}} {{.PackageDescriptor.PackageProperties.GetByName "conda.name"}}={{.PackageDescriptor.Version.Version}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Conda" "https://docs.gitea.com/usage/packages/conda/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Summary}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{else}}{{.PackageDescriptor.Metadata.Summary}}{{end}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/container.tmpl b/package/content/container.tmpl
new file mode 100644
index 0000000..a88ebec
--- /dev/null
+++ b/package/content/container.tmpl
@@ -0,0 +1,93 @@
+{{if eq .PackageDescriptor.Package.Type "container"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.container.pull"}}</label>
+				{{if eq .PackageDescriptor.Metadata.Type "helm"}}
+				<div class="markup"><pre class="code-block"><code>helm pull oci://{{.PackageRegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}} --version {{.PackageDescriptor.Version.LowerVersion}}</code></pre></div>
+				{{else}}
+					{{$separator := ":"}}
+					{{if not .PackageDescriptor.Metadata.IsTagged}}
+						{{$separator = "@"}}
+					{{end}}
+					<div class="markup"><pre class="code-block"><code>docker pull {{.PackageRegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}}{{$separator}}{{.PackageDescriptor.Version.LowerVersion}}</code></pre></div>
+				{{end}}
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.container.digest"}}</label>
+				<div class="markup"><pre class="code-block"><code>{{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Container" "https://docs.gitea.com/usage/packages/container/"}}</label>
+			</div>
+		</div>
+	</div>
+	{{if .PackageDescriptor.Metadata.Manifests}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.container.images"}}</h4>
+		<div class="ui attached segment">
+			<table class="ui very basic compact table">
+				<thead>
+					<tr>
+						<th>{{ctx.Locale.Tr "packages.container.digest"}}</th>
+						<th>{{ctx.Locale.Tr "packages.container.multi_arch"}}</th>
+						<th>{{ctx.Locale.Tr "admin.packages.size"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .PackageDescriptor.Metadata.Manifests}}
+						{{/* "unknown/unknown" is attestation-manifest, so we should skip it */}}
+						{{if ne .Platform "unknown/unknown"}}
+						<tr>
+							<td><a class="tw-font-mono" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .Digest}}">{{StringUtils.TrimPrefix .Digest "sha256:" | ShortSha}}</a></td>
+							<td>{{.Platform}}</td>
+							<td>{{FileSize .Size}}</td>
+						</tr>
+						{{end}}
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	{{end}}
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{.PackageDescriptor.Metadata.Description}}
+		</div>
+	{{end}}
+	{{if .PackageDescriptor.Metadata.ImageLayers}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.container.layers"}}</h4>
+		<div class="ui attached segment tw-break-anywhere">
+			<table class="ui very basic compact table">
+				<tbody>
+					{{range .PackageDescriptor.Metadata.ImageLayers}}
+						<tr>
+							<td>{{.}}</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	{{end}}
+	{{if .PackageDescriptor.Metadata.Labels}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.container.labels"}}</h4>
+		<div class="ui attached segment">
+			<table class="ui very basic compact table">
+				<thead>
+					<tr>
+						<th>{{ctx.Locale.Tr "packages.container.labels.key"}}</th>
+						<th>{{ctx.Locale.Tr "packages.container.labels.value"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range $key, $value := .PackageDescriptor.Metadata.Labels}}
+						<tr>
+							<td class="top aligned">{{$key}}</td>
+							<td class="tw-break-anywhere">{{$value}}</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/cran.tmpl b/package/content/cran.tmpl
new file mode 100644
index 0000000..ae58e6f
--- /dev/null
+++ b/package/content/cran.tmpl
@@ -0,0 +1,59 @@
+{{if eq .PackageDescriptor.Package.Type "cran"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.cran.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>options("repos" = c(getOption("repos"), c(gitea="<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cran"></origin-url>")))</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.cran.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>install.packages("{{.PackageDescriptor.Package.Name}}")</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "CRAN" "https://docs.gitea.com/usage/packages/cran/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Title}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Title}}{{else}}{{end}}
+		</div>
+	{{end}}
+
+	{{if or .PackageDescriptor.Metadata.Imports .PackageDescriptor.Metadata.Depends .PackageDescriptor.Metadata.LinkingTo .PackageDescriptor.Metadata.Suggests}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<table class="ui single line very basic table">
+				<tbody>
+					{{if .PackageDescriptor.Metadata.Imports}}
+						<tr>
+							<td>Imports</td>
+							<td>{{StringUtils.Join .PackageDescriptor.Metadata.Imports ", "}}</td>
+						</tr>
+					{{end}}
+					{{if .PackageDescriptor.Metadata.Depends}}
+						<tr>
+							<td>Depends</td>
+							<td>{{StringUtils.Join .PackageDescriptor.Metadata.Depends ", "}}</td>
+						</tr>
+					{{end}}
+					{{if .PackageDescriptor.Metadata.LinkingTo}}
+						<tr>
+							<td>LinkingTo</td>
+							<td>{{StringUtils.Join .PackageDescriptor.Metadata.LinkingTo ", "}}</td>
+						</tr>
+					{{end}}
+					{{if .PackageDescriptor.Metadata.Suggests}}
+						<tr>
+							<td>Suggests</td>
+							<td>{{StringUtils.Join .PackageDescriptor.Metadata.Suggests ", "}}</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/debian.tmpl b/package/content/debian.tmpl
new file mode 100644
index 0000000..73b8257
--- /dev/null
+++ b/package/content/debian.tmpl
@@ -0,0 +1,65 @@
+{{if eq .PackageDescriptor.Package.Type "debian"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.debian.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>sudo curl <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian/repository.key"></origin-url> -o /etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc
+echo "deb [signed-by=/etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc] <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian"></origin-url> $distribution $component" | sudo tee -a /etc/apt/sources.list.d/gitea.list
+sudo apt update</code></pre></div>
+				<p>{{ctx.Locale.Tr "packages.debian.registry.info"}}</p>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.debian.install"}}</label>
+				<div class="markup">
+					<pre class="code-block"><code>sudo apt install {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}</code></pre>
+				</div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Debian" "https://docs.gitea.com/usage/packages/debian/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.debian.repository"}}</h4>
+	<div class="ui attached segment">
+		<table class="ui single line very basic table">
+			<tbody>
+				<tr>
+					<td class="collapsing"><h5>{{ctx.Locale.Tr "packages.debian.repository.distributions"}}</h5></td>
+					<td>{{StringUtils.Join .Distributions ", "}}</td>
+				</tr>
+				<tr>
+					<td class="collapsing"><h5>{{ctx.Locale.Tr "packages.debian.repository.components"}}</h5></td>
+					<td>{{StringUtils.Join .Components ", "}}</td>
+				</tr>
+				<tr>
+					<td class="collapsing"><h5>{{ctx.Locale.Tr "packages.debian.repository.architectures"}}</h5></td>
+					<td>{{StringUtils.Join .Architectures ", "}}</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{.PackageDescriptor.Metadata.Description}}
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Dependencies}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<table class="ui single line very basic table">
+				<tbody>
+					{{range .PackageDescriptor.Metadata.Dependencies}}
+						<tr>
+							<td>{{.}}</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/generic.tmpl b/package/content/generic.tmpl
new file mode 100644
index 0000000..2fd9521
--- /dev/null
+++ b/package/content/generic.tmpl
@@ -0,0 +1,18 @@
+{{if eq .PackageDescriptor.Package.Type "generic"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.generic.download"}}</label>
+				<div class="markup"><pre class="code-block"><code>
+{{- range .PackageDescriptor.Files -}}
+curl -OJ <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/generic/{{$.PackageDescriptor.Package.Name}}/{{$.PackageDescriptor.Version.Version}}/{{.File.Name}}"></origin-url>
+{{end -}}
+				</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Generic" "https://docs.gitea.com/usage/packages/generic"}}</label>
+			</div>
+		</div>
+	</div>
+{{end}}
diff --git a/package/content/go.tmpl b/package/content/go.tmpl
new file mode 100644
index 0000000..80d1ab2
--- /dev/null
+++ b/package/content/go.tmpl
@@ -0,0 +1,14 @@
+{{if eq .PackageDescriptor.Package.Type "go"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.go.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>GOPROXY=<origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/go"></origin-url> go install {{$.PackageDescriptor.Package.Name}}@{{$.PackageDescriptor.Version.Version}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Go" "https://docs.gitea.com/usage/packages/go"}}</label>
+			</div>
+		</div>
+	</div>
+{{end}}
diff --git a/package/content/helm.tmpl b/package/content/helm.tmpl
new file mode 100644
index 0000000..da846e9
--- /dev/null
+++ b/package/content/helm.tmpl
@@ -0,0 +1,57 @@
+{{if eq .PackageDescriptor.Package.Type "helm"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.helm.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>helm repo add {{AppDomain}} <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/helm"></origin-url>
+helm repo update</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.helm.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>helm install {{.PackageDescriptor.Package.Name}} {{AppDomain}}/{{.PackageDescriptor.Package.Name}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Helm" "https://docs.gitea.com/usage/packages/helm/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{.PackageDescriptor.Metadata.Description}}
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Dependencies}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<table class="ui single line very basic table">
+				<thead>
+					<tr>
+						<th class="ten wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
+						<th class="six wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .PackageDescriptor.Metadata.Dependencies}}
+						<tr>
+							<td>{{.Name}}</td>
+							<td>{{.Version}}</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Keywords}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
+		<div class="ui attached segment">
+			{{range .PackageDescriptor.Metadata.Keywords}}
+				{{.}}
+			{{end}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/maven.tmpl b/package/content/maven.tmpl
new file mode 100644
index 0000000..e98fc53
--- /dev/null
+++ b/package/content/maven.tmpl
@@ -0,0 +1,75 @@
+{{if and (eq .PackageDescriptor.Package.Type "maven") (not .PackageDescriptor.Metadata)}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">{{ctx.Locale.Tr "packages.no_metadata"}}</div>
+{{end}}
+{{if and (eq .PackageDescriptor.Package.Type "maven") .PackageDescriptor.Metadata}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.maven.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>&lt;repositories&gt;
+	&lt;repository&gt;
+		&lt;id&gt;gitea&lt;/id&gt;
+		&lt;url&gt;<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url>&lt;/url&gt;
+	&lt;/repository&gt;
+&lt;/repositories&gt;
+
+&lt;distributionManagement&gt;
+	&lt;repository&gt;
+		&lt;id&gt;gitea&lt;/id&gt;
+		&lt;url&gt;<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url>&lt;/url&gt;
+	&lt;/repository&gt;
+
+	&lt;snapshotRepository&gt;
+		&lt;id&gt;gitea&lt;/id&gt;
+		&lt;url&gt;<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url>&lt;/url&gt;
+	&lt;/snapshotRepository&gt;
+&lt;/distributionManagement&gt;</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.maven.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>&lt;dependency&gt;
+	&lt;groupId&gt;{{.PackageDescriptor.Metadata.GroupID}}&lt;/groupId&gt;
+	&lt;artifactId&gt;{{.PackageDescriptor.Metadata.ArtifactID}}&lt;/artifactId&gt;
+	&lt;version&gt;{{.PackageDescriptor.Version.Version}}&lt;/version&gt;
+&lt;/dependency&gt;</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.maven.install2"}}</label>
+				<div class="markup"><pre class="code-block"><code>mvn install</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.maven.download"}}</label>
+				<div class="markup"><pre class="code-block"><code>mvn dependency:get -DremoteRepositories=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url> -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Maven" "https://docs.gitea.com/usage/packages/maven/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{.PackageDescriptor.Metadata.Description}}
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Dependencies}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<div class="ui list">
+				{{range .PackageDescriptor.Metadata.Dependencies}}
+					<div class="item">
+						<i class="icon">{{svg "octicon-package-dependencies" 16 ""}}</i>
+						<div class="content">
+							<div class="header">{{.GroupID}}:{{.ArtifactID}}</div>
+							<div class="description text small">{{.Version}}</div>
+						</div>
+					</div>
+				{{end}}
+			</div>
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/npm.tmpl b/package/content/npm.tmpl
new file mode 100644
index 0000000..bb02434
--- /dev/null
+++ b/package/content/npm.tmpl
@@ -0,0 +1,65 @@
+{{if eq .PackageDescriptor.Package.Type "npm"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.npm.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>{{if .PackageDescriptor.Metadata.Scope}}{{.PackageDescriptor.Metadata.Scope}}:{{end}}registry=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/npm/"></origin-url></code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.npm.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>npm install {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.npm.install2"}}</label>
+				<div class="markup"><pre class="code-block"><code>&quot;{{.PackageDescriptor.Package.Name}}&quot;: &quot;{{.PackageDescriptor.Version.Version}}&quot;</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "npm" "https://docs.gitea.com/usage/packages/npm/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{if .PackageDescriptor.Metadata.Readme}}
+			<div class="markup markdown">
+				{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.Readme}}
+			</div>
+			{{else if .PackageDescriptor.Metadata.Description}}
+				{{.PackageDescriptor.Metadata.Description}}
+			{{end}}
+		</div>
+	{{end}}
+
+	{{if or .PackageDescriptor.Metadata.Dependencies .PackageDescriptor.Metadata.DevelopmentDependencies .PackageDescriptor.Metadata.PeerDependencies .PackageDescriptor.Metadata.OptionalDependencies}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<div class="ui list">
+				{{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Dependencies "title" (ctx.Locale.Tr "packages.npm.dependencies")}}
+				{{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.development")}}
+				{{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.PeerDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.peer")}}
+				{{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.OptionalDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.optional")}}
+			</div>
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.BundleDependencies}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.npm.dependencies.bundle"}}</h4>
+		<div class="ui attached segment">
+			{{range .PackageDescriptor.Metadata.BundleDependencies}}
+				{{.}}
+			{{end}}
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Keywords}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
+		<div class="ui attached segment">
+			{{range .PackageDescriptor.Metadata.Keywords}}
+				{{.}}
+			{{end}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/npm_dependencies.tmpl b/package/content/npm_dependencies.tmpl
new file mode 100644
index 0000000..dba4575
--- /dev/null
+++ b/package/content/npm_dependencies.tmpl
@@ -0,0 +1,19 @@
+{{if .dependencies}}
+<p><strong>{{.title}}</strong></p>
+<table class="ui single line very basic table">
+	<thead>
+		<tr>
+			<th class="eleven wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
+			<th class="five wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
+		</tr>
+	</thead>
+	<tbody>
+		{{range $dependency, $version := .dependencies}}
+		<tr>
+			<td>{{$dependency}}</td>
+			<td>{{$version}}</td>
+		</tr>
+		{{end}}
+	</tbody>
+</table>
+{{end}}
diff --git a/package/content/nuget.tmpl b/package/content/nuget.tmpl
new file mode 100644
index 0000000..5bb98a8
--- /dev/null
+++ b/package/content/nuget.tmpl
@@ -0,0 +1,51 @@
+{{if eq .PackageDescriptor.Package.Type "nuget"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.nuget.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json"></origin-url></code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.nuget.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "NuGet" "https://docs.gitea.com/usage/packages/nuget/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes .PackageDescriptor.Metadata.Readme}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.Description}}</div>{{end}}
+		{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment markup markdown">{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.Readme}}</div>{{end}}
+		{{if .PackageDescriptor.Metadata.ReleaseNotes}}<div class="ui attached segment">{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.ReleaseNotes}}</div>{{end}}
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Dependencies}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<table class="ui single line very basic table">
+				<thead>
+					<tr>
+						<th class="ten wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
+						<th class="three wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
+						<th class="three wide">{{ctx.Locale.Tr "packages.nuget.dependency.framework"}}</th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range $framework, $dependencies := .PackageDescriptor.Metadata.Dependencies}}
+						{{range $dependencies}}
+						<tr>
+							<td>{{.ID}}</td>
+							<td>{{.Version}}</td>
+							<td>{{$framework}}</td>
+						</tr>
+						{{end}}
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/pub.tmpl b/package/content/pub.tmpl
new file mode 100644
index 0000000..2f63cde
--- /dev/null
+++ b/package/content/pub.tmpl
@@ -0,0 +1,19 @@
+{{if eq .PackageDescriptor.Package.Type "pub"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.pub.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pub/"></origin-url></code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Pub" "https://docs.gitea.com/usage/packages/pub/"}}</label>
+			</div>
+		</div>
+	</div>
+	{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
+		{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment">{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.Readme}}</div>{{end}}
+	{{end}}
+{{end}}
diff --git a/package/content/pypi.tmpl b/package/content/pypi.tmpl
new file mode 100644
index 0000000..2a22a6e
--- /dev/null
+++ b/package/content/pypi.tmpl
@@ -0,0 +1,31 @@
+{{if eq .PackageDescriptor.Package.Type "pypi"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.pypi.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>pip install --index-url <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple/"></origin-url> {{.PackageDescriptor.Package.Name}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "PyPI" "https://docs.gitea.com/usage/packages/pypi/"}}</label>
+			</div>
+		</div>
+	</div>
+	{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription .PackageDescriptor.Metadata.Summary}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			<p>{{if .PackageDescriptor.Metadata.Summary}}{{.PackageDescriptor.Metadata.Summary}}{{end}}</p>
+			{{if .PackageDescriptor.Metadata.LongDescription}}
+				{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.LongDescription}}
+			{{else if .PackageDescriptor.Metadata.Description}}
+				{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.Description}}
+			{{end}}
+		</div>
+	{{end}}
+	{{if .PackageDescriptor.Metadata.RequiresPython}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.requirements"}}</h4>
+		<div class="ui attached segment">
+			{{ctx.Locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/rpm.tmpl b/package/content/rpm.tmpl
new file mode 100644
index 0000000..3faa8a0
--- /dev/null
+++ b/package/content/rpm.tmpl
@@ -0,0 +1,56 @@
+{{if eq .PackageDescriptor.Package.Type "rpm"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.rpm.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>{{- if gt (len .Groups) 1 -}}
+# {{ctx.Locale.Tr "packages.rpm.repository.multiple_groups"}}
+
+{{end -}}
+# {{ctx.Locale.Tr "packages.rpm.distros.redhat"}}
+{{- range $group := .Groups}}
+	{{- if $group}}{{$group = print "/" $group}}{{end}}
+dnf config-manager --add-repo <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo"></origin-url>
+{{- end}}
+
+# {{ctx.Locale.Tr "packages.rpm.distros.suse"}}
+{{- range $group := .Groups}}
+	{{- if $group}}{{$group = print "/" $group}}{{end}}
+zypper addrepo <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo"></origin-url>
+{{- end}}</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.rpm.install"}}</label>
+				<div class="markup">
+					<pre class="code-block"><code># {{ctx.Locale.Tr "packages.rpm.distros.redhat"}}
+dnf install {{$.PackageDescriptor.Package.Name}}
+
+# {{ctx.Locale.Tr "packages.rpm.distros.suse"}}
+zypper install {{$.PackageDescriptor.Package.Name}}</code></pre>
+				</div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "RPM" "https://docs.gitea.com/usage/packages/rpm/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.rpm.repository"}}</h4>
+	<div class="ui attached segment">
+		<table class="ui single line very basic table">
+			<tbody>
+				<tr>
+					<td class="collapsing"><h5>{{ctx.Locale.Tr "packages.rpm.repository.architectures"}}</h5></td>
+					<td>{{StringUtils.Join .Architectures ", "}}</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+
+	{{if or .PackageDescriptor.Metadata.Summary .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		{{if .PackageDescriptor.Metadata.Summary}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Summary}}</div>{{end}}
+		{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
+	{{end}}
+{{end}}
diff --git a/package/content/rubygems.tmpl b/package/content/rubygems.tmpl
new file mode 100644
index 0000000..610dfc7
--- /dev/null
+++ b/package/content/rubygems.tmpl
@@ -0,0 +1,40 @@
+{{if eq .PackageDescriptor.Package.Type "rubygems"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.rubygems.install"}}:</label>
+				<div class="markup"><pre class="code-block"><code>gem install {{.PackageDescriptor.Package.Name}} --version &quot;{{.PackageDescriptor.Version.Version}}&quot; --source &quot;<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems"></origin-url>&quot;</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.rubygems.install2"}}:</label>
+				<div class="markup"><pre class="code-block"><code>source "<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems"></origin-url>" do
+	gem "{{.PackageDescriptor.Package.Name}}", "{{.PackageDescriptor.Version.Version}}"
+end</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "RubyGems" "https://docs.gitea.com/usage/packages/rubygems/"}}</label>
+			</div>
+		</div>
+	</div>
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>
+	{{end}}
+	{{if or .PackageDescriptor.Metadata.RequiredRubyVersion .PackageDescriptor.Metadata.RequiredRubygemsVersion}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.requirements"}}</h4>
+		<div class="ui attached segment">
+			{{if .PackageDescriptor.Metadata.RequiredRubyVersion}}<p>{{ctx.Locale.Tr "packages.rubygems.required.ruby"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubyVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}}
+			{{if .PackageDescriptor.Metadata.RequiredRubygemsVersion}}<p>{{ctx.Locale.Tr "packages.rubygems.required.rubygems"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubygemsVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}}
+		</div>
+	{{end}}
+	{{if or .PackageDescriptor.Metadata.RuntimeDependencies .PackageDescriptor.Metadata.DevelopmentDependencies}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
+		<div class="ui attached segment">
+			<div class="ui list">
+				{{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RuntimeDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.runtime")}}
+				{{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.development")}}
+			</div>
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/rubygems_dependencies.tmpl b/package/content/rubygems_dependencies.tmpl
new file mode 100644
index 0000000..2c42dce
--- /dev/null
+++ b/package/content/rubygems_dependencies.tmpl
@@ -0,0 +1,19 @@
+{{if .dependencies}}
+<p><strong>{{.title}}</strong></p>
+<table class="ui single line very basic table">
+	<thead>
+		<tr>
+			<th class="eleven wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
+			<th class="five wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
+		</tr>
+	</thead>
+	<tbody>
+		{{range .dependencies}}
+		<tr>
+			<td>{{.Name}}</td>
+			<td>{{range $i, $v := .Version}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</td>
+		</tr>
+		{{end}}
+	</tbody>
+</table>
+{{end}}
diff --git a/package/content/swift.tmpl b/package/content/swift.tmpl
new file mode 100644
index 0000000..aacbc83
--- /dev/null
+++ b/package/content/swift.tmpl
@@ -0,0 +1,40 @@
+{{if eq .PackageDescriptor.Package.Type "swift"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.swift.registry"}}</label>
+				<div class="markup"><pre class="code-block"><code>swift package-registry set <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/swift"></origin-url></code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.swift.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>dependencies: [
+	.package(id: "{{.PackageDescriptor.Package.Name}}", from:"{{.PackageDescriptor.Version.Version}}")
+]</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.swift.install2"}}</label>
+				<div class="markup"><pre class="code-block"><code>swift package resolve</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Swift" "https://docs.gitea.com/usage/packages/swift/"}}</label>
+			</div>
+		</div>
+	</div>
+
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">
+			{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
+		</div>
+	{{end}}
+
+	{{if .PackageDescriptor.Metadata.Keywords}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
+		<div class="ui attached segment">
+			{{range .PackageDescriptor.Metadata.Keywords}}
+				{{.}}
+			{{end}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/package/content/vagrant.tmpl b/package/content/vagrant.tmpl
new file mode 100644
index 0000000..7666284
--- /dev/null
+++ b/package/content/vagrant.tmpl
@@ -0,0 +1,18 @@
+{{if eq .PackageDescriptor.Package.Type "vagrant"}}
+	<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
+	<div class="ui attached segment">
+		<div class="ui form">
+			<div class="field">
+				<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.vagrant.install"}}</label>
+				<div class="markup"><pre class="code-block"><code>vagrant box add --box-version {{.PackageDescriptor.Version.Version}} "<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/vagrant/{{.PackageDescriptor.Package.Name}}"></origin-url>"</code></pre></div>
+			</div>
+			<div class="field">
+				<label>{{ctx.Locale.Tr "packages.registry.documentation" "Vagrant" "https://docs.gitea.com/usage/packages/vagrant/"}}</label>
+			</div>
+		</div>
+	</div>
+	{{if .PackageDescriptor.Metadata.Description}}
+		<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
+		<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>
+	{{end}}
+{{end}}
diff --git a/package/metadata/alpine.tmpl b/package/metadata/alpine.tmpl
new file mode 100644
index 0000000..c917494
--- /dev/null
+++ b/package/metadata/alpine.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "alpine"}}
+	{{if .PackageDescriptor.Metadata.Maintainer}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.PackageDescriptor.Metadata.Maintainer}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+{{end}}
diff --git a/package/metadata/arch.tmpl b/package/metadata/arch.tmpl
new file mode 100644
index 0000000..62308e4
--- /dev/null
+++ b/package/metadata/arch.tmpl
@@ -0,0 +1,4 @@
+{{if eq .PackageDescriptor.Package.Type "arch"}}
+	{{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/cargo.tmpl b/package/metadata/cargo.tmpl
new file mode 100644
index 0000000..f7dd887
--- /dev/null
+++ b/package/metadata/cargo.tmpl
@@ -0,0 +1,7 @@
+{{if eq .PackageDescriptor.Package.Type "cargo"}}
+	{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+{{end}}
diff --git a/package/metadata/chef.tmpl b/package/metadata/chef.tmpl
new file mode 100644
index 0000000..6bf606c
--- /dev/null
+++ b/package/metadata/chef.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "chef"}}
+	{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+{{end}}
diff --git a/package/metadata/composer.tmpl b/package/metadata/composer.tmpl
new file mode 100644
index 0000000..e69e917
--- /dev/null
+++ b/package/metadata/composer.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "composer"}}
+	{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.Name}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.Homepage}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.Homepage}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{range .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.}}</div>{{end}}
+{{end}}
diff --git a/package/metadata/conan.tmpl b/package/metadata/conan.tmpl
new file mode 100644
index 0000000..8b15375
--- /dev/null
+++ b/package/metadata/conan.tmpl
@@ -0,0 +1,6 @@
+{{if eq .PackageDescriptor.Package.Type "conan"}}
+	{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/conda.tmpl b/package/metadata/conda.tmpl
new file mode 100644
index 0000000..4add945
--- /dev/null
+++ b/package/metadata/conda.tmpl
@@ -0,0 +1,6 @@
+{{if eq .PackageDescriptor.Package.Type "conda"}}
+	{{if .PackageDescriptor.Metadata.License}}<div class="item">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/container.tmpl b/package/metadata/container.tmpl
new file mode 100644
index 0000000..ecc1796
--- /dev/null
+++ b/package/metadata/container.tmpl
@@ -0,0 +1,9 @@
+{{if eq .PackageDescriptor.Package.Type "container"}}
+	<div class="item" title="{{ctx.Locale.Tr "packages.container.details.type"}}">{{svg "octicon-package"}} {{.PackageDescriptor.Metadata.Type.Name}}</div>
+	{{if .PackageDescriptor.Metadata.Platform}}<div class="item" title="{{ctx.Locale.Tr "packages.container.details.platform"}}">{{svg "octicon-cpu"}} {{.PackageDescriptor.Metadata.Platform}}</div>{{end}}
+	{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.Licenses}}<div class="item">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.Licenses}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/cran.tmpl b/package/metadata/cran.tmpl
new file mode 100644
index 0000000..3ada7ac
--- /dev/null
+++ b/package/metadata/cran.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "cran"}}
+	{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+	{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.}}</div>{{end}}
+	{{range .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/debian.tmpl b/package/metadata/debian.tmpl
new file mode 100644
index 0000000..d35e8b0
--- /dev/null
+++ b/package/metadata/debian.tmpl
@@ -0,0 +1,4 @@
+{{if eq .PackageDescriptor.Package.Type "debian"}}
+	{{if .PackageDescriptor.Metadata.Maintainer}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.PackageDescriptor.Metadata.Maintainer}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/generic.tmpl b/package/metadata/generic.tmpl
new file mode 100644
index 0000000..e69de29
diff --git a/package/metadata/helm.tmpl b/package/metadata/helm.tmpl
new file mode 100644
index 0000000..b3b3f34
--- /dev/null
+++ b/package/metadata/helm.tmpl
@@ -0,0 +1,4 @@
+{{if eq .PackageDescriptor.Package.Type "helm"}}
+	{{range .PackageDescriptor.Metadata.Maintainers}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.Name}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.Home}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.Home}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/maven.tmpl b/package/metadata/maven.tmpl
new file mode 100644
index 0000000..33662be
--- /dev/null
+++ b/package/metadata/maven.tmpl
@@ -0,0 +1,8 @@
+{{if and (eq .PackageDescriptor.Package.Type "maven") (not .PackageDescriptor.Metadata)}}
+	<div class="item">{{svg "octicon-note"}} {{ctx.Locale.Tr "packages.no_metadata"}}</div>
+{{end}}
+{{if and (eq .PackageDescriptor.Package.Type "maven") .PackageDescriptor.Metadata}}
+	{{if .PackageDescriptor.Metadata.Name}}<div class="item">{{svg "octicon-note"}} {{.PackageDescriptor.Metadata.Name}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.}}</div>{{end}}
+{{end}}
diff --git a/package/metadata/npm.tmpl b/package/metadata/npm.tmpl
new file mode 100644
index 0000000..ff245f2
--- /dev/null
+++ b/package/metadata/npm.tmpl
@@ -0,0 +1,8 @@
+{{if eq .PackageDescriptor.Package.Type "npm"}}
+	{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+	{{range .PackageDescriptor.VersionProperties}}
+		{{if eq .Name "npm.tag"}}<div class="item" title="{{ctx.Locale.Tr "packages.npm.details.tag"}}">{{svg "octicon-versions"}} {{.Value}}</div>{{end}}
+	{{end}}
+{{end}}
diff --git a/package/metadata/nuget.tmpl b/package/metadata/nuget.tmpl
new file mode 100644
index 0000000..2d18528
--- /dev/null
+++ b/package/metadata/nuget.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "nuget"}}
+	{{if .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.PackageDescriptor.Metadata.Authors}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/pub.tmpl b/package/metadata/pub.tmpl
new file mode 100644
index 0000000..e54207c
--- /dev/null
+++ b/package/metadata/pub.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "pub"}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/pypi.tmpl b/package/metadata/pypi.tmpl
new file mode 100644
index 0000000..9dfac07
--- /dev/null
+++ b/package/metadata/pypi.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "pypi"}}
+	{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+{{end}}
diff --git a/package/metadata/rpm.tmpl b/package/metadata/rpm.tmpl
new file mode 100644
index 0000000..6509393
--- /dev/null
+++ b/package/metadata/rpm.tmpl
@@ -0,0 +1,4 @@
+{{if eq .PackageDescriptor.Package.Type "rpm"}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+{{end}}
diff --git a/package/metadata/rubygems.tmpl b/package/metadata/rubygems.tmpl
new file mode 100644
index 0000000..04fc369
--- /dev/null
+++ b/package/metadata/rubygems.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "rubygems"}}
+	{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>	{{end}}
+	{{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law"}} {{.}}</div>{{end}}
+{{end}}
diff --git a/package/metadata/swift.tmpl b/package/metadata/swift.tmpl
new file mode 100644
index 0000000..fe28759
--- /dev/null
+++ b/package/metadata/swift.tmpl
@@ -0,0 +1,4 @@
+{{if eq .PackageDescriptor.Package.Type "swift"}}
+	{{if .PackageDescriptor.Metadata.Author.String}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/metadata/vagrant.tmpl b/package/metadata/vagrant.tmpl
new file mode 100644
index 0000000..795ab33
--- /dev/null
+++ b/package/metadata/vagrant.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "vagrant"}}
+	{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+	{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+	{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
+{{end}}
diff --git a/package/settings.tmpl b/package/settings.tmpl
new file mode 100644
index 0000000..4b87734
--- /dev/null
+++ b/package/settings.tmpl
@@ -0,0 +1,77 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository settings options{{if .ContextUser.IsOrganization}} organization{{end}}">
+	{{if .ContextUser.IsOrganization}}
+		{{template "org/header" .}}
+	{{else}}
+		{{template "shared/user/org_profile_avatar" .}}
+	{{end}}
+	<div class="ui container">
+		{{if not .ContextUser.IsOrganization}}
+			{{template "user/overview/header" .}}
+		{{end}}
+		{{template "base/alert" .}}
+		<p><a href="{{.PackageDescriptor.VersionWebLink}}">{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</a> / <strong>{{ctx.Locale.Tr "repo.settings"}}</strong></p>
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "packages.settings.link"}}
+		</h4>
+		<div class="ui attached segment">
+			<p>{{ctx.Locale.Tr "packages.settings.link.description"}}</p>
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="link">
+				<div class="field">
+					<div class="ui clearable selection dropdown">
+						{{$repoID := 0}}
+						{{if .PackageDescriptor.Repository}}
+							{{$repoID = .PackageDescriptor.Repository.ID}}
+						{{end}}
+						<input type="hidden" name="repo_id" value="{{$repoID}}">
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="default text">{{ctx.Locale.Tr "packages.settings.link.select"}}</div>
+						<div class="menu">
+							{{range .Repos}}
+								<div class="item" data-value="{{.ID}}">{{.Name}}</div>
+							{{end}}
+						</div>
+					</div>
+				</div>
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "packages.settings.link.button"}}</button>
+				</div>
+			</form>
+		</div>
+		<h4 class="ui top attached error header">
+			{{ctx.Locale.Tr "repo.settings.danger_zone"}}
+		</h4>
+		<div class="ui attached error danger segment">
+			<div class="flex-list">
+				<div class="flex-item">
+					<div class="flex-item-main">
+						<div class="flex-item-title">{{ctx.Locale.Tr "packages.settings.delete"}}</div>
+						<div class="flex-item-body">{{ctx.Locale.Tr "packages.settings.delete.description"}}</div>
+					</div>
+					<div class="flex-item-trailing">
+						<button class="ui basic red show-modal button" data-modal="#delete-package-modal">{{ctx.Locale.Tr "packages.settings.delete"}}</button>
+					</div>
+					<div class="ui tiny modal" id="delete-package-modal">
+						<div class="header">
+							{{ctx.Locale.Tr "packages.settings.delete"}}
+						</div>
+						<div class="content">
+							<div class="ui warning message tw-break-anywhere">
+								{{ctx.Locale.Tr "packages.settings.delete.notice" .PackageDescriptor.Package.Name .PackageDescriptor.Version.Version}}
+							</div>
+							<form class="ui form" action="{{.Link}}" method="post">
+								{{.CsrfTokenHtml}}
+								<input type="hidden" name="action" value="delete">
+								{{template "base/modal_actions_confirm" .}}
+							</form>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/package/shared/cargo.tmpl b/package/shared/cargo.tmpl
new file mode 100644
index 0000000..7652231
--- /dev/null
+++ b/package/shared/cargo.tmpl
@@ -0,0 +1,24 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "packages.owner.settings.cargo.title"}}
+</h4>
+<div class="ui attached segment">
+	<div class="ui form">
+		<div class="field">
+			<label>{{ctx.Locale.Tr "packages.owner.settings.cargo.initialize.description"}}</label>
+		</div>
+		<form class="field" action="{{.Link}}/cargo/initialize" method="post">
+			{{.CsrfTokenHtml}}
+			<button class="ui primary button">{{ctx.Locale.Tr "packages.owner.settings.cargo.initialize"}}</button>
+		</form>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "packages.owner.settings.cargo.rebuild.description"}}</label>
+		</div>
+		<form class="field" action="{{.Link}}/cargo/rebuild" method="post">
+			{{.CsrfTokenHtml}}
+			<button class="ui primary button">{{ctx.Locale.Tr "packages.owner.settings.cargo.rebuild"}}</button>
+		</form>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "packages.registry.documentation" "Cargo" "https://docs.gitea.com/usage/packages/cargo/"}}</label>
+		</div>
+	</div>
+</div>
diff --git a/package/shared/cleanup_rules/edit.tmpl b/package/shared/cleanup_rules/edit.tmpl
new file mode 100644
index 0000000..138a907
--- /dev/null
+++ b/package/shared/cleanup_rules/edit.tmpl
@@ -0,0 +1,73 @@
+<h4 class="ui top attached header">{{if .IsEditRule}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.edit"}}{{else}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.add"}}{{end}}</h4>
+<div class="ui attached segment">
+	<form class="ui form" action="{{.Link}}" method="post">
+		{{.CsrfTokenHtml}}
+		<input name="id" type="hidden" value="{{.CleanupRule.ID}}">
+		<div class="field">
+			<div class="ui checkbox">
+				<label>{{ctx.Locale.Tr "enabled"}}</label>
+				<input type="checkbox" name="enabled" {{if .CleanupRule.Enabled}}checked{{end}}>
+			</div>
+		</div>
+		<div class="{{if .IsEditRule}}disabled {{end}}field {{if .Err_Type}}error{{end}}">
+			<label>{{ctx.Locale.Tr "packages.filter.type"}}</label>
+			<select class="ui selection dropdown" name="type">
+				{{range $type := .AvailableTypes}}
+				<option{{if eq $.CleanupRule.Type $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option>
+				{{end}}
+			</select>
+		</div>
+		<div class="field">
+			<div class="ui checkbox">
+				<label>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.pattern_full_match"}}</label>
+				<input type="checkbox" name="match_full_name" {{if .CleanupRule.MatchFullName}}checked{{end}}>
+			</div>
+		</div>
+		<div class="divider"></div>
+		<p>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.title"}}</p>
+		<div class="field {{if .Err_KeepCount}}error{{end}}">
+			<label>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:</label>
+			<select class="ui selection dropdown" name="keep_count">
+				<option{{if eq .CleanupRule.KeepCount 0}} selected="selected"{{end}} value="0"></option>
+				<option{{if eq .CleanupRule.KeepCount 1}} selected="selected"{{end}} value="1">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}</option>
+				<option{{if eq .CleanupRule.KeepCount 5}} selected="selected"{{end}} value="5">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 5}}</option>
+				<option{{if eq .CleanupRule.KeepCount 10}} selected="selected"{{end}} value="10">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 10}}</option>
+				<option{{if eq .CleanupRule.KeepCount 25}} selected="selected"{{end}} value="25">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 25}}</option>
+				<option{{if eq .CleanupRule.KeepCount 50}} selected="selected"{{end}} value="50">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 50}}</option>
+				<option{{if eq .CleanupRule.KeepCount 100}} selected="selected"{{end}} value="100">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 100}}</option>
+			</select>
+		</div>
+		<div class="field {{if .Err_KeepPattern}}error{{end}}">
+			<label>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:</label>
+			<input name="keep_pattern" type="text" value="{{.CleanupRule.KeepPattern}}">
+			<p>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.pattern.container"}}</p>
+		</div>
+		<div class="divider"></div>
+		<p>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.title"}}</p>
+		<div class="field {{if .Err_RemoveDays}}error{{end}}">
+			<label>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:</label>
+			<select class="ui selection dropdown" name="remove_days">
+				<option{{if eq .CleanupRule.RemoveDays 0}} selected="selected"{{end}} value="0"></option>
+				<option{{if eq .CleanupRule.RemoveDays 7}} selected="selected"{{end}} value="7">{{ctx.Locale.Tr "tool.days" 7}}</option>
+				<option{{if eq .CleanupRule.RemoveDays 14}} selected="selected"{{end}} value="14">{{ctx.Locale.Tr "tool.days" 14}}</option>
+				<option{{if eq .CleanupRule.RemoveDays 30}} selected="selected"{{end}} value="30">{{ctx.Locale.Tr "tool.days" 30}}</option>
+				<option{{if eq .CleanupRule.RemoveDays 60}} selected="selected"{{end}} value="60">{{ctx.Locale.Tr "tool.days" 60}}</option>
+				<option{{if eq .CleanupRule.RemoveDays 90}} selected="selected"{{end}} value="90">{{ctx.Locale.Tr "tool.days" 90}}</option>
+				<option{{if eq .CleanupRule.RemoveDays 180}} selected="selected"{{end}} value="180">{{ctx.Locale.Tr "tool.days" 180}}</option>
+			</select>
+		</div>
+		<div class="field {{if .Err_RemovePattern}}error{{end}}">
+			<label>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:</label>
+			<input name="remove_pattern" type="text" value="{{.CleanupRule.RemovePattern}}">
+		</div>
+		<div class="field">
+			{{if .IsEditRule}}
+			<button class="ui primary button" name="action" value="save">{{ctx.Locale.Tr "save"}}</button>
+			<button class="ui red button" name="action" value="remove">{{ctx.Locale.Tr "remove"}}</button>
+			<a class="ui button" href="{{.Link}}/preview">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview"}}</a>
+			{{else}}
+			<button class="ui primary button" name="action" value="save">{{ctx.Locale.Tr "add"}}</button>
+			{{end}}
+		</div>
+	</form>
+</div>
diff --git a/package/shared/cleanup_rules/list.tmpl b/package/shared/cleanup_rules/list.tmpl
new file mode 100644
index 0000000..6505c8f
--- /dev/null
+++ b/package/shared/cleanup_rules/list.tmpl
@@ -0,0 +1,56 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.title"}}
+	<div class="ui right">
+		<a class="ui primary tiny button" href="{{.Link}}/rules/add">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.add"}}</a>
+	</div>
+</h4>
+<div class="ui attached segment">
+	<div class="flex-list">
+		{{range .CleanupRules}}
+			<div class="flex-item">
+				<div class="flex-item-leading">
+					{{svg .Type.SVGName 32}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-title">
+						<a class="item" href="{{$.Link}}/rules/{{.ID}}">{{.Type.Name}}</a>
+					</div>
+					<div class="flex-item-body">
+						<i>{{if .Enabled}}{{ctx.Locale.Tr "enabled"}}{{else}}{{ctx.Locale.Tr "disabled"}}{{end}}</i>
+					</div>
+					{{if .KeepCount}}
+					<div class="flex-item-body">
+						<i>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:</i> {{if eq .KeepCount 1}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}}
+					</div>
+					{{end}}
+					{{if .KeepPattern}}
+					<div class="flex-item-body">
+						<i>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:</i> {{StringUtils.EllipsisString .KeepPattern 100}}
+					</div>
+					{{end}}
+					{{if .RemoveDays}}
+					<div class="flex-item-body">
+						<i>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:</i> {{ctx.Locale.Tr "tool.days" .RemoveDays}}
+					</div>
+					{{end}}
+					{{if .RemovePattern}}
+					<div class="flex-item-body">
+						<i>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:</i> {{StringUtils.EllipsisString .RemovePattern 100}}
+					</div>
+					{{end}}
+				</div>
+				<div class="flex-item-trailing">
+					<div class="ui dropdown tiny basic button">
+						{{svg "octicon-kebab-horizontal"}}
+						<div class="menu">
+							<a class="item" href="{{$.Link}}/rules/{{.ID}}">{{ctx.Locale.Tr "edit"}}</a>
+							<a class="item" href="{{$.Link}}/rules/{{.ID}}/preview">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview"}}</a>
+						</div>
+					</div>
+				</div>
+			</div>
+		{{else}}
+			<div class="item">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.none"}}</div>
+		{{end}}
+	</div>
+</div>
diff --git a/package/shared/cleanup_rules/preview.tmpl b/package/shared/cleanup_rules/preview.tmpl
new file mode 100644
index 0000000..bb2354c
--- /dev/null
+++ b/package/shared/cleanup_rules/preview.tmpl
@@ -0,0 +1,34 @@
+<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview"}}</h4>
+<div class="ui attached segment">
+	<p>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview.overview" (len .VersionsToRemove)}}</p>
+</div>
+<div class="ui attached table segment">
+	<table class="ui very basic striped table unstackable">
+		<thead>
+			<tr>
+				<th>{{ctx.Locale.Tr "admin.packages.type"}}</th>
+				<th>{{ctx.Locale.Tr "admin.packages.name"}}</th>
+				<th>{{ctx.Locale.Tr "admin.packages.version"}}</th>
+				<th>{{ctx.Locale.Tr "admin.packages.creator"}}</th>
+				<th>{{ctx.Locale.Tr "admin.packages.size"}}</th>
+				<th>{{ctx.Locale.Tr "admin.packages.published"}}</th>
+			</tr>
+		</thead>
+		<tbody>
+			{{range .VersionsToRemove}}
+				<tr>
+					<td>{{.Package.Type.Name}}</td>
+					<td>{{.Package.Name}}</td>
+					<td><a href="{{.VersionWebLink}}">{{.Version.Version}}</a></td>
+					<td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td>
+					<td>{{FileSize .CalculateBlobSize}}</td>
+					<td>{{DateUtils.AbsoluteShort .Version.CreatedUnix}}</td>
+				</tr>
+			{{else}}
+				<tr>
+					<td colspan="6">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview.none"}}</td>
+				</tr>
+			{{end}}
+		</tbody>
+	</table>
+</div>
diff --git a/package/shared/list.tmpl b/package/shared/list.tmpl
new file mode 100644
index 0000000..e621c04
--- /dev/null
+++ b/package/shared/list.tmpl
@@ -0,0 +1,57 @@
+{{template "base/alert" .}}
+{{if .HasPackages}}
+<form class="ui form ignore-dirty">
+	<div class="ui small fluid action input">
+		{{template "shared/search/input" dict "Value" .Query "Placeholder" (ctx.Locale.Tr "search.package_kind")}}
+		<select class="ui small dropdown" name="type">
+			<option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
+			<option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option>
+			{{range $type := .AvailableTypes}}
+			<option{{if eq $.PackageType $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option>
+			{{end}}
+		</select>
+		{{template "shared/search/button"}}
+	</div>
+</form>
+{{end}}
+<div>
+	{{range .PackageDescriptors}}
+	<div class="flex-list">
+		<div class="flex-item">
+			<div class="flex-item-main">
+				<div class="flex-item-title">
+					<a href="{{.VersionWebLink}}">{{.Package.Name}}</a>
+					<span class="ui label">{{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}</span>
+				</div>
+				<div class="flex-item-body">
+					{{$timeStr := DateUtils.TimeSince .Version.CreatedUnix}}
+					{{$hasRepositoryAccess := false}}
+					{{if .Repository}}
+						{{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}}
+					{{end}}
+					{{if $hasRepositoryAccess}}
+						{{ctx.Locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink .Creator.GetDisplayName .Repository.Link .Repository.FullName}}
+					{{else}}
+						{{ctx.Locale.Tr "packages.published_by" $timeStr .Creator.HomeLink .Creator.GetDisplayName}}
+					{{end}}
+				</div>
+			</div>
+		</div>
+	</div>
+	{{else}}
+		{{if not .HasPackages}}
+			<div class="empty-placeholder">
+				{{svg "octicon-package" 48}}
+				<h2>{{ctx.Locale.Tr "packages.empty"}}</h2>
+				{{if and .Repository .CanWritePackages}}
+					{{$packagesUrl := URLJoin .Owner.HomeLink "-" "packages"}}
+					<p>{{ctx.Locale.Tr "packages.empty.repo" $packagesUrl}}</p>
+				{{end}}
+				<p>{{ctx.Locale.Tr "packages.empty.documentation" "https://docs.gitea.com/usage/packages/overview/"}}</p>
+			</div>
+		{{else}}
+			<p class="tw-py-4">{{ctx.Locale.Tr "packages.filter.no_result"}}</p>
+		{{end}}
+	{{end}}
+	{{template "base/paginate" .}}
+</div>
diff --git a/package/shared/versionlist.tmpl b/package/shared/versionlist.tmpl
new file mode 100644
index 0000000..7a1059e
--- /dev/null
+++ b/package/shared/versionlist.tmpl
@@ -0,0 +1,37 @@
+<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{ctx.Locale.Tr "packages.versions"}}</strong></p>
+<form class="ui form ignore-dirty">
+	<div class="ui small fluid action input">
+		{{template "shared/search/input" dict "Value" .Query "Placeholder" (ctx.Locale.Tr "search.package_kind")}}
+		<select class="ui small dropdown" name="sort">
+			<option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.asc"}}</option>
+			<option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.desc"}}</option>
+			<option value="created_asc"{{if eq .Sort "created_asc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</option>
+			<option value="created_desc"{{if or (eq .Sort "") (eq .Sort "created_desc")}} selected="selected"{{end}}>{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</option>
+		</select>
+		{{if eq .PackageDescriptor.Package.Type "container"}}
+		<select class="ui small dropdown" name="tagged">
+			{{$isTagged := or (eq .Tagged "") (eq .Tagged "tagged")}}
+			<option value="tagged"{{if $isTagged}} selected="selected"{{end}}>{{ctx.Locale.Tr "packages.filter.container.tagged"}}</option>
+			<option value="untagged"{{if not $isTagged}} selected="selected"{{end}}>{{ctx.Locale.Tr "packages.filter.container.untagged"}}</option>
+		</select>
+		{{end}}
+		{{template "shared/search/button"}}
+	</div>
+</form>
+<div>
+	{{range .PackageDescriptors}}
+	<div class="flex-list">
+		<div class="flex-item">
+			<div class="flex-item-main">
+				<a class="flex-item-title" href="{{.VersionWebLink}}">{{.Version.LowerVersion}}</a>
+				<div class="flex-item-body">
+					{{ctx.Locale.Tr "packages.published_by" (DateUtils.TimeSince .Version.CreatedUnix) .Creator.HomeLink .Creator.GetDisplayName}}
+				</div>
+			</div>
+		</div>
+	</div>
+	{{else}}
+		<p class="tw-py-4">{{ctx.Locale.Tr "packages.filter.no_result"}}</p>
+	{{end}}
+	{{template "base/paginate" .}}
+</div>
diff --git a/package/view.tmpl b/package/view.tmpl
new file mode 100644
index 0000000..9e92207
--- /dev/null
+++ b/package/view.tmpl
@@ -0,0 +1,114 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository packages">
+	{{template "shared/user/org_profile_avatar" .}}
+	<div class="ui container">
+		{{template "user/overview/header" .}}
+		<div class="issue-title-header">
+			<h1>{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</h1>
+			<div>
+				{{$timeStr := DateUtils.TimeSince .PackageDescriptor.Version.CreatedUnix}}
+				{{if .HasRepositoryAccess}}
+					{{ctx.Locale.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink .PackageDescriptor.Creator.GetDisplayName .PackageDescriptor.Repository.Link .PackageDescriptor.Repository.FullName}}
+				{{else}}
+					{{ctx.Locale.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink .PackageDescriptor.Creator.GetDisplayName}}
+				{{end}}
+			</div>
+		</div>
+		<div class="issue-content">
+			<div class="issue-content-left">
+				{{template "package/content/alpine" .}}
+				{{template "package/content/arch" .}}
+				{{template "package/content/cargo" .}}
+				{{template "package/content/chef" .}}
+				{{template "package/content/composer" .}}
+				{{template "package/content/conan" .}}
+				{{template "package/content/conda" .}}
+				{{template "package/content/container" .}}
+				{{template "package/content/cran" .}}
+				{{template "package/content/debian" .}}
+				{{template "package/content/generic" .}}
+				{{template "package/content/go" .}}
+				{{template "package/content/helm" .}}
+				{{template "package/content/maven" .}}
+				{{template "package/content/npm" .}}
+				{{template "package/content/nuget" .}}
+				{{template "package/content/pub" .}}
+				{{template "package/content/pypi" .}}
+				{{template "package/content/rpm" .}}
+				{{template "package/content/rubygems" .}}
+				{{template "package/content/swift" .}}
+				{{template "package/content/vagrant" .}}
+			</div>
+			<div class="issue-content-right ui segment">
+				<strong>{{ctx.Locale.Tr "packages.details"}}</strong>
+				<div class="ui relaxed list flex-items-block">
+					<div class="item">{{svg .PackageDescriptor.Package.Type.SVGName}} {{.PackageDescriptor.Package.Type.Name}}</div>
+					{{if .HasRepositoryAccess}}
+					<div class="item">{{svg "octicon-repo"}} <a href="{{.PackageDescriptor.Repository.Link}}">{{.PackageDescriptor.Repository.FullName}}</a></div>
+					{{end}}
+					<div class="item">{{svg "octicon-calendar"}} {{DateUtils.TimeSince .PackageDescriptor.Version.CreatedUnix}}</div>
+					<div class="item">{{svg "octicon-download"}} {{.PackageDescriptor.Version.DownloadCount}}</div>
+					{{template "package/metadata/alpine" .}}
+					{{template "package/metadata/arch" .}}
+					{{template "package/metadata/cargo" .}}
+					{{template "package/metadata/chef" .}}
+					{{template "package/metadata/composer" .}}
+					{{template "package/metadata/conan" .}}
+					{{template "package/metadata/conda" .}}
+					{{template "package/metadata/container" .}}
+					{{template "package/metadata/cran" .}}
+					{{template "package/metadata/debian" .}}
+					{{template "package/metadata/generic" .}}
+					{{template "package/metadata/helm" .}}
+					{{template "package/metadata/maven" .}}
+					{{template "package/metadata/npm" .}}
+					{{template "package/metadata/nuget" .}}
+					{{template "package/metadata/pub" .}}
+					{{template "package/metadata/pypi" .}}
+					{{template "package/metadata/rpm" .}}
+					{{template "package/metadata/rubygems" .}}
+					{{template "package/metadata/swift" .}}
+					{{template "package/metadata/vagrant" .}}
+					{{if not (and (eq .PackageDescriptor.Package.Type "container") .PackageDescriptor.Metadata.Manifests)}}
+					<div class="item">{{svg "octicon-database"}} {{FileSize .PackageDescriptor.CalculateBlobSize}}</div>
+					{{end}}
+				</div>
+				{{if not (eq .PackageDescriptor.Package.Type "container")}}
+					<div class="divider"></div>
+					<strong>{{ctx.Locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})</strong>
+					<div class="ui relaxed list">
+					{{range .PackageDescriptor.Files}}
+						<div class="item">
+							<a href="{{$.Link}}/files/{{.File.ID}}">{{.File.Name}}</a>
+							<span class="text small file-size">{{FileSize .Blob.Size}}</span>
+						</div>
+					{{end}}
+					</div>
+				{{end}}
+				<div class="divider"></div>
+				<strong>{{ctx.Locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong>
+				<a class="tw-float-right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{ctx.Locale.Tr "packages.versions.view_all"}}</a>
+				<div class="ui relaxed list">
+				{{range .LatestVersions}}
+					<div class="item tw-flex">
+						<a class="tw-flex-1 gt-ellipsis" title="{{.Version}}" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a>
+						<span class="text small">{{DateUtils.AbsoluteShort .CreatedUnix}}</span>
+					</div>
+				{{end}}
+				</div>
+				{{if or .CanWritePackages .HasRepositoryAccess}}
+					<div class="divider"></div>
+					<div class="ui relaxed list flex-items-block">
+						{{if .HasRepositoryAccess}}
+						<div class="item">{{svg "octicon-issue-opened"}} <a href="{{.PackageDescriptor.Repository.Link}}/issues">{{ctx.Locale.Tr "repo.issues"}}</a></div>
+						{{end}}
+						{{if .CanWritePackages}}
+						<div class="item">{{svg "octicon-tools"}} <a href="{{.Link}}/settings">{{ctx.Locale.Tr "repo.settings"}}</a></div>
+						{{end}}
+					</div>
+				{{end}}
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/post-install.tmpl b/post-install.tmpl
new file mode 100644
index 0000000..fb23400
--- /dev/null
+++ b/post-install.tmpl
@@ -0,0 +1,24 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content install post-install">
+	<div class="ui container">
+		<div class="ui grid">
+			<div class="sixteen wide column content">
+				<div class="home">
+					<div class="ui stackable middle very relaxed page grid">
+						<div class="sixteen wide center aligned centered column">
+							<div>
+								<img src="{{AssetUrlPrefix}}/img/loading.png" alt="{{ctx.Locale.Tr "loading"}}">
+							</div>
+						</div>
+					</div>
+					<div class="ui stackable middle very relaxed page grid">
+						<div class="sixteen wide center aligned centered column">
+							<p><a id="goto-user-login" href="{{AppSubUrl}}/user/login">{{ctx.Locale.Tr "loading"}}</a></p>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/projects/list.tmpl b/projects/list.tmpl
new file mode 100644
index 0000000..31a3152
--- /dev/null
+++ b/projects/list.tmpl
@@ -0,0 +1,96 @@
+{{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
+	<div class="tw-flex tw-justify-between tw-mb-4">
+		<div class="small-menu-items ui compact tiny menu list-header-toggle">
+			<a class="item{{if not .IsShowClosed}} active{{end}}" href="?state=open&q={{$.Keyword}}">
+				{{svg "octicon-project-symlink" 16 "tw-mr-2"}}
+				{{ctx.Locale.PrettyNumber .OpenCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
+			</a>
+			<a class="item{{if .IsShowClosed}} active{{end}}" href="?state=closed&q={{$.Keyword}}">
+				{{svg "octicon-check" 16 "tw-mr-2"}}
+				{{ctx.Locale.PrettyNumber .ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
+			</a>
+		</div>
+		<div class="tw-text-right">
+			<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.projects.new"}}</a>
+		</div>
+	</div>
+{{end}}
+
+{{template "base/alert" .}}
+
+<div class="list-header">
+	<!-- Search -->
+	<form class="list-header-search ui form ignore-dirty">
+		<input type="hidden" name="state" value="{{$.State}}">
+		{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.project_kind")}}
+	</form>
+
+	<div class="list-header-filters">
+		<!-- Sort -->
+		<div class="item ui small dropdown jump">
+			<span class="text">
+				{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+			</span>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
+				<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+				<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="?q={{$.Keyword}}&sort=leastupdate&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+			</div>
+		</div>
+	</div>
+</div>
+
+<div class="milestone-list">
+	{{range .Projects}}
+		<li class="milestone-card">
+			<h3 class="flex-text-block tw-m-0 tw-gap-3">
+				{{svg .IconName 16}}
+				<a class="muted tw-break-anywhere" href="{{.Link ctx}}">{{.Title}}</a>
+			</h3>
+			<div class="milestone-toolbar">
+				<div class="group">
+					<div class="flex-text-block">
+						{{svg "octicon-issue-opened" 14}}
+						{{ctx.Locale.PrettyNumber .NumOpenIssues}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
+					</div>
+					<div class="flex-text-block">
+						{{svg "octicon-check" 14}}
+						{{ctx.Locale.PrettyNumber .NumClosedIssues}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
+					</div>
+				</div>
+				{{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
+				<div class="group">
+					<a class="flex-text-inline" href="{{.Link ctx}}/edit">{{svg "octicon-pencil" 14}}{{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
+					{{if .IsClosed}}
+						<a class="link-action flex-text-inline" href data-url="{{.Link ctx}}/open">{{svg "octicon-check" 14}}{{ctx.Locale.Tr "repo.projects.open"}}</a>
+					{{else}}
+						<a class="link-action flex-text-inline" href data-url="{{.Link ctx}}/close">{{svg "octicon-skip" 14}}{{ctx.Locale.Tr "repo.projects.close"}}</a>
+					{{end}}
+					<a class="delete-button flex-text-inline" href="#" data-url="{{.Link ctx}}/delete">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
+				</div>
+				{{end}}
+			</div>
+			{{if .Description}}
+			<div class="content">
+				{{.RenderedContent}}
+			</div>
+			{{end}}
+		</li>
+	{{end}}
+
+	{{template "base/paginate" .}}
+</div>
+
+{{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.projects.deletion"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.projects.deletion_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+{{end}}
diff --git a/projects/new.tmpl b/projects/new.tmpl
new file mode 100644
index 0000000..a936079
--- /dev/null
+++ b/projects/new.tmpl
@@ -0,0 +1,75 @@
+<h2 class="ui dividing header">
+	{{if .PageIsEditProjects}}
+		{{ctx.Locale.Tr "repo.projects.edit"}}
+		<div class="sub header">{{ctx.Locale.Tr "repo.projects.edit_subheader"}}</div>
+	{{else}}
+		{{ctx.Locale.Tr "repo.projects.new"}}
+		<div class="sub header">{{ctx.Locale.Tr "repo.projects.new_subheader"}}</div>
+	{{end}}
+</h2>
+{{template "base/alert" .}}
+<form class="ui form" action="{{.Link}}" method="post">
+	{{.CsrfTokenHtml}}
+	<div>
+		<input type="hidden" id="redirect" name="redirect" value="{{.redirect}}">
+		<div class="field {{if .Err_Title}}error{{end}}">
+			<label>{{ctx.Locale.Tr "repo.projects.title"}}</label>
+			<input name="title" placeholder="{{ctx.Locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "repo.projects.description"}}</label>
+			{{/* TODO: repo-level project and org-level project have different behaviros to render */}}
+			{{/* the "Repository" is nil when the project is org-level */}}
+			{{template "shared/combomarkdowneditor" (dict
+				"MarkdownPreviewInRepo" $.Repository
+				"MarkdownPreviewContext" (Iif $.Repository "" .HomeLink)
+				"MarkdownPreviewMode" (Iif $.Repository "comment")
+				"TextareaName" "content"
+				"TextareaContent" .content
+				"TextareaPlaceholder" (ctx.Locale.Tr "repo.projects.description_placeholder")
+			)}}
+		</div>
+
+		{{if not .PageIsEditProjects}}
+			<div class="field">
+				<label>{{ctx.Locale.Tr "repo.projects.template.desc"}}</label>
+				<div class="ui selection dropdown">
+					<input type="hidden" name="template_type" value="{{.type}}">
+					<div class="default text">{{ctx.Locale.Tr "repo.projects.template.desc_helper"}}</div>
+					<div class="menu">
+						{{range $element := .TemplateConfigs}}
+							<div class="item" data-id="{{$element.TemplateType}}" data-value="{{$element.TemplateType}}">{{ctx.Locale.Tr $element.Translation}}</div>
+						{{end}}
+					</div>
+				</div>
+			</div>
+		{{end}}
+
+		<div class="field">
+			<label>{{ctx.Locale.Tr "repo.projects.card_type.desc"}}</label>
+			<div class="ui selection dropdown">
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				{{range $element := .CardTypes}}
+					{{if or (eq $.card_type $element.CardType) (and (not $.PageIsEditProjects) (eq $element.CardType 1))}}
+						<input type="hidden" name="card_type" value="{{$element.CardType}}">
+						<div class="default text">{{ctx.Locale.Tr $element.Translation}}</div>
+					{{end}}
+				{{end}}
+				<div class="menu">
+					{{range $element := .CardTypes}}
+						<div class="item" data-id="{{$element.CardType}}" data-value="{{$element.CardType}}">{{ctx.Locale.Tr $element.Translation}}</div>
+					{{end}}
+				</div>
+			</div>
+		</div>
+	</div>
+	<div class="divider"></div>
+	<div class="tw-text-right">
+		<a class="ui cancel button" href="{{$.CancelLink}}">
+			{{ctx.Locale.Tr "repo.milestones.cancel"}}
+		</a>
+		<button class="ui primary button">
+			{{if .PageIsEditProjects}}{{ctx.Locale.Tr "repo.projects.modify"}}{{else}}{{ctx.Locale.Tr "repo.projects.create"}}{{end}}
+		</button>
+	</div>
+</form>
diff --git a/projects/view.tmpl b/projects/view.tmpl
new file mode 100644
index 0000000..217ffe6
--- /dev/null
+++ b/projects/view.tmpl
@@ -0,0 +1,192 @@
+{{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}}
+
+<div class="ui container tw-max-w-full">
+	<div class="flex-text-block tw-flex-wrap tw-mb-4">
+		<h2 class="tw-mb-0">{{.Project.Title}}</h2>
+		<div class="tw-flex-1"></div>
+				<div class="ui secondary menu tw-m-0">
+					{{$queryLink := QueryBuild "?" "labels" .SelectLabels "assignee" $.AssigneeID "archived_labels" (Iif $.ShowArchivedLabels "true")}}
+
+					{{template "repo/issue/filter_item_label" dict "Labels" .Labels "QueryLink" $queryLink "SupportArchivedLabel" true}}
+
+					{{template "repo/issue/filter_item_user_assign" dict
+						"QueryParamKey" "assignee"
+						"QueryLink" $queryLink
+						"UserSearchList" $.Assignees
+						"SelectedUserId" $.AssigneeID
+						"TextFilterTitle" (ctx.Locale.Tr "repo.issues.filter_assignee")
+						"TextZeroValue" (ctx.Locale.Tr "repo.issues.filter_assginee_no_select")
+						"TextNegativeOne" (ctx.Locale.Tr "repo.issues.filter_assginee_no_assignee")
+					}}
+				</div>
+		{{if $canWriteProject}}
+			<div class="ui compact mini menu">
+				<a class="item" href="{{.Link}}/edit?redirect=project">
+					{{svg "octicon-pencil"}}
+					{{ctx.Locale.Tr "repo.issues.label_edit"}}
+				</a>
+				{{if .Project.IsClosed}}
+					<button class="item btn link-action" data-url="{{.Link}}/open">
+						{{svg "octicon-check"}}
+						{{ctx.Locale.Tr "repo.projects.open"}}
+					</button>
+				{{else}}
+					<button class="item btn link-action" data-url="{{.Link}}/close">
+						{{svg "octicon-skip"}}
+						{{ctx.Locale.Tr "repo.projects.close"}}
+					</button>
+				{{end}}
+				<button class="item btn delete-button" data-url="{{.Link}}/delete" data-id="{{.Project.ID}}">
+					{{svg "octicon-trash"}}
+					{{ctx.Locale.Tr "repo.issues.label_delete"}}
+				</button>
+				<button class="item btn show-modal" data-modal="#new-project-column-item">
+					{{svg "octicon-plus"}}
+					{{ctx.Locale.Tr "new_project_column"}}
+				</button>
+			</div>
+			<div class="ui small modal new-project-column-modal" id="new-project-column-item">
+				<div class="header">
+					{{ctx.Locale.Tr "repo.projects.column.new"}}
+				</div>
+				<div class="content">
+					<form class="ui form">
+						<div class="required field">
+							<label for="new_project_column">{{ctx.Locale.Tr "repo.projects.column.new_title"}}</label>
+							<input class="new-project-column" id="new_project_column" name="title" required>
+						</div>
+
+						<div class="field color-field">
+							<label for="new_project_column_color_picker">{{ctx.Locale.Tr "repo.projects.column.color"}}</label>
+							<div class="js-color-picker-input column">
+								<input maxlength="7" placeholder="#c320f6" id="new_project_column_color_picker" name="color">
+								{{template "repo/issue/label_precolors"}}
+							</div>
+						</div>
+
+						<div class="text right actions">
+							<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+							<button data-url="{{$.Link}}" class="ui primary button" id="new_project_column_submit">{{ctx.Locale.Tr "repo.projects.column.new_submit"}}</button>
+						</div>
+					</form>
+				</div>
+			</div>
+		{{end}}
+	</div>
+
+	<div class="content">{{$.Project.RenderedContent}}</div>
+
+	<div class="divider"></div>
+</div>
+
+<div id="project-board">
+	<div class="board {{if .CanWriteProjects}}sortable{{end}}"{{if .CanWriteProjects}} data-url="{{$.Link}}/move"{{end}}>
+		{{range .Columns}}
+			<div class="project-column"{{if .Color}} style="background: {{.Color}} !important; color: {{ContrastColor .Color}} !important"{{end}} data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.Link}}/{{.ID}}">
+				<div class="project-column-header{{if $canWriteProject}} tw-cursor-grab{{end}}">
+					<div class="ui circular label project-column-issue-count">
+						{{.NumIssues}}
+					</div>
+					<div class="project-column-title-label gt-ellipsis">{{.Title}}</div>
+					{{if $canWriteProject}}
+						<div class="ui dropdown tw-p-1">
+							{{svg "octicon-kebab-horizontal"}}
+							<div class="menu">
+								<a class="item show-modal button" data-modal="#edit-project-column-modal-{{.ID}}">
+									{{svg "octicon-pencil"}}
+									{{ctx.Locale.Tr "repo.projects.column.edit"}}
+								</a>
+								{{if not .Default}}
+									<a class="item show-modal button default-project-column-show"
+										data-modal="#default-project-column-modal-{{.ID}}"
+										data-modal-default-project-column-header="{{ctx.Locale.Tr "repo.projects.column.set_default"}}"
+										data-modal-default-project-column-content="{{ctx.Locale.Tr "repo.projects.column.set_default_desc"}}"
+										data-url="{{$.Link}}/{{.ID}}/default">
+										{{svg "octicon-pin"}}
+										{{ctx.Locale.Tr "repo.projects.column.set_default"}}
+									</a>
+									<a class="item show-modal button show-delete-project-column-modal"
+										data-modal="#delete-project-column-modal-{{.ID}}"
+										data-url="{{$.Link}}/{{.ID}}">
+										{{svg "octicon-trash"}}
+										{{ctx.Locale.Tr "repo.projects.column.delete"}}
+									</a>
+								{{end}}
+
+								<div class="ui small modal edit-project-column-modal" id="edit-project-column-modal-{{.ID}}">
+									<div class="header">
+										{{ctx.Locale.Tr "repo.projects.column.edit"}}
+									</div>
+									<div class="content">
+										<form class="ui form">
+											<div class="required field">
+												<label for="new_project_column_title">{{ctx.Locale.Tr "repo.projects.column.edit_title"}}</label>
+												<input class="project-column-title-input" id="new_project_column_title" name="title" value="{{.Title}}" required>
+											</div>
+
+											<div class="field color-field">
+												<label for="new_project_column_color">{{ctx.Locale.Tr "repo.projects.column.color"}}</label>
+												<div class="js-color-picker-input column">
+													<input maxlength="7" placeholder="#c320f6" id="new_project_column_color" name="color" value="{{.Color}}">
+													{{template "repo/issue/label_precolors"}}
+												</div>
+											</div>
+
+											<div class="text right actions">
+												<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+												<button data-url="{{$.Link}}/{{.ID}}" class="ui primary button edit-project-column-button">{{ctx.Locale.Tr "repo.projects.column.edit"}}</button>
+											</div>
+										</form>
+									</div>
+								</div>
+
+								<div class="ui g-modal-confirm modal default-project-column-modal" id="default-project-column-modal-{{.ID}}">
+									<div class="header">
+										<span id="default-project-column-header"></span>
+									</div>
+									<div class="content">
+										<label id="default-project-column-content"></label>
+									</div>
+									{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+								</div>
+
+								<div class="ui g-modal-confirm modal" id="delete-project-column-modal-{{.ID}}">
+									<div class="header">
+										{{ctx.Locale.Tr "repo.projects.column.delete"}}
+									</div>
+									<div class="content">
+										<label>
+											{{ctx.Locale.Tr "repo.projects.column.deletion_desc"}}
+										</label>
+									</div>
+									{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+								</div>
+							</div>
+						</div>
+					{{end}}
+				</div>
+				<div class="divider"{{if .Color}} style="color: {{ContrastColor .Color}} !important"{{end}}></div>
+				<div class="ui cards" data-url="{{$.Link}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
+					{{range (index $.IssuesMap .ID)}}
+						<div class="issue-card tw-break-anywhere {{if $canWriteProject}}tw-cursor-grab{{end}}" data-issue="{{.ID}}">
+							{{template "repo/issue/card" (dict "Issue" . "Page" $)}}
+						</div>
+					{{end}}
+				</div>
+			</div>
+		{{end}}
+	</div>
+</div>
+
+{{if .CanWriteProjects}}
+	<div class="ui g-modal-confirm delete modal">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "repo.projects.deletion"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "repo.projects.deletion_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+{{end}}
diff --git a/repo/actions/list.tmpl b/repo/actions/list.tmpl
new file mode 100644
index 0000000..7d782c0
--- /dev/null
+++ b/repo/actions/list.tmpl
@@ -0,0 +1,92 @@
+{{template "base/head" .}}
+<div class="page-content repository actions">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+
+		{{if .HasWorkflowsOrRuns}}
+		<div class="ui stackable grid">
+			<div class="four wide column">
+				<div class="ui fluid vertical menu">
+					<a class="item{{if not $.CurWorkflow}} active{{end}}" href="?actor={{$.CurActor}}&status={{$.CurStatus}}">{{ctx.Locale.Tr "actions.runs.all_workflows"}}</a>
+					{{range .workflows}}
+						<a class="item{{if eq .Entry.Name $.CurWorkflow}} active{{end}}" href="?workflow={{.Entry.Name}}&actor={{$.CurActor}}&status={{$.CurStatus}}">{{.Entry.Name}}
+							{{if .ErrMsg}}
+								<span data-tooltip-content="{{.ErrMsg}}">
+									{{svg "octicon-alert" 16 "text red"}}
+								</span>
+							{{end}}
+
+							{{if $.ActionsConfig.IsWorkflowDisabled .Entry.Name}}
+								<div class="ui red label">{{ctx.Locale.Tr "disabled"}}</div>
+							{{end}}
+						</a>
+					{{end}}
+				</div>
+			</div>
+			<div class="twelve wide column content">
+				<div class="ui secondary filter menu tw-justify-end tw-flex tw-items-center">
+					<!-- Actor -->
+					<div class="ui{{if not .Actors}} disabled{{end}} dropdown jump item">
+						<span class="text">{{ctx.Locale.Tr "actions.runs.actor"}}</span>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu">
+							<div class="ui icon search input">
+								<i class="icon">{{svg "octicon-search"}}</i>
+								<input type="text" placeholder="{{ctx.Locale.Tr "actions.runs.actor"}}">
+							</div>
+							<a class="item{{if not $.CurActor}} active{{end}}" href="?workflow={{$.CurWorkflow}}&status={{$.CurStatus}}&actor=0">
+								{{ctx.Locale.Tr "actions.runs.actors_no_select"}}
+							</a>
+							{{range .Actors}}
+								<a class="item{{if eq .ID $.CurActor}} active{{end}}" href="?workflow={{$.CurWorkflow}}&actor={{.ID}}&status={{$.CurStatus}}">
+									{{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}}
+								</a>
+							{{end}}
+						</div>
+					</div>
+					<!-- Status -->
+					<div class="ui dropdown jump item">
+						<span class="text">{{ctx.Locale.Tr "actions.runs.status"}}</span>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu">
+							<div class="ui icon search input">
+								<i class="icon">{{svg "octicon-search"}}</i>
+								<input type="text" placeholder="{{ctx.Locale.Tr "actions.runs.status"}}">
+							</div>
+							<a class="item{{if not $.CurStatus}} active{{end}}" href="?workflow={{$.CurWorkflow}}&actor={{$.CurActor}}&status=0">
+								{{ctx.Locale.Tr "actions.runs.status_no_select"}}
+							</a>
+							{{range .StatusInfoList}}
+								<a class="item{{if eq .Status $.CurStatus}} active{{end}}" href="?workflow={{$.CurWorkflow}}&actor={{$.CurActor}}&status={{.Status}}">
+									{{.DisplayedStatus}}
+								</a>
+							{{end}}
+						</div>
+					</div>
+
+					{{if .AllowDisableOrEnableWorkflow}}
+						<button class="ui jump dropdown btn interact-bg tw-p-2">
+							{{svg "octicon-kebab-horizontal"}}
+							<div class="menu">
+								<a class="item link-action" data-url="{{$.Link}}/{{if .CurWorkflowDisabled}}enable{{else}}disable{{end}}?workflow={{$.CurWorkflow}}&actor={{.CurActor}}&status={{$.CurStatus}}">
+									{{if .CurWorkflowDisabled}}{{ctx.Locale.Tr "actions.workflow.enable"}}{{else}}{{ctx.Locale.Tr "actions.workflow.disable"}}{{end}}
+								</a>
+							</div>
+						</button>
+					{{end}}
+				</div>
+
+				{{if .WorkflowDispatchConfig}}
+					{{template "repo/actions/workflow_dispatch" .}}
+				{{end}}
+
+				{{template "repo/actions/runs_list" .}}
+			</div>
+		</div>
+		{{else}}
+			{{template "repo/actions/no_workflows" .}}
+		{{end}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/actions/no_workflows.tmpl b/repo/actions/no_workflows.tmpl
new file mode 100644
index 0000000..0093135
--- /dev/null
+++ b/repo/actions/no_workflows.tmpl
@@ -0,0 +1,8 @@
+<div class="empty-placeholder">
+	{{svg "octicon-no-entry" 48}}
+	<h2>{{ctx.Locale.Tr "actions.runs.no_workflows"}}</h2>
+	{{if and .CanWriteCode .CanWriteActions}}
+		<p>{{ctx.Locale.Tr "actions.runs.no_workflows.quick_start" "https://docs.gitea.com/usage/actions/quickstart/"}}</p>
+	{{end}}
+	<p>{{ctx.Locale.Tr "actions.runs.no_workflows.documentation" "https://docs.gitea.com/usage/actions/overview/"}}</p>
+</div>
diff --git a/repo/actions/runs_list.tmpl b/repo/actions/runs_list.tmpl
new file mode 100644
index 0000000..fa1adb3
--- /dev/null
+++ b/repo/actions/runs_list.tmpl
@@ -0,0 +1,43 @@
+<div class="flex-list run-list">
+	{{if not .Runs}}
+	<div class="empty-placeholder">
+		{{svg "octicon-no-entry" 48}}
+		<h2>{{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}</h2>
+	</div>
+	{{end}}
+	{{range .Runs}}
+		<div class="flex-item tw-items-center">
+			<div class="flex-item-leading">
+				{{template "repo/actions/status" (dict "status" .Status.String)}}
+			</div>
+			<div class="flex-item-main">
+				<a class="flex-item-title" title="{{.Title}}" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
+					{{if .Title}}{{.Title}}{{else}}{{ctx.Locale.Tr "actions.runs.empty_commit_message"}}{{end}}
+				</a>
+				<div class="flex-item-body">
+					<span><b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>:</span>
+					{{- if .ScheduleID -}}
+						{{ctx.Locale.Tr "actions.runs.scheduled"}}
+					{{- else -}}
+						{{ctx.Locale.Tr "actions.runs.commit"}}
+						<a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{ShortSha .CommitSHA}}</a>
+						{{ctx.Locale.Tr "actions.runs.pushed_by"}}
+						<a href="{{.TriggerUser.HomeLink}}">{{.TriggerUser.GetDisplayName}}</a>
+					{{- end -}}
+				</div>
+			</div>
+			<div class="flex-item-trailing">
+				{{if .IsRefDeleted}}
+					<span class="ui label run-list-ref gt-ellipsis tw-line-through" data-tooltip-content="{{.PrettyRef}}">{{.PrettyRef}}</span>
+				{{else}}
+					<a class="ui label run-list-ref gt-ellipsis" href="{{.RefLink}}" data-tooltip-content="{{.PrettyRef}}">{{.PrettyRef}}</a>
+				{{end}}
+				<div class="run-list-item-right">
+					<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{DateUtils.TimeSince .Updated}}</div>
+					<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
+				</div>
+			</div>
+		</div>
+	{{end}}
+</div>
+{{template "base/paginate" .}}
diff --git a/repo/actions/status.tmpl b/repo/actions/status.tmpl
new file mode 100644
index 0000000..64c2543
--- /dev/null
+++ b/repo/actions/status.tmpl
@@ -0,0 +1,23 @@
+<!-- This template should be kept the same as web_src/js/components/ActionRunStatus.vue
+	Please also update the vue file above if this template is modified.
+	action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
+-->
+{{- $size := Iif .size .size 16 -}}
+{{- $className := Iif .className .className "" -}}
+<span data-tooltip-content="{{ctx.Locale.Tr (printf "actions.status.%s" .status)}}">
+{{if eq .status "success"}}
+	{{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}}
+{{else if eq .status "skipped"}}
+	{{svg "octicon-skip" $size (printf "text grey %s" $className)}}
+{{else if eq .status "cancelled"}}
+	{{svg "octicon-stop" $size (printf "text grey %s" $className)}}
+{{else if eq .status "waiting"}}
+	{{svg "octicon-clock" $size (printf "text yellow %s" $className)}}
+{{else if eq .status "blocked"}}
+	{{svg "octicon-blocked" $size (printf "text yellow %s" $className)}}
+{{else if eq .status "running"}}
+	{{svg "octicon-meter" $size (printf "text yellow job-status-rotate %s" $className)}}
+{{else}}{{/*failure, unknown*/}}
+	{{svg "octicon-x-circle-fill" $size (printf "text red %s" $className)}}
+{{end}}
+</span>
diff --git a/repo/actions/view.tmpl b/repo/actions/view.tmpl
new file mode 100644
index 0000000..f7b0360
--- /dev/null
+++ b/repo/actions/view.tmpl
@@ -0,0 +1,34 @@
+{{template "base/head" .}}
+
+<div class="page-content repository">
+	{{template "repo/header" .}}
+	<div id="repo-action-view"
+		data-run-index="{{.RunIndex}}"
+		data-job-index="{{.JobIndex}}"
+		data-actions-url="{{.ActionsURL}}"
+		data-locale-approve="{{ctx.Locale.Tr "repo.diff.review.approve"}}"
+		data-locale-cancel="{{ctx.Locale.Tr "cancel"}}"
+		data-locale-rerun="{{ctx.Locale.Tr "rerun"}}"
+		data-locale-rerun-all="{{ctx.Locale.Tr "rerun_all"}}"
+		data-locale-runs-scheduled="{{ctx.Locale.Tr "actions.runs.scheduled"}}"
+		data-locale-runs-commit="{{ctx.Locale.Tr "actions.runs.commit"}}"
+		data-locale-runs-pushed-by="{{ctx.Locale.Tr "actions.runs.pushed_by"}}"
+		data-locale-status-unknown="{{ctx.Locale.Tr "actions.status.unknown"}}"
+		data-locale-status-waiting="{{ctx.Locale.Tr "actions.status.waiting"}}"
+		data-locale-status-running="{{ctx.Locale.Tr "actions.status.running"}}"
+		data-locale-status-success="{{ctx.Locale.Tr "actions.status.success"}}"
+		data-locale-status-failure="{{ctx.Locale.Tr "actions.status.failure"}}"
+		data-locale-status-cancelled="{{ctx.Locale.Tr "actions.status.cancelled"}}"
+		data-locale-status-skipped="{{ctx.Locale.Tr "actions.status.skipped"}}"
+		data-locale-status-blocked="{{ctx.Locale.Tr "actions.status.blocked"}}"
+		data-locale-artifacts-title="{{ctx.Locale.Tr "artifacts"}}"
+		data-locale-confirm-delete-artifact="{{ctx.Locale.Tr "confirm_delete_artifact"}}"
+		data-locale-show-timestamps="{{ctx.Locale.Tr "show_timestamps"}}"
+		data-locale-show-log-seconds="{{ctx.Locale.Tr "show_log_seconds"}}"
+		data-locale-show-full-screen="{{ctx.Locale.Tr "show_full_screen"}}"
+		data-locale-download-logs="{{ctx.Locale.Tr "download_logs"}}"
+	>
+	</div>
+</div>
+
+{{template "base/footer" .}}
diff --git a/repo/actions/workflow_dispatch.tmpl b/repo/actions/workflow_dispatch.tmpl
new file mode 100644
index 0000000..21f3ef2
--- /dev/null
+++ b/repo/actions/workflow_dispatch.tmpl
@@ -0,0 +1,78 @@
+<div class="ui blue info message tw-flex tw-justify-between tw-items-center">
+	<span class="ui text middle">{{ctx.Locale.Tr "actions.workflow.has_workflow_dispatch"}}</span>
+	<button class="ui mini button show-modal" data-modal="#runWorkflowDispatchModal">{{ctx.Locale.Tr "actions.workflow.run"}}{{svg "octicon-triangle-down" 14 "dropdown icon"}}</button>
+</div>
+<div id="runWorkflowDispatchModal" class="ui tiny modal">
+	<div class="content">
+		<form id="runWorkflowDispatchForm" class="ui form" action="{{$.Link}}/run?workflow={{$.CurWorkflow}}&actor={{$.CurActor}}&status={{.Status}}" method="post">
+			{{.CsrfTokenHtml}}
+			<div class="ui inline field required tw-flex tw-items-center">
+				<span class="ui inline required field">
+					<label>{{ctx.Locale.Tr "actions.workflow.from_ref"}}:</label>
+				</span>
+				<div class="ui inline field dropdown button select-branch branch-selector-dropdown ellipsis-items-nowrap">
+					<input type="hidden" name="ref" value="refs/heads/{{index .Branches 0}}">
+					{{svg "octicon-git-branch" 14}}
+					<div class="default text">{{index .Branches 0}}</div>
+					{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+					<div class="menu transition">
+						<div class="ui icon search input">
+							<i class="icon">{{svg "octicon-filter" 16}}</i>
+							<input name="search" type="text" placeholder="{{ctx.Locale.Tr "repo.filter_branch_and_tag"}}...">
+						</div>
+						<div class="branch-tag-tab">
+							<a class="branch-tag-item reference column muted active" href="#" data-target="#branch-list">
+								{{svg "octicon-git-branch" 16 "tw-mr-1"}} {{ctx.Locale.Tr "repo.branches"}}
+							</a>
+							<a class="branch-tag-item reference column muted" href="#" data-target="#tag-list">
+								{{svg "octicon-tag" 16 "tw-mr-1"}} {{ctx.Locale.Tr "repo.tags"}}
+							</a>
+						</div>
+						<div class="branch-tag-divider"></div>
+						<div id="branch-list" class="scrolling menu reference-list-menu">
+							{{range .Branches}}
+								<div class="item" data-value="refs/heads/{{.}}" title="{{.}}">{{.}}</div>
+							{{else}}
+								<div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
+							{{end}}
+						</div>
+						<div id="tag-list" class="scrolling menu reference-list-menu tw-hidden">
+							{{range .Tags}}
+								<div class="item" data-value="refs/tags/{{.}}" title="{{.}}">{{.}}</div>
+							{{else}}
+								<div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
+							{{end}}
+						</div>
+					</div>
+				</div>
+			</div>
+
+			<div class="divider"></div>
+
+			{{range $item := .WorkflowDispatchConfig.Inputs}}
+			<div class="ui field {{if .Required}}required{{end}}">
+				{{if eq .Type "choice"}}
+					<label>{{.Description}}:</label>
+					<select class="ui selection type dropdown" name="{{.Name}}">
+						{{range .Options}}
+						<option value="{{.}}" {{if eq $item.Default .}}selected{{end}} >{{.}}</option>
+						{{end}}
+					</select>
+				{{else if eq .Type "boolean"}}
+					<div class="ui inline checkbox">
+						<label>{{.Description}}</label>
+						<input type="checkbox" name="{{.Name}}" {{if eq .Default "true"}}checked{{end}}>
+					</div>
+				{{else if eq .Type "number"}}
+					<label>{{.Description}}:</label>
+					<input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}>
+				{{else}}
+					<label>{{.Description}}:</label>
+					<input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}>
+				{{end}}
+			</div>
+			{{end}}
+			<button class="ui tiny primary button" type="submit">Submit</button>
+		</form>
+	</div>
+</div>
diff --git a/repo/activity.tmpl b/repo/activity.tmpl
new file mode 100644
index 0000000..a19fb66
--- /dev/null
+++ b/repo/activity.tmpl
@@ -0,0 +1,17 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository commits">
+	{{template "repo/header" .}}
+	<div class="ui container flex-container">
+		<div class="flex-container-nav">
+			{{template "repo/navbar" .}}
+		</div>
+		<div class="flex-container-main">
+			{{if .PageIsPulse}}{{template "repo/pulse" .}}{{end}}
+			{{if .PageIsContributors}}{{template "repo/contributors" .}}{{end}}
+			{{if .PageIsCodeFrequency}}{{template "repo/code_frequency" .}}{{end}}
+			{{if .PageIsRecentCommits}}{{template "repo/recent_commits" .}}{{end}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
+
diff --git a/repo/blame.tmpl b/repo/blame.tmpl
new file mode 100644
index 0000000..62d1bbf
--- /dev/null
+++ b/repo/blame.tmpl
@@ -0,0 +1,92 @@
+{{if or .UsesIgnoreRevs .FaultyIgnoreRevsFile}}
+	{{$revsFileLink := URLJoin .RepoLink "src" .BranchNameSubURL "/.git-blame-ignore-revs"}}
+	{{if .UsesIgnoreRevs}}
+		<div class="ui info message">
+			<p>{{ctx.Locale.Tr "repo.blame.ignore_revs" $revsFileLink "?bypass-blame-ignore=true"}}</p>
+		</div>
+	{{else}}
+		<div class="ui error message">
+			<p>{{ctx.Locale.Tr "repo.blame.ignore_revs.failed" $revsFileLink}}</p>
+		</div>
+	{{end}}
+{{end}}
+<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
+	<h4 class="file-header ui top attached header tw-flex tw-items-center tw-justify-between tw-flex-wrap">
+		<div class="file-header-left tw-flex tw-items-center tw-py-2 tw-pr-4">
+			{{template "repo/file_info" .}}
+		</div>
+		<div class="file-header-right file-actions tw-flex tw-items-center tw-flex-wrap">
+			<div class="ui buttons">
+				<a class="ui tiny button" href="{{$.RawFileLink}}">{{ctx.Locale.Tr "repo.file_raw"}}</a>
+				{{if not .IsViewCommit}}
+					<a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID | PathEscape}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.file_permalink"}}</a>
+				{{end}}
+				<a class="ui tiny button" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.normal_view"}}</a>
+				<a class="ui tiny button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.file_history"}}</a>
+				<button class="ui tiny button unescape-button">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
+				<button class="ui tiny button escape-button tw-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
+			</div>
+		</div>
+	</h4>
+	<div class="ui bottom attached table unstackable segment">
+		<div class="file-view code-view unicode-escaped">
+			{{if .IsFileTooLarge}}
+				{{template "shared/filetoolarge" dict "RawFileLink" .RawFileLink}}
+			{{else if not .FileSize}}
+				{{template "shared/fileisempty"}}
+			{{else}}
+			<table>
+				<tbody>
+					{{range $row := .BlameRows}}
+						<tr class="{{if and (gt $.CommitCnt 1) ($row.CommitMessage)}}top-line-blame{{end}}">
+							<td class="lines-commit">
+								<div class="blame-info">
+									<div class="blame-data">
+										<div class="blame-avatar">
+											{{$row.Avatar}}
+										</div>
+										<div class="blame-message">
+											<a class="suppressed tw-text-text" href="{{$row.CommitURL}}" title="{{$row.CommitMessage}}">
+												{{$row.CommitMessage}}
+											</a>
+										</div>
+										<div class="blame-time not-mobile">
+											{{$row.CommitSince}}
+										</div>
+									</div>
+								</div>
+							</td>
+							<td class="lines-blame-btn">
+								{{if $row.PreviousSha}}
+									<a role="button" class="muted" href="{{$row.PreviousShaURL}}" data-tooltip-content='{{ctx.Locale.Tr "repo.blame_prior"}}'>
+										{{svg "octicon-versions"}}
+									</a>
+								{{end}}
+							</td>
+							<td class="lines-num">
+								<span id="L{{$row.RowNumber}}" data-line-number="{{$row.RowNumber}}"></span>
+							</td>
+							{{if $.EscapeStatus.Escaped}}
+								<td class="lines-escape">
+									{{if $row.EscapeStatus.Escaped}}
+										<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $row}}"></button>
+									{{end}}
+								</td>
+							{{end}}
+							<td rel="L{{$row.RowNumber}}" class="lines-code blame-code chroma">
+								<code class="code-inner tw-pl-2">{{$row.Code}}</code>
+							</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+			{{end}}{{/* end if .IsFileTooLarge */}}
+			<div class="code-line-menu tippy-target">
+				{{if $.Permission.CanRead ctx.Consts.RepoUnitTypeIssues}}
+					<a class="item ref-in-new-issue" role="menuitem" data-url-issue-new="{{.RepoLink}}/issues/new" data-url-param-body-link="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}" rel="nofollow noindex">{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}</a>
+				{{end}}
+				<a class="item copy-line-permalink" role="menuitem" data-url="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}">{{ctx.Locale.Tr "repo.file_copy_permalink"}}</a>
+			</div>
+		</div>
+	</div>
+</div>
diff --git a/repo/branch/list.tmpl b/repo/branch/list.tmpl
new file mode 100644
index 0000000..f10b2ef
--- /dev/null
+++ b/repo/branch/list.tmpl
@@ -0,0 +1,260 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content ui repository branches">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		{{template "repo/sub_menu" .}}
+		{{if .DefaultBranchBranch}}
+			<h4 class="ui top attached header">
+				{{ctx.Locale.Tr "repo.default_branch"}}
+				{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
+				<a role="button" class="right" href="{{.RepoLink}}/settings/branches" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.branches.switch_default_branch"}}">
+					{{svg "octicon-arrow-switch"}}
+				</a>
+				{{end}}
+			</h4>
+
+			<div class="ui attached table segment">
+				<table class="ui very basic striped fixed table single line">
+					<tbody>
+						<tr>
+							<td>
+								<div class="flex-text-block">
+									<a class="gt-ellipsis" href="{{.RepoLink}}/src/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{.DefaultBranchBranch.DBBranch.Name}}</a>
+									{{if .DefaultBranchBranch.IsProtected}}
+										<span data-tooltip-content="{{ctx.Locale.Tr "repo.settings.protected_branch"}}">{{svg "octicon-shield-lock"}}</span>
+									{{end}}
+									<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_branch"}}">{{svg "octicon-copy" 14}}</button>
+									{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}}
+								</div>
+								<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{ctx.RenderUtils.RenderCommitMessage .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .DefaultBranchBranch.DBBranch.CommitTime}}{{if .DefaultBranchBranch.DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
+							</td>
+							<td class="right aligned middle aligned overflow-visible">
+								{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
+									<button class="btn interact-bg show-create-branch-modal tw-p-2"
+										data-modal="#create-branch-modal"
+										data-branch-from="{{$.DefaultBranchBranch.DBBranch.Name}}"
+										data-branch-from-urlcomponent="{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}"
+										data-tooltip-content="{{ctx.Locale.Tr "repo.branch.new_branch_from" ($.DefaultBranchBranch.DBBranch.Name)}}"
+									>
+										{{svg "octicon-git-branch"}}
+									</button>
+								{{end}}
+								{{if .EnableFeed}}
+									<a role="button" class="btn interact-bg tw-p-2" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss"}}</a>
+								{{end}}
+								{{if not $.DisableDownloadSourceArchives}}
+									<div class="ui dropdown btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.download" ($.DefaultBranchBranch.DBBranch.Name)}}">
+										{{svg "octicon-download"}}
+										<div class="menu">
+											<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
+											<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;TAR.GZ</a>
+										</div>
+									</div>
+								{{end}}
+								{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted) (not $.IsMirror)}}
+									<button class="btn interact-bg tw-p-2 show-modal show-rename-branch-modal"
+										data-is-default-branch="true"
+										data-modal="#rename-branch-modal"
+										data-old-branch-name="{{$.DefaultBranchBranch.DBBranch.Name}}"
+										data-tooltip-content="{{ctx.Locale.Tr "repo.branch.rename" ($.DefaultBranchBranch.DBBranch.Name)}}"
+									>
+										{{svg "octicon-pencil"}}
+									</button>
+								{{end}}
+							</td>
+						</tr>
+					</tbody>
+				</table>
+			</div>
+		{{end}}
+
+		<h4 class="ui top attached header tw-flex tw-items-center tw-justify-between">
+			<div class="tw-flex tw-items-center">
+				{{ctx.Locale.Tr "repo.branches"}}
+			</div>
+		</h4>
+
+		<div class="ui attached segment">
+			<form class="ignore-dirty" method="get">
+				{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.branch_kind")}}
+			</form>
+		</div>
+
+		<div class="ui attached table segment">
+			<table class="ui very basic striped fixed table single line">
+				<tbody>
+					{{range .Branches}}
+						<tr>
+							<td class="eight wide">
+							{{if .DBBranch.IsDeleted}}
+								<div class="flex-text-block">
+									<span class="gt-ellipsis">{{.DBBranch.Name}}</span>
+									<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_branch"}}">{{svg "octicon-copy" 14}}</button>
+								</div>
+								<p class="info">{{ctx.Locale.Tr "repo.branch.deleted_by" .DBBranch.DeletedBy.Name}} {{DateUtils.TimeSince .DBBranch.DeletedUnix}}</p>
+							{{else}}
+								<div class="flex-text-block">
+									<a class="gt-ellipsis" href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments .DBBranch.Name}}">{{.DBBranch.Name}}</a>
+									{{if .IsProtected}}
+										<span data-tooltip-content="{{ctx.Locale.Tr "repo.settings.protected_branch"}}">{{svg "octicon-shield-lock"}}</span>
+									{{end}}
+									<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_branch"}}">{{svg "octicon-copy" 14}}</button>
+									{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}}
+								</div>
+								<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{$.RepoLink}}/commit/{{PathEscape .DBBranch.CommitID}}">{{ShortSha .DBBranch.CommitID}}</a> · <span class="commit-message">{{ctx.RenderUtils.RenderCommitMessage .DBBranch.CommitMessage ($.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .DBBranch.CommitTime}}{{if .DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}} &nbsp;{{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}</p>
+							{{end}}
+							</td>
+							<td class="two wide ui">
+								{{if and (not .DBBranch.IsDeleted) $.DefaultBranchBranch}}
+								<div class="commit-divergence">
+									<div class="bar-group">
+										<div class="count count-behind">{{.CommitsBehind}}</div>
+										{{/* old code bears 0/0.0 = NaN output, so it might output invalid "width: NaNpx", it just works and doesn't caues any problem. */}}
+										<div class="bar bar-behind" style="width: {{Eval 100 "*" .CommitsBehind "/" "(" .CommitsBehind "+" .CommitsAhead "+" 0.0 ")"}}%"></div>
+									</div>
+									<div class="bar-group">
+										<div class="count count-ahead">{{.CommitsAhead}}</div>
+										<div class="bar bar-ahead" style="width: {{Eval 100 "*" .CommitsAhead "/" "(" .CommitsBehind "+" .CommitsAhead "+" 0.0 ")"}}%"></div>
+									</div>
+								</div>
+								{{end}}
+							</td>
+							<td class="two wide right aligned">
+								{{if not .LatestPullRequest}}
+									{{if .IsIncluded}}
+										<span class="ui orange large label" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.included_desc"}}">
+											{{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "repo.branch.included"}}
+										</span>
+									{{else if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
+									<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .DBBranch.Name}}">
+										<button id="new-pull-request" class="ui compact basic button tw-mr-0">{{if $.CanPull}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}</button>
+									</a>
+									{{end}}
+								{{else if and .LatestPullRequest.HasMerged .MergeMovedOn}}
+									{{if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
+									<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .DBBranch.Name}}">
+										<button id="new-pull-request" class="ui compact basic button tw-mr-0">{{if $.CanPull}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}</button>
+									</a>
+									{{end}}
+								{{else}}
+									<a href="{{.LatestPullRequest.Issue.Link}}" class="tw-align-middle ref-issue">{{if not .LatestPullRequest.IsSameRepo}}{{.LatestPullRequest.BaseRepo.FullName}}{{end}}#{{.LatestPullRequest.Issue.Index}}</a>
+									{{if .LatestPullRequest.HasMerged}}
+										<a href="{{.LatestPullRequest.Issue.Link}}" class="ui purple large label">{{svg "octicon-git-merge" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.pulls.merged"}}</a>
+									{{else if .LatestPullRequest.Issue.IsClosed}}
+										<a href="{{.LatestPullRequest.Issue.Link}}" class="ui red large label">{{svg "octicon-git-pull-request-closed" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.issues.closed_title"}}</a>
+									{{else}}
+										<a href="{{.LatestPullRequest.Issue.Link}}" class="ui green large label">{{svg "octicon-git-pull-request" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.issues.open_title"}}</a>
+									{{end}}
+								{{end}}
+							</td>
+							<td class="three wide right aligned overflow-visible">
+								{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}}
+									<button class="btn interact-bg tw-p-2 show-modal show-create-branch-modal"
+										data-branch-from="{{.DBBranch.Name}}"
+										data-branch-from-urlcomponent="{{PathEscapeSegments .DBBranch.Name}}"
+										data-tooltip-content="{{ctx.Locale.Tr "repo.branch.new_branch_from" .DBBranch.Name}}"
+										data-modal="#create-branch-modal" data-name="{{.DBBranch.Name}}"
+									>
+										{{svg "octicon-git-branch"}}
+									</button>
+								{{end}}
+								{{if $.EnableFeed}}
+									<a role="button" class="btn interact-bg tw-p-2" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss"}}</a>
+								{{end}}
+								{{if and (not .DBBranch.IsDeleted) (not $.DisableDownloadSourceArchives)}}
+									<div class="ui dropdown btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.download" (.DBBranch.Name)}}">
+										{{svg "octicon-download"}}
+										<div class="menu">
+											<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments .DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
+											<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments .DBBranch.Name}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;TAR.GZ</a>
+										</div>
+									</div>
+								{{end}}
+								{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted) (not $.IsMirror)}}
+									<button class="btn interact-bg tw-p-2 show-modal show-rename-branch-modal"
+										data-is-default-branch="false"
+										data-old-branch-name="{{.DBBranch.Name}}"
+										data-modal="#rename-branch-modal"
+										data-tooltip-content="{{ctx.Locale.Tr "repo.branch.rename" (.DBBranch.Name)}}"
+									>
+										{{svg "octicon-pencil"}}
+									</button>
+								{{end}}
+								{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}}
+									{{if .DBBranch.IsDeleted}}
+										<button class="btn interact-bg tw-p-2 link-action restore-branch-button" data-url="{{$.Link}}/restore?branch_id={{.DBBranch.ID}}&name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.restore" (.DBBranch.Name)}}">
+											<span class="text blue">
+												{{svg "octicon-reply"}}
+											</span>
+										</button>
+									{{else}}
+										<button class="btn interact-bg tw-p-2 delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.delete" (.DBBranch.Name)}}" data-name="{{.DBBranch.Name}}">
+											{{svg "octicon-trash"}}
+										</button>
+									{{end}}
+								{{end}}
+							</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+		{{template "base/paginate" .}}
+	</div>
+</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.branch.delete_html"}} <span class="name"></span>
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.branch.delete_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+<div class="ui mini modal" id="create-branch-modal">
+	<div class="header">
+		{{ctx.Locale.Tr "repo.branch.new_branch"}}
+	</div>
+
+	<form class="ui form" id="create-branch-form" action="" data-base-action="{{.Link}}/_new/branch/" method="post">
+		<div class="content">
+			{{.CsrfTokenHtml}}
+			<div class="field">
+				{{ctx.Locale.Tr "repo.branch.create_new_branch"}}
+				<span id="modal-create-branch-from-span"></span>
+			</div>
+			<div class="required field">
+				<label for="new_branch_name">{{ctx.Locale.Tr "repo.branch.name"}}</label>
+				<input id="new_branch_name" name="new_branch_name" required>
+			</div>
+		</div>
+		{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+	</form>
+</div>
+
+<div class="ui mini modal" id="rename-branch-modal">
+	<div class="header">
+		{{ctx.Locale.Tr "repo.settings.rename_branch"}}
+	</div>
+	<form class="ui form" action="{{$.Repository.Link}}/branches/rename" method="post">
+		<div class="content">
+			{{.CsrfTokenHtml}}
+			<div class="field default-branch-warning">
+				<span class="text red">{{ctx.Locale.Tr "repo.branch.warning_rename_default_branch"}}</span>
+			</div>
+			<div class="field">
+				<span class="text" data-rename-branch-to="{{ctx.Locale.Tr "repo.branch.rename_branch_to"}}"></span>
+			</div>
+			<input name="from" type="hidden" required>
+			<div class="required field">
+				<input name="to" required>
+			</div>
+		</div>
+		{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+	</form>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/branch_dropdown.tmpl b/repo/branch_dropdown.tmpl
new file mode 100644
index 0000000..6efed34
--- /dev/null
+++ b/repo/branch_dropdown.tmpl
@@ -0,0 +1,63 @@
+{{/* Attributes:
+* ContainerClasses
+* Repository
+* CurrentRefType: eg. "branch", "tag", "commit"
+* CurrentRefShortName: eg. "master", "v1.0", "abcdef0123"
+* CurrentTreePath
+* RefLinkTemplate: redirect to the link when a branch/tag is selected
+* RefFormActionTemplate: change the parent form's action when a branch/tag is selected
+* DropdownFixedText: the text to show in the dropdown (mainly used by "release page"), if empty, the text will be the branch/tag name
+* ShowTabBranches
+* ShowTabTagsTab
+* AllowCreateNewRef
+* ShowViewAllRefsEntry
+
+Search "repo/branch_dropdown" in the template directory to find all occurrences.
+*/}}
+<div class="js-branch-tag-selector {{if .ContainerClasses}}{{.ContainerClasses}}{{end}}"
+	data-text-release-compare="{{ctx.Locale.Tr "repo.release.compare"}}"
+	data-text-branches="{{ctx.Locale.Tr "repo.branches"}}"
+	data-text-tags="{{ctx.Locale.Tr "repo.tags"}}"
+	data-text-filter-branch="{{ctx.Locale.Tr "repo.pulls.filter_branch"}}"
+	data-text-filter-tag="{{ctx.Locale.Tr "repo.find_tag"}}"
+	data-text-default-branch-label="{{ctx.Locale.Tr "repo.default_branch_label"}}"
+	data-text-create-tag="{{ctx.Locale.Tr "repo.tag.create_tag"}}"
+	data-text-create-branch="{{ctx.Locale.Tr "repo.branch.create_branch"}}"
+	data-text-create-ref-from="{{ctx.Locale.Tr "repo.branch.create_from"}}"
+	data-text-no-results="{{ctx.Locale.Tr "no_results_found"}}"
+	data-text-view-all-branches="{{ctx.Locale.Tr "repo.view_all_branches"}}"
+	data-text-view-all-tags="{{ctx.Locale.Tr "repo.view_all_tags"}}"
+
+	data-current-repo-default-branch="{{.Repository.DefaultBranch}}"
+	data-current-repo-link="{{.Repository.Link}}"
+	data-current-tree-path="{{.CurrentTreePath}}"
+	data-current-ref-type="{{.CurrentRefType}}"
+	data-current-ref-short-name="{{.CurrentRefShortName}}"
+
+	data-ref-link-template="{{.RefLinkTemplate}}"
+	data-ref-form-action-template="{{.RefFormActionTemplate}}"
+	data-dropdown-fixed-text="{{.DropdownFixedText}}"
+	data-show-tab-branches="{{.ShowTabBranches}}"
+	data-show-tab-tags="{{.ShowTabTags}}"
+	data-allow-create-new-ref="{{.AllowCreateNewRef}}"
+	data-show-view-all-refs-entry="{{.ShowViewAllRefsEntry}}"
+
+	data-enable-feed="{{ctx.RootData.EnableFeed}}"
+>
+	{{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}}
+	<div class="ui dropdown custom branch-selector-dropdown ellipsis-items-nowrap">
+		<div class="ui button branch-dropdown-button">
+			<span class="flex-text-block gt-ellipsis">
+				{{if not .DropdownFixedText}}
+					{{if .ShowTabTags}}
+						{{svg "octicon-tag"}}
+					{{else if .ShowTabBranches}}
+						{{svg "octicon-git-branch"}}
+					{{end}}
+				{{end}}
+				<strong class="tw-ml-2 tw-inline-block gt-ellipsis">{{Iif .DropdownFixedText .SelectedRefShortName}}</strong>
+			</span>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+		</div>
+	</div>
+</div>
diff --git a/repo/cite/cite_buttons.tmpl b/repo/cite/cite_buttons.tmpl
new file mode 100644
index 0000000..426ca38
--- /dev/null
+++ b/repo/cite/cite_buttons.tmpl
@@ -0,0 +1,11 @@
+<button class="ui citation button" id="citation-copy-apa" data-text="">
+APA
+</button>
+<button class="ui citation button" id="citation-copy-bibtex" data-text="">
+BibTeX
+</button>
+<!-- the value will be updated by initCitationFileCopyContent, the code below is used to avoid UI flicking  -->
+<input id="citation-copy-content" value="" size="1" readonly>
+<button class="ui icon button" id="citation-clipboard-btn" data-tooltip-content="{{ctx.Locale.Tr "copy"}}" data-clipboard-target="#citation-copy-content">
+	{{svg "octicon-copy"}}
+</button>
diff --git a/repo/cite/cite_modal.tmpl b/repo/cite/cite_modal.tmpl
new file mode 100644
index 0000000..fb25144
--- /dev/null
+++ b/repo/cite/cite_modal.tmpl
@@ -0,0 +1,20 @@
+<div class="ui small modal" id="cite-repo-modal">
+	<div class="header">
+		{{ctx.Locale.Tr "repo.cite_this_repo"}}
+	</div>
+	<div class="content">
+		<div class="ui stackable secondary menu">
+			<div class="ui action input" id="citation-panel">
+				{{template "repo/cite/cite_buttons" .}}
+				<a id="goto-citation-btn" class="ui basic jump icon button" href="{{$.RepoLink}}/src/{{$.BranchName}}/CITATION.cff" data-tooltip-content="{{ctx.Locale.Tr "repo.find_file.go_to_file"}}">
+					{{svg "octicon-file-moved"}}
+				</a>
+			</div>
+		</div>
+	</div>
+	<div class="actions">
+		<button class="ui cancel button">
+			{{ctx.Locale.Tr "cancel"}}
+		</button>
+	</div>
+</div>
diff --git a/repo/clone_buttons.tmpl b/repo/clone_buttons.tmpl
new file mode 100644
index 0000000..03b7a56
--- /dev/null
+++ b/repo/clone_buttons.tmpl
@@ -0,0 +1,13 @@
+<!-- there is always at least one button (guaranteed by context/repo.go) -->
+<div class="ui action small input clone-buttons-combo">
+	{{if $.CloneButtonShowHTTPS}}
+		<button class="ui small button repo-clone-https" data-link="{{$.CloneButtonOriginLink.HTTPS}}">HTTPS</button>
+	{{end}}
+	{{if $.CloneButtonShowSSH}}
+		<button class="ui small button repo-clone-ssh" data-link="{{$.CloneButtonOriginLink.SSH}}">SSH</button>
+	{{end}}
+	<input size="10" class="repo-clone-url js-clone-url" value="{{$.CloneButtonOriginLink.HTTPS}}" readonly>
+	<button class="ui small icon button" data-clipboard-target=".repo-clone-url" data-tooltip-content="{{ctx.Locale.Tr "copy_url"}}">
+		{{svg "octicon-copy" 14}}
+	</button>
+</div>
diff --git a/repo/clone_panel.tmpl b/repo/clone_panel.tmpl
new file mode 100644
index 0000000..1937083
--- /dev/null
+++ b/repo/clone_panel.tmpl
@@ -0,0 +1,45 @@
+<button class="ui primary button js-btn-clone-panel">
+	{{svg "octicon-code" 16}}
+	<span>Code</span>
+	{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+</button>
+<div class="clone-panel-popup tippy-target">
+	<div class="flex-text-block clone-panel-field">{{svg "octicon-terminal"}} Clone</div>
+
+	<div class="clone-panel-tab">
+		<!-- there is always at least one button (guaranteed by context/repo.go) -->
+		{{if $.CloneButtonShowHTTPS}}
+			<button class="item repo-clone-https" data-link="{{$.CloneButtonOriginLink.HTTPS}}">HTTPS</button>
+		{{end}}
+		{{if $.CloneButtonShowSSH}}
+			<button class="item repo-clone-ssh" data-link="{{$.CloneButtonOriginLink.SSH}}">SSH</button>
+		{{end}}
+	</div>
+	<div class="divider"></div>
+
+	<div class="clone-panel-field">
+		<div class="ui input tiny action">
+			<input size="30" class="repo-clone-url js-clone-url" value="{{$.CloneButtonOriginLink.HTTPS}}" readonly>
+			<div class="ui small compact icon button" data-clipboard-target=".js-clone-url" data-tooltip-content="{{ctx.Locale.Tr "copy_url"}}">
+				{{svg "octicon-copy" 14}}
+			</div>
+		</div>
+	</div>
+
+	{{if not .PageIsWiki}}
+		<div class="flex-items-block clone-panel-list">
+			{{range .OpenWithEditorApps}}
+			<a class="item muted js-clone-url-editor" data-href-template="{{.OpenURL}}">{{.IconHTML}}{{ctx.Locale.Tr "repo.open_with_editor" .DisplayName}}</a>
+			{{end}}
+		</div>
+
+		{{if and (not $.DisableDownloadSourceArchives) $.RefName}}
+		<div class="divider"></div>
+		<div class="flex-items-block clone-panel-list">
+				<a class="item muted archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefName}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} {{ctx.Locale.Tr "repo.download_zip"}}</a>
+				<a class="item muted archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefName}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}} {{ctx.Locale.Tr "repo.download_tar"}}</a>
+				<a class="item muted archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefName}}.bundle" rel="nofollow">{{svg "octicon-package"}} {{ctx.Locale.Tr "repo.download_bundle"}}</a>
+		</div>
+		{{end}}
+	{{end}}
+</div>
diff --git a/repo/code/recently_pushed_new_branches.tmpl b/repo/code/recently_pushed_new_branches.tmpl
new file mode 100644
index 0000000..f0edf60
--- /dev/null
+++ b/repo/code/recently_pushed_new_branches.tmpl
@@ -0,0 +1,12 @@
+{{range .RecentlyPushedNewBranches}}
+	<div class="ui positive message tw-flex tw-items-center tw-gap-2">
+		<div class="tw-flex-1 tw-break-anywhere">
+			{{$timeSince := DateUtils.TimeSince .CommitTime}}
+			{{$branchLink := HTMLFormat `<a href="%s">%s</a>` .BranchLink .BranchDisplayName}}
+			{{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $branchLink $timeSince}}
+		</div>
+		<a role="button" class="ui compact green button tw-m-0" href="{{.BranchCompareURL}}">
+			{{ctx.Locale.Tr "repo.pulls.compare_changes"}}
+		</a>
+	</div>
+{{end}}
diff --git a/repo/code/upstream_diverging_info.tmpl b/repo/code/upstream_diverging_info.tmpl
new file mode 100644
index 0000000..b3d35c0
--- /dev/null
+++ b/repo/code/upstream_diverging_info.tmpl
@@ -0,0 +1,23 @@
+{{if and .UpstreamDivergingInfo .UpstreamDivergingInfo.BaseBranchHasNewCommits}}
+<div class="ui message flex-text-block">
+	<div class="tw-flex-1">
+		{{$upstreamLink := printf "%s/src/branch/%s" .Repository.BaseRepo.Link (.UpstreamDivergingInfo.BaseBranchName|PathEscapeSegments)}}
+		{{$upstreamRepoBranchDisplay := HTMLFormat "%s:%s" .Repository.BaseRepo.FullName .UpstreamDivergingInfo.BaseBranchName}}
+		{{$thisRepoBranchDisplay := HTMLFormat "%s:%s" .Repository.FullName .BranchName}}
+		{{$upstreamHtml := HTMLFormat `<a href="%s">%s</a>` $upstreamLink $upstreamRepoBranchDisplay}}
+		{{if .UpstreamDivergingInfo.HeadBranchCommitsBehind}}
+			{{ctx.Locale.TrN .UpstreamDivergingInfo.HeadBranchCommitsBehind "repo.pulls.upstream_diverging_prompt_behind_1" "repo.pulls.upstream_diverging_prompt_behind_n" .UpstreamDivergingInfo.HeadBranchCommitsBehind $upstreamHtml}}
+		{{else}}
+			{{ctx.Locale.Tr "repo.pulls.upstream_diverging_prompt_base_newer" $upstreamHtml}}
+		{{end}}
+	</div>
+	{{if .CanWriteCode}}
+	<button class="ui compact primary button tw-m-0 link-action"
+					data-modal-confirm-header="{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge"}}"
+					data-modal-confirm-content="{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge_confirm" $upstreamRepoBranchDisplay $thisRepoBranchDisplay}}"
+					data-url="{{.Repository.Link}}/branches/merge-upstream?branch={{.BranchName}}">
+		{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge"}}
+	</button>
+	{{end}}
+</div>
+{{end}}
diff --git a/repo/code_frequency.tmpl b/repo/code_frequency.tmpl
new file mode 100644
index 0000000..79b45d4
--- /dev/null
+++ b/repo/code_frequency.tmpl
@@ -0,0 +1,9 @@
+{{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
+	<div id="repo-code-frequency-chart"
+		data-locale-loading-title="{{ctx.Locale.Tr "graphs.component_loading" (ctx.Locale.Tr "graphs.code_frequency.what")}}"
+		data-locale-loading-title-failed="{{ctx.Locale.Tr "graphs.component_loading_failed" (ctx.Locale.Tr "graphs.code_frequency.what")}}"
+		data-locale-loading-info="{{ctx.Locale.Tr "graphs.component_loading_info"}}"
+		data-locale-component-failed-to-load="{{ctx.Locale.Tr "graphs.component_failed_to_load"}}"
+	>
+	</div>
+{{end}}
diff --git a/repo/commit_load_branches_and_tags.tmpl b/repo/commit_load_branches_and_tags.tmpl
new file mode 100644
index 0000000..ffa0e53
--- /dev/null
+++ b/repo/commit_load_branches_and_tags.tmpl
@@ -0,0 +1,20 @@
+{{if not .PageIsWiki}}
+<div class="branch-and-tag-area" data-text-default-branch-tooltip="{{ctx.Locale.Tr "repo.commit.contained_in_default_branch"}}">
+	<button class="ui button ellipsis-button load-branches-and-tags tw-mt-2" aria-expanded="false"
+		data-fetch-url="{{.RepoLink}}/commit/{{.CommitID}}/load-branches-and-tags"
+		data-tooltip-content="{{ctx.Locale.Tr "repo.commit.load_referencing_branches_and_tags"}}"
+	>...</button>
+	<div class="branch-and-tag-detail tw-hidden">
+		<div class="divider"></div>
+		<div>{{ctx.Locale.Tr "repo.commit.contained_in"}}</div>
+		<div class="tw-flex tw-mt-2">
+			<div class="tw-p-1">{{svg "octicon-git-branch"}}</div>
+			<div class="branch-area flex-text-block tw-flex-wrap tw-flex-1"></div>
+		</div>
+		<div class="tw-flex tw-mt-2">
+			<div class="tw-p-1">{{svg "octicon-tag"}}</div>
+			<div class="tag-area flex-text-block tw-flex-wrap tw-flex-1"></div>
+		</div>
+	</div>
+</div>
+{{end}}
diff --git a/repo/commit_page.tmpl b/repo/commit_page.tmpl
new file mode 100644
index 0000000..38e3df8
--- /dev/null
+++ b/repo/commit_page.tmpl
@@ -0,0 +1,288 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository diff">
+	{{template "repo/header" .}}
+	<div class="ui container fluid padded">
+		{{$class := ""}}
+		{{if .Commit.Signature}}
+			{{$class = (print $class " isSigned")}}
+			{{if .Verification.Verified}}
+				{{if eq .Verification.TrustStatus "trusted"}}
+					{{$class = (print $class " isVerified")}}
+				{{else if eq .Verification.TrustStatus "untrusted"}}
+					{{$class = (print $class " isVerifiedUntrusted")}}
+				{{else}}
+					{{$class = (print $class " isVerifiedUnmatched")}}
+				{{end}}
+			{{else if .Verification.Warning}}
+				{{$class = (print $class " isWarning")}}
+			{{end}}
+		{{end}}
+		<div class="ui top attached header clearing segment tw-relative commit-header {{$class}}">
+			<div class="tw-flex tw-mb-4 tw-gap-1">
+				<h3 class="tw-mb-0 tw-flex-1"><span class="commit-summary" title="{{.Commit.Summary}}">{{ctx.RenderUtils.RenderCommitMessage .Commit.Message ($.Repository.ComposeMetas ctx)}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}</h3>
+				{{if not $.PageIsWiki}}
+					<div class="commit-header-buttons">
+						<a class="ui primary tiny button" href="{{.SourcePath}}">
+							{{ctx.Locale.Tr "repo.diff.browse_source"}}
+						</a>
+						{{if and ($.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) (not $.Repository.IsArchived) (not .IsDeleted)}}{{- /* */ -}}
+							<div class="ui dropdown primary tiny button">
+								{{ctx.Locale.Tr "repo.commit.operations"}}
+								{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+								<div class="menu">
+									<div class="header">{{ctx.Locale.Tr "repo.commit.operations"}}</div>
+									<div class="divider"></div>
+									<div class="item show-create-branch-modal"
+										data-content="{{ctx.Locale.Tr "repo.branch.new_branch_from" (.CommitID)}}" {{/* used by the form */}}
+										data-branch-from="{{ShortSha .CommitID}}"
+										data-branch-from-urlcomponent="{{.CommitID}}"
+										data-modal="#create-branch-modal">
+										{{ctx.Locale.Tr "repo.branch.create_branch_operation"}}
+									</div>
+									<div class="item show-create-branch-modal"
+										data-content="{{ctx.Locale.Tr "repo.branch.new_branch_from" (.CommitID)}}" {{/* used by the form */}}
+										data-branch-from="{{ShortSha .CommitID}}"
+										data-branch-from-urlcomponent="{{.CommitID}}"
+										data-modal="#create-tag-modal"
+										data-modal-from-span="#modal-create-tag-from-span"
+										data-modal-form="#create-tag-form">
+										{{ctx.Locale.Tr "repo.tag.create_tag_operation"}}
+									</div>
+									<div class="item show-modal revert-button"
+										data-modal="#cherry-pick-modal"
+										data-modal-cherry-pick-type="revert"
+										data-modal-cherry-pick-header="{{ctx.Locale.Tr "repo.commit.revert-header" (ShortSha .CommitID)}}"
+										data-modal-cherry-pick-content="{{ctx.Locale.Tr "repo.commit.revert-content"}}"
+										data-modal-cherry-pick-submit="{{ctx.Locale.Tr "repo.commit.revert"}}">{{ctx.Locale.Tr "repo.commit.revert"}}</div>
+									<div class="item cherry-pick-button show-modal"
+										data-modal="#cherry-pick-modal"
+										data-modal-cherry-pick-type="cherry-pick"
+										data-modal-cherry-pick-header="{{ctx.Locale.Tr "repo.commit.cherry-pick-header" (ShortSha .CommitID)}}"
+										data-modal-cherry-pick-content="{{ctx.Locale.Tr "repo.commit.cherry-pick-content"}}"
+										data-modal-cherry-pick-submit="{{ctx.Locale.Tr "repo.commit.cherry-pick"}}">{{ctx.Locale.Tr "repo.commit.cherry-pick"}}</div>
+									<div class="ui g-modal-confirm modal" id="cherry-pick-modal">
+										<div class="header">
+											<span id="cherry-pick-header"></span>
+										</div>
+										<div class="content">
+											<p id="cherry-pick-content" class="branch-dropdown"></p>
+
+											<form method="get">
+												{{/*FIXME: CurrentRefShortName seems not making sense here (old code),
+												because the "commit page" has no "$.BranchName" info, so only using DefaultBranch should be enough */}}
+												{{template "repo/branch_dropdown" dict
+													"Repository" .Repository
+													"ShowTabBranches" true
+													"CurrentRefType" "branch"
+													"CurrentRefShortName" (or $.BranchName $.Repository.DefaultBranch)
+													"RefFormActionTemplate" (print "{RepoLink}/_cherrypick/" .CommitID "/{RefShortName}")
+												}}
+												<input type="hidden" id="cherry-pick-type" name="cherry-pick-type"><br>
+												<button type="submit" id="cherry-pick-submit" class="ui primary button"></button>
+											</form>
+										</div>
+									</div>
+									<div class="ui small modal" id="create-branch-modal">
+										<div class="header">
+											{{ctx.Locale.Tr "repo.branch.new_branch"}}
+										</div>
+										<div class="content">
+											<form class="ui form" id="create-branch-form" action="" data-base-action="{{.RepoLink}}/branches/_new/commit/" method="post">
+												{{.CsrfTokenHtml}}
+												<div class="field">
+													<label>
+														{{ctx.Locale.Tr "repo.branch.new_branch_from" (`<span class="text" id="modal-create-branch-from-span"></span>`|SafeHTML)}}
+													</label>
+												</div>
+												<div class="required field">
+													<label for="new_branch_name">{{ctx.Locale.Tr "repo.branch.name"}}</label>
+													<input id="new_branch_name" name="new_branch_name" required>
+												</div>
+
+												<div class="text right actions">
+													<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+													<button class="ui primary button">{{ctx.Locale.Tr "repo.branch.confirm_create_branch"}}</button>
+												</div>
+											</form>
+										</div>
+									</div>
+									<div class="ui small modal" id="create-tag-modal">
+										<div class="header">
+											{{ctx.Locale.Tr "repo.tag.create_tag_operation"}}
+										</div>
+										<div class="content">
+											<form class="ui form" id="create-tag-form" action="" data-base-action="{{.RepoLink}}/branches/_new/commit/" method="post">
+												{{.CsrfTokenHtml}}
+												<input type="hidden" name="create_tag" value="true">
+												<div class="field">
+													<label>
+														{{ctx.Locale.Tr "repo.tag.create_tag_from" (`<span class="text" id="modal-create-tag-from-span"></span>`|SafeHTML)}}
+													</label>
+												</div>
+												<div class="required field">
+													<label for="new_branch_name">{{ctx.Locale.Tr "repo.release.tag_name"}}</label>
+													<input id="new_branch_name" name="new_branch_name" required>
+												</div>
+
+												<div class="text right actions">
+													<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+													<button class="ui primary button">{{ctx.Locale.Tr "repo.tag.confirm_create_tag"}}</button>
+												</div>
+											</form>
+										</div>
+									</div>
+								</div>
+							</div>
+						{{end}}
+					</div>
+				{{end}}
+			</div>
+			{{if IsMultilineCommitMessage .Commit.Message}}
+				<pre class="commit-body">{{ctx.RenderUtils.RenderCommitBody .Commit.Message ($.Repository.ComposeMetas ctx)}}</pre>
+			{{end}}
+			{{template "repo/commit_load_branches_and_tags" .}}
+		</div>
+		<div class="ui{{if not .Commit.Signature}} bottom{{end}} attached segment tw-flex tw-items-center tw-justify-between tw-py-1 commit-header-row tw-flex-wrap {{$class}}">
+				<div class="tw-flex tw-items-center author">
+					{{if .Author}}
+						{{ctx.AvatarUtils.Avatar .Author 28 "tw-mr-2"}}
+						{{if .Author.FullName}}
+							<a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a>
+						{{else}}
+							<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
+						{{end}}
+					{{else}}
+						{{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "tw-mr-2"}}
+						<strong>{{.Commit.Author.Name}}</strong>
+					{{end}}
+					<span class="text grey tw-ml-2" id="authored-time">{{DateUtils.TimeSince .Commit.Author.When}}</span>
+					{{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}}
+						<span class="text grey tw-mx-2">{{ctx.Locale.Tr "repo.diff.committed_by"}}</span>
+						{{if ne .Verification.CommittingUser.ID 0}}
+							{{ctx.AvatarUtils.Avatar .Verification.CommittingUser 28 "tw-mx-2"}}
+							<a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a>
+						{{else}}
+							{{ctx.AvatarUtils.AvatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "tw-mr-2"}}
+							<strong>{{.Commit.Committer.Name}}</strong>
+						{{end}}
+					{{end}}
+				</div>
+				<div class="tw-flex tw-items-center">
+					{{if .Parents}}
+						<div>
+							<span>{{ctx.Locale.Tr "repo.diff.parent"}}</span>
+							{{range .Parents}}
+								{{if $.PageIsWiki}}
+									<a class="ui primary sha label" href="{{$.RepoLink}}/wiki/commit/{{PathEscape .}}">{{ShortSha .}}</a>
+								{{else}}
+									<a class="ui primary sha label" href="{{$.RepoLink}}/commit/{{PathEscape .}}">{{ShortSha .}}</a>
+								{{end}}
+							{{end}}
+						</div>
+					{{end}}
+					<div class="item">
+						<span>{{ctx.Locale.Tr "repo.diff.commit"}}</span>
+						<span class="ui primary sha label">{{ShortSha .CommitID}}</span>
+					</div>
+				</div>
+		</div>
+		{{if .Commit.Signature}}
+			<div class="ui bottom attached message tw-text-left tw-flex tw-items-center tw-justify-between commit-header-row tw-flex-wrap tw-mb-0 {{$class}}">
+				<div class="tw-flex tw-items-center">
+					{{if .Verification.Verified}}
+						{{if ne .Verification.SigningUser.ID 0}}
+							{{svg "gitea-lock" 16 "tw-mr-2"}}
+							{{if eq .Verification.TrustStatus "trusted"}}
+								<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by"}}:</span>
+							{{else if eq .Verification.TrustStatus "untrusted"}}
+								<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}:</span>
+							{{else}}
+								<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}:</span>
+							{{end}}
+							{{ctx.AvatarUtils.Avatar .Verification.SigningUser 28 "tw-mr-2"}}
+							<a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.GetDisplayName}}</strong></a>
+						{{else}}
+							<span title="{{ctx.Locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog" 16 "tw-mr-2"}}</span>
+							<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by"}}:</span>
+							{{ctx.AvatarUtils.AvatarByEmail .Verification.SigningEmail "" 28 "tw-mr-2"}}
+							<strong>{{.Verification.SigningUser.GetDisplayName}}</strong>
+						{{end}}
+					{{else}}
+						{{svg "gitea-unlock" 16 "tw-mr-2"}}
+						<span class="ui text">{{ctx.Locale.Tr .Verification.Reason}}</span>
+					{{end}}
+				</div>
+				<div class="tw-flex tw-items-center">
+					{{if .Verification.Verified}}
+						{{if ne .Verification.SigningUser.ID 0}}
+							{{svg "octicon-verified" 16 "tw-mr-2"}}
+							{{if .Verification.SigningSSHKey}}
+								<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
+								{{.Verification.SigningSSHKey.Fingerprint}}
+							{{else}}
+								<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
+								{{.Verification.SigningKey.PaddedKeyID}}
+							{{end}}
+						{{else}}
+							{{svg "octicon-unverified" 16 "tw-mr-2"}}
+							{{if .Verification.SigningSSHKey}}
+								<span class="ui text tw-mr-2" data-tooltip-content="{{ctx.Locale.Tr "gpg.default_key"}}">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
+								{{.Verification.SigningSSHKey.Fingerprint}}
+							{{else}}
+								<span class="ui text tw-mr-2" data-tooltip-content="{{ctx.Locale.Tr "gpg.default_key"}}">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
+								{{.Verification.SigningKey.PaddedKeyID}}
+							{{end}}
+						{{end}}
+					{{else if .Verification.Warning}}
+						{{svg "octicon-unverified" 16 "tw-mr-2"}}
+						{{if .Verification.SigningSSHKey}}
+							<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
+							{{.Verification.SigningSSHKey.Fingerprint}}
+						{{else}}
+							<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
+							{{.Verification.SigningKey.PaddedKeyID}}
+						{{end}}
+					{{else}}
+						{{if .Verification.SigningKey}}
+							{{if ne .Verification.SigningKey.KeyID ""}}
+								{{svg "octicon-verified" 16 "tw-mr-2"}}
+								<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
+								{{.Verification.SigningKey.PaddedKeyID}}
+							{{end}}
+						{{end}}
+						{{if .Verification.SigningSSHKey}}
+							{{if ne .Verification.SigningSSHKey.Fingerprint ""}}
+								{{svg "octicon-verified" 16 "tw-mr-2"}}
+								<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
+								{{.Verification.SigningSSHKey.Fingerprint}}
+							{{end}}
+						{{end}}
+					{{end}}
+				</div>
+			</div>
+		{{end}}
+		{{if .NoteRendered}}
+			<div class="ui top attached header segment git-notes">
+				{{svg "octicon-note" 16 "tw-mr-2"}}
+				{{ctx.Locale.Tr "repo.diff.git-notes"}}:
+				{{if .NoteAuthor}}
+					<a href="{{.NoteAuthor.HomeLink}}">
+						{{if .NoteAuthor.FullName}}
+							<strong>{{.NoteAuthor.FullName}}</strong>
+						{{else}}
+							<strong>{{.NoteCommit.Author.Name}}</strong>
+						{{end}}
+					</a>
+				{{else}}
+					<strong>{{.NoteCommit.Author.Name}}</strong>
+				{{end}}
+				<span class="text grey" id="note-authored-time">{{DateUtils.TimeSince .NoteCommit.Author.When}}</span>
+			</div>
+			<div class="ui bottom attached info segment git-notes">
+				<pre class="commit-body">{{.NoteRendered | SanitizeHTML}}</pre>
+			</div>
+		{{end}}
+		{{template "repo/diff/box" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/commit_status.tmpl b/repo/commit_status.tmpl
new file mode 100644
index 0000000..eb700ab
--- /dev/null
+++ b/repo/commit_status.tmpl
@@ -0,0 +1,16 @@
+<!-- make sure this matches the color logic in web_src/js/components/DashboardRepoList.vue -->
+{{if eq .State "pending"}}
+	{{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}}
+{{end}}
+{{if eq .State "success"}}
+	{{svg "octicon-check" 18 "commit-status icon text green"}}
+{{end}}
+{{if eq .State "error"}}
+	{{svg "gitea-exclamation" 18 "commit-status icon text red"}}
+{{end}}
+{{if eq .State "failure"}}
+	{{svg "octicon-x" 18 "commit-status icon text red"}}
+{{end}}
+{{if eq .State "warning"}}
+	{{svg "gitea-exclamation" 18 "commit-status icon text yellow"}}
+{{end}}
diff --git a/repo/commit_statuses.tmpl b/repo/commit_statuses.tmpl
new file mode 100644
index 0000000..a6f7558
--- /dev/null
+++ b/repo/commit_statuses.tmpl
@@ -0,0 +1,14 @@
+{{if .Statuses}}
+	{{if and (eq (len .Statuses) 1) .Status.TargetURL}}
+		<a class="flex-text-inline tw-no-underline {{.AdditionalClasses}}" data-tippy="commit-statuses" href="{{.Status.TargetURL}}">
+			{{template "repo/commit_status" .Status}}
+		</a>
+	{{else}}
+		<span class="flex-text-inline {{.AdditionalClasses}}" data-tippy="commit-statuses" tabindex="0">
+			{{template "repo/commit_status" .Status}}
+		</span>
+	{{end}}
+	<div class="tippy-target">
+		{{template "repo/pulls/status" (dict "CommitStatuses" .Statuses "CommitStatus" .Status)}}
+	</div>
+{{end}}
diff --git a/repo/commits.tmpl b/repo/commits.tmpl
new file mode 100644
index 0000000..d80d4ac
--- /dev/null
+++ b/repo/commits.tmpl
@@ -0,0 +1,39 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository commits">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "repo/sub_menu" .}}
+		<div class="repo-button-row">
+			<div class="repo-button-row-left">
+				{{- /* for /owner/repo/commits/branch/the-name */ -}}
+				{{- $branchDropdownCurrentRefType := "branch" -}}
+				{{- $branchDropdownCurrentRefShortName := .BranchName -}}
+				{{- if .IsViewTag -}}
+					{{- /* for /owner/repo/commits/tag/the-name */ -}}
+					{{- $branchDropdownCurrentRefType = "tag" -}}
+					{{- $branchDropdownCurrentRefShortName = .TagName -}}
+				{{- else if .IsViewCommit -}}
+					{{- /* for /owner/repo/commits/commit/000000 */ -}}
+					{{- $branchDropdownCurrentRefType = "commit" -}}
+					{{- $branchDropdownCurrentRefShortName = ShortSha .CommitID -}}
+				{{- end -}}
+				{{- template "repo/branch_dropdown" dict
+					"Repository" .Repository
+					"ShowTabBranches" true
+					"ShowTabTags" true
+					"CurrentRefType" $branchDropdownCurrentRefType
+					"CurrentRefShortName" $branchDropdownCurrentRefShortName
+					"CurrentTreePath" .TreePath
+					"RefLinkTemplate" "{RepoLink}/commits/{RefType}/{RefShortName}/{TreePath}"
+					"AllowCreateNewRef" .CanCreateBranch
+				-}}
+				<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
+					{{svg "octicon-git-branch"}}
+					{{ctx.Locale.Tr "repo.commit_graph"}}
+				</a>
+			</div>
+		</div>
+		{{template "repo/commits_table" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/commits_list.tmpl b/repo/commits_list.tmpl
new file mode 100644
index 0000000..50b754c
--- /dev/null
+++ b/repo/commits_list.tmpl
@@ -0,0 +1,98 @@
+<div class="ui attached table segment commit-table">
+	<table class="ui very basic striped table unstackable" id="commits-table">
+		<thead>
+			<tr>
+				<th class="three wide">{{ctx.Locale.Tr "repo.commits.author"}}</th>
+				<th class="two wide sha">{{StringUtils.ToUpper $.Repository.ObjectFormatName}}</th>
+				<th class="eight wide message">{{ctx.Locale.Tr "repo.commits.message"}}</th>
+				<th class="two wide right aligned">{{ctx.Locale.Tr "repo.commits.date"}}</th>
+				<th class="one wide"></th>
+			</tr>
+		</thead>
+		<tbody class="commit-list">
+			{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
+			{{range .Commits}}
+				<tr>
+					<td class="author">
+						<div class="tw-flex">
+							{{$userName := .Author.Name}}
+							{{if .User}}
+								{{if and .User.FullName DefaultShowFullName}}
+									{{$userName = .User.FullName}}
+								{{end}}
+								{{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}<a class="muted author-wrapper" href="{{.User.HomeLink}}">{{$userName}}</a>
+							{{else}}
+								{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}}
+								<span class="author-wrapper">{{$userName}}</span>
+							{{end}}
+						</div>
+					</td>
+					<td class="sha">
+						{{$class := "ui sha label"}}
+						{{if .Signature}}
+							{{$class = (print $class " isSigned")}}
+							{{if .Verification.Verified}}
+								{{if eq .Verification.TrustStatus "trusted"}}
+									{{$class = (print $class " isVerified")}}
+								{{else if eq .Verification.TrustStatus "untrusted"}}
+									{{$class = (print $class " isVerifiedUntrusted")}}
+								{{else}}
+									{{$class = (print $class " isVerifiedUnmatched")}}
+								{{end}}
+							{{else if .Verification.Warning}}
+								{{$class = (print $class " isWarning")}}
+							{{end}}
+						{{end}}
+						{{$commitShaLink := ""}}
+						{{if $.PageIsWiki}}
+							{{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}}
+						{{else if $.PageIsPullCommits}}
+							{{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}}
+						{{else if $.Reponame}}
+							{{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}}
+						{{end}}
+						<a {{if $commitShaLink}}href="{{$commitShaLink}}"{{end}} class="{{$class}}">
+							<span class="shortsha">{{ShortSha .ID.String}}</span>
+							{{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}}
+						</a>
+					</td>
+					<td class="message">
+						<span class="message-wrapper">
+						{{if $.PageIsWiki}}
+							<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | ctx.RenderUtils.RenderEmoji}}</span>
+						{{else}}
+							{{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}}
+							<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{ctx.RenderUtils.RenderCommitMessageLinkSubject .Message $commitLink ($.Repository.ComposeMetas ctx)}}</span>
+						{{end}}
+						</span>
+						{{if IsMultilineCommitMessage .Message}}
+						<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
+						{{end}}
+						{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
+						{{if IsMultilineCommitMessage .Message}}
+						<pre class="commit-body tw-hidden">{{ctx.RenderUtils.RenderCommitBody .Message ($.Repository.ComposeMetas ctx)}}</pre>
+						{{end}}
+						{{if $.CommitsTagsMap}}
+							{{range (index $.CommitsTagsMap .ID.String)}}
+								{{- template "repo/tag/name" dict "RepoLink" $.Repository.Link "TagName" .TagName "IsRelease" (not .IsTag) -}}
+							{{end}}
+						{{end}}
+					</td>
+					{{if .Committer}}
+						<td class="text right aligned">{{DateUtils.TimeSince .Committer.When}}</td>
+					{{else}}
+						<td class="text right aligned">{{DateUtils.TimeSince .Author.When}}</td>
+					{{end}}
+					<td class="text right aligned tw-py-0">
+						<button class="btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "copy_hash"}}" data-clipboard-text="{{.ID}}">{{svg "octicon-copy"}}</button>
+						{{if not $.PageIsWiki}}{{/* at the moment, wiki doesn't support "view at history point*/}}
+							{{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}}
+							{{if $.FileName}}{{$viewCommitLink = printf "%s/%s" $viewCommitLink (PathEscapeSegments $.FileName)}}{{end}}
+							<a class="btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "repo.commits.view_path"}}" href="{{$viewCommitLink}}">{{svg "octicon-file-code"}}</a>
+						{{end}}
+					</td>
+				</tr>
+			{{end}}
+		</tbody>
+	</table>
+</div>
diff --git a/repo/commits_list_small.tmpl b/repo/commits_list_small.tmpl
new file mode 100644
index 0000000..0657eab
--- /dev/null
+++ b/repo/commits_list_small.tmpl
@@ -0,0 +1,55 @@
+{{$index := 0}}
+<div class="timeline-item commits-list">
+{{range .comment.Commits}}
+	{{$tag := printf "%s-%d" $.comment.HashTag $index}}
+	{{$index = Eval $index "+" 1}}
+	<div class="singular-commit" id="{{$tag}}">
+		<span class="badge badge-commit">{{svg "octicon-git-commit"}}</span>
+		{{if .User}}
+			<a class="avatar" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20}}</a>
+		{{else}}
+			{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 20}}
+		{{end}}
+
+		{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}
+
+		<span class="tw-flex-1 tw-font-mono gt-ellipsis" title="{{.Summary}}">
+			{{- ctx.RenderUtils.RenderCommitMessageLinkSubject .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}}
+		</span>
+
+		{{if IsMultilineCommitMessage .Message}}
+			<button class="ui button ellipsis-button show-panel toggle" data-panel="[data-singular-commit-body-for='{{$tag}}']">...</button>
+		{{end}}
+
+		<span class="shabox tw-flex tw-items-center">
+			{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
+			{{$class := "ui sha label"}}
+			{{if .Signature}}
+				{{$class = (print $class " isSigned")}}
+				{{if .Verification.Verified}}
+					{{if eq .Verification.TrustStatus "trusted"}}
+						{{$class = (print $class " isVerified")}}
+					{{else if eq .Verification.TrustStatus "untrusted"}}
+						{{$class = (print $class " isVerifiedUntrusted")}}
+					{{else}}
+						{{$class = (print $class " isVerifiedUnmatched")}}
+					{{end}}
+				{{else if .Verification.Warning}}
+					{{$class = (print $class " isWarning")}}
+				{{end}}
+			{{end}}
+			<a href="{{$commitLink}}" rel="nofollow" class="tw-ml-2 {{$class}}">
+				<span class="shortsha">{{ShortSha .ID.String}}</span>
+				{{if .Signature}}
+					{{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}}
+				{{end}}
+			</a>
+		</span>
+	</div>
+	{{if IsMultilineCommitMessage .Message}}
+	<pre class="commit-body tw-ml-[33px] tw-hidden" data-singular-commit-body-for="{{$tag}}">
+		{{- ctx.RenderUtils.RenderCommitBody .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}}
+	</pre>
+	{{end}}
+{{end}}
+</div>
diff --git a/repo/commits_search_dropdown.tmpl b/repo/commits_search_dropdown.tmpl
new file mode 100644
index 0000000..5aa3f4f
--- /dev/null
+++ b/repo/commits_search_dropdown.tmpl
@@ -0,0 +1,8 @@
+<div class="ui small dropdown selection">
+	<input name="all" type="hidden" value="{{.All}}">{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	<div class="text">{{if .All}}{{ctx.Locale.Tr "repo.commits.search_all"}}{{else}}{{ctx.Locale.Tr "repo.commits.search_branch"}}{{end}}</div>
+	<div class="menu">
+		<div class="item" data-value="false">{{ctx.Locale.Tr "repo.commits.search_branch"}}</div>
+		<div class="item" data-value="true">{{ctx.Locale.Tr "repo.commits.search_all"}}</div>
+	</div>
+</div>
diff --git a/repo/commits_table.tmpl b/repo/commits_table.tmpl
new file mode 100644
index 0000000..91fc1c2
--- /dev/null
+++ b/repo/commits_table.tmpl
@@ -0,0 +1,36 @@
+<h4 class="ui top attached header commits-table tw-flex tw-items-center tw-justify-between">
+	<div class="commits-table-left tw-flex tw-items-center">
+		{{if or .PageIsCommits (gt .CommitCount 0)}}
+			{{.CommitCount}} {{ctx.Locale.Tr "repo.commits.commits"}}
+		{{else if .IsNothingToCompare}}
+			{{ctx.Locale.Tr "repo.commits.nothing_to_compare"}}
+		{{else}}
+			{{ctx.Locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}}
+		{{end}}
+	</div>
+	{{if .IsDiffCompare}}
+		<div class="commits-table-right tw-whitespace-nowrap">
+			<a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID | PathEscape}}" class="ui green sha label tw-mx-0">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a>
+			...
+			<a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID | PathEscape}}" class="ui green sha label tw-mx-0">{{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{svg "octicon-git-branch"}}{{else if .HeadIsTag}}{{svg "octicon-tag"}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}}</a>
+		</div>
+	{{end}}
+</h4>
+
+{{if .PageIsCommits}}
+	<div class="ui attached segment">
+		<form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
+			<div class="ui small fluid action input">
+				{{template "shared/search/input" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.commit_kind")}}
+				{{template "repo/commits_search_dropdown" .}}
+				{{template "shared/search/button" dict "Tooltip" (ctx.Locale.Tr "repo.commits.search.tooltip")}}
+			</div>
+		</form>
+	</div>
+{{end}}
+
+{{if and .Commits (gt .CommitCount 0)}}
+	{{template "repo/commits_list" .}}
+{{end}}
+
+{{template "base/paginate" .}}
diff --git a/repo/contributors.tmpl b/repo/contributors.tmpl
new file mode 100644
index 0000000..882d8b2
--- /dev/null
+++ b/repo/contributors.tmpl
@@ -0,0 +1,15 @@
+{{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
+	<div id="repo-contributors-chart"
+		data-repo-link="{{.RepoLink}}"
+		data-repo-default-branch-name="{{.Repository.DefaultBranch}}"
+		data-locale-filter-label="{{ctx.Locale.Tr "repo.contributors.contribution_type.filter_label"}}"
+		data-locale-contribution-type-commits="{{ctx.Locale.Tr "repo.contributors.contribution_type.commits"}}"
+		data-locale-contribution-type-additions="{{ctx.Locale.Tr "repo.contributors.contribution_type.additions"}}"
+		data-locale-contribution-type-deletions="{{ctx.Locale.Tr "repo.contributors.contribution_type.deletions"}}"
+		data-locale-loading-title="{{ctx.Locale.Tr "graphs.component_loading" (ctx.Locale.Tr "graphs.contributors.what")}}"
+		data-locale-loading-title-failed="{{ctx.Locale.Tr "graphs.component_loading_failed" (ctx.Locale.Tr "graphs.contributors.what")}}"
+		data-locale-loading-info="{{ctx.Locale.Tr "graphs.component_loading_info"}}"
+		data-locale-component-failed-to-load="{{ctx.Locale.Tr "graphs.component_failed_to_load"}}"
+	>
+	</div>
+{{end}}
diff --git a/repo/create.tmpl b/repo/create.tmpl
new file mode 100644
index 0000000..07d581b
--- /dev/null
+++ b/repo/create.tmpl
@@ -0,0 +1,220 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new repo">
+	<div class="ui middle very relaxed page one column grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "new_repo"}}
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					{{template "repo/create_helper" .}}
+					<div id="create-repo-error-message" class="ui negative message tw-text-center tw-hidden"></div>
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}" title="{{.SignedUser.Name}}"
+								{{if not .CanCreateRepo}}
+									data-create-repo-disallowed-prompt="{{ctx.Locale.TrN .MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .MaxCreationLimit}}"
+								{{end}}
+								>
+									{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+									<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}
+										<span class="truncated-item-name">{{.ShortName 40}}</span>
+									</div>
+								{{end}}
+							</div>
+						</div>
+						<span class="help">{{ctx.Locale.Tr "repo.owner_helper"}}</span>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required maxlength="100">
+						<span class="help">{{ctx.Locale.Tr "repo.repo_name_helper"}}</span>
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+						<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" rows="2" name="description" placeholder="{{ctx.Locale.Tr "repo.repo_desc_helper"}}" maxlength="2048">{{.description}}</textarea>
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.template"}}</label>
+						<div id="repo_template_search" class="ui search selection dropdown">
+							<input type="hidden" id="repo_template" name="repo_template" value="{{.repo_template}}">
+							<div class="default text">{{.repo_template_name}}</div>
+							<div class="menu">
+							</div>
+						</div>
+					</div>
+
+					<div id="template_units" class="tw-hidden">
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.template.items"}}</label>
+							<div class="ui checkbox">
+								<input name="git_content" type="checkbox" {{if .git_content}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.template.git_content"}}</label>
+							</div>
+							<div class="ui checkbox" {{if not .SignedUser.CanEditGitHook}}data-tooltip-content="{{ctx.Locale.Tr "repo.template.git_hooks_tooltip"}}"{{end}}>
+								<input name="git_hooks" type="checkbox" {{if .git_hooks}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.template.git_hooks"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="webhooks" type="checkbox" {{if .webhooks}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.template.webhooks"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="topics" type="checkbox" {{if .topics}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.template.topics"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="avatar" type="checkbox" {{if .avatar}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.template.avatar"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.template.issue_labels"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="protected_branch" type="checkbox" {{if .protected_branch}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.settings.protected_branch"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div id="non_template">
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.issue_labels"}}</label>
+							<div class="ui search selection dropdown">
+								<input type="hidden" name="issue_labels" value="{{.issueLabels}}">
+								<div class="default text">{{ctx.Locale.Tr "repo.issue_labels_helper"}}</div>
+								<div class="menu">
+									<div class="item" data-value="">{{ctx.Locale.Tr "repo.issue_labels_helper"}}</div>
+									{{range .LabelTemplateFiles}}
+										<div class="item" data-value="{{.DisplayName}}">{{.DisplayName}}<br><i>({{.Description}})</i></div>
+									{{end}}
+								</div>
+							</div>
+						</div>
+
+						<div class="divider"></div>
+
+						<div class="inline field">
+							<label>.gitignore</label>
+							<div class="ui multiple search selection dropdown">
+								<input type="hidden" name="gitignores" value="{{.gitignores}}">
+								<div class="default text">{{ctx.Locale.Tr "repo.repo_gitignore_helper"}}</div>
+								<div class="menu">
+									{{range .Gitignores}}
+										<div class="item" data-value="{{.}}">{{.}}</div>
+									{{end}}
+								</div>
+							</div>
+							<span class="help">{{ctx.Locale.Tr "repo.repo_gitignore_helper_desc"}}</span>
+						</div>
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.license"}}</label>
+							<div class="ui search selection dropdown">
+								<input type="hidden" name="license" value="{{.license}}">
+								<div class="default text">{{ctx.Locale.Tr "repo.license_helper"}}</div>
+								<div class="menu">
+									<div class="item" data-value="">{{ctx.Locale.Tr "repo.license_helper"}}</div>
+									{{range .Licenses}}
+										<div class="item" data-value="{{.}}">{{.}}</div>
+									{{end}}
+								</div>
+							</div>
+							<span class="help">{{ctx.Locale.Tr "repo.license_helper_desc" "https://choosealicense.com/"}}</span>
+						</div>
+
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.readme"}}</label>
+							<div class="ui selection dropdown">
+								<input type="hidden" name="readme" value="{{.readme}}">
+								<div class="default text">{{ctx.Locale.Tr "repo.readme_helper"}}</div>
+								<div class="menu">
+									{{range .Readmes}}
+										<div class="item" data-value="{{.}}">{{.}}</div>
+									{{end}}
+								</div>
+							</div>
+							<span class="help">{{ctx.Locale.Tr "repo.readme_helper_desc"}}</span>
+						</div>
+						<div class="inline field">
+							<div class="ui checkbox" id="auto-init">
+								<input name="auto_init" type="checkbox" {{if .auto_init}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.auto_init"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label for="default_branch">{{ctx.Locale.Tr "repo.default_branch"}}</label>
+							<input id="default_branch" name="default_branch" value="{{.default_branch}}" placeholder="{{.default_branch}}">
+							<span class="help">{{ctx.Locale.Tr "repo.default_branch_helper"}}</span>
+						</div>
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.object_format"}}</label>
+							<div class="ui selection owner dropdown">
+								<input type="hidden" id="object_format_name" name="object_format_name" value="{{.DefaultObjectFormat.Name}}" required>
+								<div class="default text">{{.DefaultObjectFormat.Name}}</div>
+								<div class="menu">
+									{{range .SupportedObjectFormats}}
+										<div class="item" data-value="{{.Name}}">{{.Name}}</div>
+									{{end}}
+								</div>
+							</div>
+							<span class="help">{{ctx.Locale.Tr "repo.object_format_helper"}}</span>
+						</div>
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.template"}}</label>
+							<div class="ui checkbox">
+								<input name="template" type="checkbox">
+								<label>{{ctx.Locale.Tr "repo.template_helper"}}</label>
+							</div>
+						</div>
+					</div>
+					<br>
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.create_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/create_helper.tmpl b/repo/create_helper.tmpl
new file mode 100644
index 0000000..70c28b7
--- /dev/null
+++ b/repo/create_helper.tmpl
@@ -0,0 +1,3 @@
+{{if not $.DisableMigrations}}
+	<p class="ui center">{{ctx.Locale.Tr "repo.new_repo_helper" (print AppSubUrl "/repo/migrate")}}</p>
+{{end}}
diff --git a/repo/diff/blob_excerpt.tmpl b/repo/diff/blob_excerpt.tmpl
new file mode 100644
index 0000000..cc22370
--- /dev/null
+++ b/repo/diff/blob_excerpt.tmpl
@@ -0,0 +1,82 @@
+{{if $.IsSplitStyle}}
+	{{range $k, $line := $.section.Lines}}
+	<tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}} line-expanded">
+		{{if eq .GetType 4}}
+			{{$expandDirection := $line.GetExpandDirection}}
+			<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}">
+				<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
+				{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
+					<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
+						{{svg "octicon-fold-down"}}
+					</button>
+				{{end}}
+				{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
+					<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
+						{{svg "octicon-fold-up"}}
+					</button>
+				{{end}}
+				{{if eq $expandDirection 2}}
+					<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
+						{{svg "octicon-fold"}}
+					</button>
+				{{end}}
+				</div>
+			</td>
+			<td colspan="7" class="lines-code lines-code-old ">{{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}}{{/*
+				*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}</td>
+		{{else}}
+			{{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}}
+			<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$.FileNameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
+			<td class="lines-escape lines-escape-old">{{if and $line.LeftIdx $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
+			<td class="lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="tw-font-mono" data-type-marker=""></span>{{end}}</td>
+			<td class="lines-code lines-code-old">{{/*
+				*/}}{{if $line.LeftIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/*
+					*/}}<code class="code-inner"></code>{{/*
+				*/}}{{end}}{{/*
+			*/}}</td>
+			<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$.FileNameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
+			<td class="lines-escape lines-escape-new">{{if and $line.RightIdx $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
+			<td class="lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="tw-font-mono" data-type-marker=""></span>{{end}}</td>
+			<td class="lines-code lines-code-new">{{/*
+				*/}}{{if $line.RightIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/*
+					*/}}<code class="code-inner"></code>{{/*
+				*/}}{{end}}{{/*
+			*/}}</td>
+		{{end}}
+	</tr>
+	{{end}}
+{{else}}
+	{{range $k, $line := $.section.Lines}}
+	<tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}} line-expanded">
+		{{if eq .GetType 4}}
+			{{$expandDirection := $line.GetExpandDirection}}
+			<td colspan="2" class="lines-num">
+				<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
+					{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
+						<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
+							{{svg "octicon-fold-down"}}
+						</button>
+					{{end}}
+					{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
+						<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
+							{{svg "octicon-fold-up"}}
+						</button>
+					{{end}}
+					{{if eq $expandDirection 2}}
+						<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
+							{{svg "octicon-fold"}}
+						</button>
+					{{end}}
+				</div>
+			</td>
+		{{else}}
+			<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$.FileNameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
+			<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$.FileNameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
+		{{end}}
+		{{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}}
+		<td class="lines-escape">{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
+		<td class="lines-type-marker"><span class="tw-font-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
+		<td class="lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}"><code {{if $inlineDiff.EscapeStatus.Escaped}}class="code-inner has-escaped" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"{{else}}class="code-inner"{{end}}>{{$inlineDiff.Content}}</code></td>
+	</tr>
+	{{end}}
+{{end}}
diff --git a/repo/diff/box.tmpl b/repo/diff/box.tmpl
new file mode 100644
index 0000000..53ea4fd
--- /dev/null
+++ b/repo/diff/box.tmpl
@@ -0,0 +1,265 @@
+{{$showFileTree := (and (not .DiffNotAvailable) (gt .Diff.NumFiles 1))}}
+<div>
+	<div class="diff-detail-box diff-box">
+		<div class="tw-flex tw-items-center tw-flex-wrap tw-gap-2 tw-ml-0.5">
+			{{if $showFileTree}}
+				<button class="diff-toggle-file-tree-button not-mobile btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
+					{{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}}
+					{{svg "octicon-sidebar-collapse" 20 "icon tw-hidden"}}
+					{{svg "octicon-sidebar-expand" 20 "icon tw-hidden"}}
+				</button>
+				<script>
+					// Default to true if unset
+					const diffTreeVisible = localStorage?.getItem('diff_file_tree_visible') !== 'false';
+					const diffTreeBtn = document.querySelector('.diff-toggle-file-tree-button');
+					const diffTreeIcon = `.octicon-sidebar-${diffTreeVisible ? 'expand' : 'collapse'}`;
+					diffTreeBtn.querySelector(diffTreeIcon).classList.remove('tw-hidden');
+					diffTreeBtn.setAttribute('data-tooltip-content', diffTreeBtn.getAttribute(diffTreeVisible ? 'data-hide-text' : 'data-show-text'));
+				</script>
+			{{end}}
+			{{if not .DiffNotAvailable}}
+				<div class="diff-detail-stats tw-flex tw-items-center tw-flex-wrap">
+					{{svg "octicon-diff" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion}}
+				</div>
+			{{end}}
+		</div>
+		<div class="diff-detail-actions">
+			{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived) (not .DiffNotAvailable)}}
+				<div class="not-mobile tw-flex tw-items-center tw-flex-col tw-whitespace-nowrap tw-mr-1">
+					<label for="viewed-files-summary" id="viewed-files-summary-label" data-text-changed-template="{{ctx.Locale.Tr "repo.pulls.viewed_files_label"}}">
+						{{ctx.Locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}}
+					</label>
+					<progress id="viewed-files-summary" value="{{.Diff.NumViewedFiles}}" max="{{.Diff.NumFiles}}"></progress>
+				</div>
+			{{end}}
+			{{template "repo/diff/whitespace_dropdown" .}}
+			{{template "repo/diff/options_dropdown" .}}
+			{{if .PageIsPullFiles}}
+				<div id="diff-commit-select" data-issuelink="{{$.Issue.Link}}" data-queryparams="?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated={{$.ShowOutdatedComments}}" data-filter_changes_by_commit="{{ctx.Locale.Tr "repo.pulls.filter_changes_by_commit"}}">
+					{{/*
+						the following will be replaced by vue component
+						but this avoids any loading artifacts till the vue component is initialized
+					*/}}
+					<div class="ui jump dropdown basic button custom">
+						{{svg "octicon-git-commit"}}
+					</div>
+				</div>
+			{{end}}
+			{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}}
+				{{template "repo/diff/new_review" .}}
+			{{end}}
+		</div>
+	</div>
+	{{if not .DiffNotAvailable}}
+		{{if and .IsShowingOnlySingleCommit .PageIsPullFiles}}
+			<div class="ui info message">
+				<div>{{ctx.Locale.Tr "repo.pulls.showing_only_single_commit" (ShortSha .AfterCommitID)}} - <a href="{{$.Issue.Link}}/files?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated={{$.ShowOutdatedComments}}">{{ctx.Locale.Tr "repo.pulls.show_all_commits"}}</a></div>
+			</div>
+		{{else if and (not .IsShowingAllCommits) .PageIsPullFiles}}
+			<div class="ui info message">
+				<div>{{ctx.Locale.Tr "repo.pulls.showing_specified_commit_range" (ShortSha .BeforeCommitID) (ShortSha .AfterCommitID)}} - <a href="{{$.Issue.Link}}/files?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated={{$.ShowOutdatedComments}}">{{ctx.Locale.Tr "repo.pulls.show_all_commits"}}</a></div>
+			</div>
+		{{end}}
+		<script id="diff-data-script" type="module">
+			const diffDataFiles = [{{range $i, $file := .Diff.Files}}{Name:"{{$file.Name}}",NameHash:"{{$file.NameHash}}",Type:{{$file.Type}},IsBin:{{$file.IsBin}},Addition:{{$file.Addition}},Deletion:{{$file.Deletion}},IsViewed:{{$file.IsViewed}}},{{end}}];
+			const diffData = {
+				isIncomplete: {{.Diff.IsIncomplete}},
+				tooManyFilesMessage: "{{ctx.Locale.Tr "repo.diff.too_many_files"}}",
+				binaryFileMessage: "{{ctx.Locale.Tr "repo.diff.bin"}}",
+				showMoreMessage: "{{ctx.Locale.Tr "repo.diff.show_more"}}",
+				statisticsMessage: "{{ctx.Locale.Tr "repo.diff.stats_desc_file"}}",
+				linkLoadMore: "?skip-to={{.Diff.End}}&file-only=true",
+			};
+
+			// for first time loading, the diffFileInfo is a plain object
+			// after the Vue component is mounted, the diffFileInfo is a reactive object
+			// keep in mind that this script block would be executed many times when loading more files, by "loadMoreFiles"
+			let diffFileInfo = window.config.pageData.diffFileInfo || {
+				files:[],
+				fileTreeIsVisible: false,
+				fileListIsVisible: false,
+				isLoadingNewData: false,
+				selectedItem: '',
+			};
+			diffFileInfo = Object.assign(diffFileInfo, diffData);
+			diffFileInfo.files.push(...diffDataFiles);
+			window.config.pageData.diffFileInfo = diffFileInfo;
+		</script>
+		<div id="diff-file-list"></div>
+	{{end}}
+	<div id="diff-container">
+		{{if $showFileTree}}
+			<div id="diff-file-tree" class="tw-hidden not-mobile"></div>
+			<script>
+				if (diffTreeVisible) document.getElementById('diff-file-tree').classList.remove('tw-hidden');
+			</script>
+		{{end}}
+		{{if .DiffNotAvailable}}
+			<h4>{{ctx.Locale.Tr "repo.diff.data_not_available"}}</h4>
+		{{else}}
+			<div id="diff-file-boxes" class="sixteen wide column">
+				{{range $i, $file := .Diff.Files}}
+					{{/*notice: the index of Diff.Files should not be used for element ID, because the index will be restarted from 0 when doing load-more for PRs with a lot of files*/}}
+					{{$blobBase := call $.GetBlobByPathForCommit $.BeforeCommit $file.OldName}}
+					{{$blobHead := call $.GetBlobByPathForCommit $.HeadCommit $file.Name}}
+					{{$sniffedTypeBase := call $.GetSniffedTypeForBlob $blobBase}}
+					{{$sniffedTypeHead := call $.GetSniffedTypeForBlob $blobHead}}
+					{{$isImage:= or (call $.IsSniffedTypeAnImage $sniffedTypeBase) (call $.IsSniffedTypeAnImage $sniffedTypeHead)}}
+					{{$isCsv := (call $.IsCsvFile $file)}}
+					{{$showFileViewToggle := or $isImage (and (not $file.IsIncomplete) $isCsv)}}
+					{{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}}
+					{{$isReviewFile := and $.IsSigned $.PageIsPullFiles (not $.IsArchived) $.IsShowingAllCommits}}
+					<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} tw-mt-0" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}>
+						<h4 class="diff-file-header sticky-2nd-row ui top attached header">
+							<div class="diff-file-name tw-flex tw-flex-1 tw-items-center tw-gap-1 tw-flex-wrap">
+								<button class="fold-file btn interact-bg tw-p-1{{if not $isExpandable}} tw-invisible{{end}}">
+									{{if $file.ShouldBeHidden}}
+										{{svg "octicon-chevron-right" 18}}
+									{{else}}
+										{{svg "octicon-chevron-down" 18}}
+									{{end}}
+								</button>
+								<div class="tw-font-semibold tw-flex tw-items-center tw-font-mono">
+									{{if $file.IsBin}}
+										<span class="tw-ml-0.5 tw-mr-2">
+											{{ctx.Locale.Tr "repo.diff.bin"}}
+										</span>
+									{{else}}
+										{{template "repo/diff/stats" dict "file" . "root" $}}
+									{{end}}
+								</div>
+								<span class="file tw-flex tw-items-center tw-font-mono tw-flex-1"><a class="muted file-link" title="{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}</a>
+									{{if .IsLFSFile}} ({{ctx.Locale.Tr "repo.stored_lfs"}}){{end}}
+									<button class="btn interact-fg tw-p-2" data-clipboard-text="{{$file.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_path"}}">{{svg "octicon-copy" 14}}</button>
+									{{if $file.IsGenerated}}
+										<span class="ui label">{{ctx.Locale.Tr "repo.diff.generated"}}</span>
+									{{end}}
+									{{if $file.IsVendored}}
+										<span class="ui label">{{ctx.Locale.Tr "repo.diff.vendored"}}</span>
+									{{end}}
+									{{if and $file.Mode $file.OldMode}}
+										{{$old := ctx.Locale.Tr ($file.ModeTranslationKey $file.OldMode)}}
+										{{$new := ctx.Locale.Tr ($file.ModeTranslationKey $file.Mode)}}
+										<span class="tw-mx-2 tw-font-mono tw-whitespace-nowrap">{{ctx.Locale.Tr "git.filemode.changed_filemode" $old $new}}</span>
+									{{else if $file.Mode}}
+										<span class="tw-mx-2 tw-font-mono tw-whitespace-nowrap">{{ctx.Locale.Tr ($file.ModeTranslationKey $file.Mode)}}</span>
+									{{end}}
+								</span>
+							</div>
+							<div class="diff-file-header-actions tw-flex tw-items-center tw-gap-1 tw-flex-wrap">
+								{{if $showFileViewToggle}}
+									<div class="ui compact icon buttons">
+										<button class="ui tiny basic button file-view-toggle" data-toggle-selector="#diff-source-{{$file.NameHash}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_source"}}">{{svg "octicon-code"}}</button>
+										<button class="ui tiny basic button file-view-toggle active" data-toggle-selector="#diff-rendered-{{$file.NameHash}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_rendered"}}">{{svg "octicon-file"}}</button>
+									</div>
+								{{end}}
+								{{if $file.IsProtected}}
+									<span class="ui basic label">{{ctx.Locale.Tr "repo.diff.protected"}}</span>
+								{{end}}
+								{{if and $isReviewFile $file.HasChangedSinceLastReview}}
+									<span class="changed-since-last-review unselectable not-mobile">{{ctx.Locale.Tr "repo.pulls.has_changed_since_last_review"}}</span>
+								{{end}}
+								{{if $isReviewFile}}
+									<label data-link="{{$.Issue.Link}}/viewed-files" data-headcommit="{{$.AfterCommitID}}" class="viewed-file-form unselectable{{if $file.IsViewed}} viewed-file-checked-form{{end}}">
+										<input type="checkbox" name="{{$file.GetDiffFileName}}" autocomplete="off"{{if $file.IsViewed}} checked{{end}}> {{ctx.Locale.Tr "repo.pulls.has_viewed_file"}}
+									</label>
+								{{end}}
+								<button class="btn diff-header-popup-btn tw-p-1">{{svg "octicon-kebab-horizontal" 18}}</button>
+								<div class="tippy-target">
+									{{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}}
+										<button class="unescape-button item" data-unicode-content-selector="#diff-{{$file.NameHash}}">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
+										<button class="escape-button tw-hidden item" data-unicode-content-selector="#diff-{{$file.NameHash}}">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
+									{{end}}
+									{{if and (not $file.IsSubmodule) (not $.PageIsWiki)}}
+										{{if $file.IsDeleted}}
+											<a class="item" rel="nofollow" href="{{$.BeforeSourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
+										{{else}}
+											<a class="item" rel="nofollow" href="{{$.SourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
+											{{if and $.Repository.CanEnableEditor $.CanEditFile (not $file.IsLFSFile) (not $file.IsBin)}}
+												<a class="item" rel="nofollow" href="{{$.HeadRepoLink}}/_edit/{{PathEscapeSegments $.HeadBranchName}}/{{PathEscapeSegments $file.Name}}?return_uri={{print $.BackToLink "#diff-" $file.NameHash | QueryEscape}}">{{ctx.Locale.Tr "repo.editor.edit_this_file"}}</a>
+											{{end}}
+										{{end}}
+									{{end}}
+								</div>
+							</div>
+						</h4>
+						<div class="diff-file-body ui attached unstackable table segment" {{if and $file.IsViewed $.IsShowingAllCommits}}data-folded="true"{{end}}>
+							<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} tw-hidden{{end}}">
+								{{if or $file.IsIncomplete $file.IsBin}}
+									<div class="diff-file-body binary">
+										{{if $file.IsIncomplete}}
+											{{if $file.IsIncompleteLineTooLong}}
+												{{ctx.Locale.Tr "repo.diff.file_suppressed_line_too_long"}}
+											{{else}}
+												{{ctx.Locale.Tr "repo.diff.file_suppressed"}}
+												<a class="ui basic tiny button diff-load-button" data-href="?file-only=true&files={{$file.Name}}&files={{$file.OldName}}">{{ctx.Locale.Tr "repo.diff.load"}}</a>
+											{{end}}
+										{{else}}
+											{{ctx.Locale.Tr "repo.diff.bin_not_shown"}}
+										{{end}}
+									</div>
+								{{else}}
+									<table class="chroma" data-new-comment-url="{{$.Issue.Link}}/files/reviews/new_comment" data-path="{{$file.Name}}">
+										{{if $.IsSplitStyle}}
+											{{template "repo/diff/section_split" dict "file" . "root" $}}
+										{{else}}
+											{{template "repo/diff/section_unified" dict "file" . "root" $}}
+										{{end}}
+									</table>
+								{{end}}
+							</div>
+							{{if $showFileViewToggle}}
+								{{/* for image or CSV, it can have a horizontal scroll bar, there won't be review comment context menu (position absolute) which would be clipped by "overflow" */}}
+								<div id="diff-rendered-{{$file.NameHash}}" class="file-body file-code {{if $.IsSplitStyle}}code-diff-split{{else}}code-diff-unified{{end}} tw-overflow-x-scroll">
+									<table class="chroma tw-w-full">
+										{{if $isImage}}
+											{{template "repo/diff/image_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead "sniffedTypeBase" $sniffedTypeBase "sniffedTypeHead" $sniffedTypeHead}}
+										{{else}}
+											{{template "repo/diff/csv_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead "sniffedTypeBase" $sniffedTypeBase "sniffedTypeHead" $sniffedTypeHead}}
+										{{end}}
+									</table>
+								</div>
+							{{end}}
+						</div>
+					</div>
+				{{end}}
+
+				{{if .Diff.IsIncomplete}}
+					<div class="diff-file-box diff-box file-content tw-mt-2" id="diff-incomplete">
+						<h4 class="ui top attached header tw-font-normal tw-flex tw-items-center tw-justify-between">
+							{{ctx.Locale.Tr "repo.diff.too_many_files"}}
+							<a class="ui basic tiny button" id="diff-show-more-files" data-href="?skip-to={{.Diff.End}}&file-only=true">{{ctx.Locale.Tr "repo.diff.show_more"}}</a>
+						</h4>
+					</div>
+				{{end}}
+			</div>
+		{{end}}
+	</div>
+
+	{{if and (not $.Repository.IsArchived) (not .DiffNotAvailable)}}
+		<template id="issue-comment-editor-template">
+			<div class="ui form comment">
+				{{template "shared/combomarkdowneditor" (dict
+					"CustomInit" true
+					"MarkdownPreviewInRepo" $.Repository
+					"MarkdownPreviewMode" "comment"
+					"TextareaName" "content"
+					"DropzoneParentContainer" ".ui.form"
+				)}}
+				{{if .IsAttachmentEnabled}}
+					<div class="field">
+						{{template "repo/upload" .}}
+					</div>
+				{{end}}
+				<div class="text right edit buttons">
+					<button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
+					<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
+				</div>
+			</div>
+		</template>
+	{{end}}
+	{{if (not .DiffNotAvailable)}}
+		{{template "repo/issue/view_content/reference_issue_dialog" .}}
+		{{template "shared/user/block_user_dialog" .}}
+	{{end}}
+</div>
diff --git a/repo/diff/comment_form.tmpl b/repo/diff/comment_form.tmpl
new file mode 100644
index 0000000..964dc2a
--- /dev/null
+++ b/repo/diff/comment_form.tmpl
@@ -0,0 +1,49 @@
+{{if and $.root.SignedUserID (not $.Repository.IsArchived)}}
+	<form class="ui form {{if $.hidden}}tw-hidden comment-form{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post">
+	{{$.root.CsrfTokenHtml}}
+		<input type="hidden" name="origin" value="{{if $.root.PageIsPullFiles}}diff{{else}}timeline{{end}}">
+		<input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}">
+		<input type="hidden" name="side" value="{{if $.Side}}{{$.Side}}{{end}}">
+		<input type="hidden" name="line" value="{{if $.Line}}{{$.Line}}{{end}}">
+		<input type="hidden" name="path" value="{{if $.File}}{{$.File}}{{end}}">
+		<input type="hidden" name="diff_start_cid">
+		<input type="hidden" name="diff_end_cid">
+		<input type="hidden" name="diff_base_cid">
+		<div class="field">
+		{{template "shared/combomarkdowneditor" (dict
+			"CustomInit" true
+			"MarkdownPreviewInRepo" $.root.Repository
+			"MarkdownPreviewMode" "comment"
+			"TextareaName" "content"
+			"TextareaPlaceholder" (ctx.Locale.Tr "repo.diff.comment.placeholder")
+			"DropzoneParentContainer" "form"
+			"DisableAutosize" "true"
+		)}}
+		</div>
+		{{if $.root.IsAttachmentEnabled}}
+			<div class="field">
+				{{template "repo/upload" $.root}}
+			</div>
+		{{end}}
+
+		<div class="field footer">
+			<div class="tw-text-right">
+				{{if $.reply}}
+					<button class="ui submit primary tiny button btn-reply" type="submit">{{ctx.Locale.Tr "repo.diff.comment.reply"}}</button>
+					<input type="hidden" name="reply" value="{{$.reply}}">
+					<input type="hidden" name="single_review" value="true">
+				{{else}}
+					{{if $.root.CurrentReview}}
+						<button name="pending_review" type="submit" class="ui submit primary tiny button btn-add-comment">{{ctx.Locale.Tr "repo.diff.comment.add_review_comment"}}</button>
+					{{else}}
+						<button name="pending_review" type="submit" class="ui submit primary tiny button btn-start-review">{{ctx.Locale.Tr "repo.diff.comment.start_review"}}</button>
+						<button name="single_review" value="true" type="submit" class="ui submit tiny basic button btn-add-single">{{ctx.Locale.Tr "repo.diff.comment.add_single_comment"}}</button>
+					{{end}}
+				{{end}}
+				{{if or (not $.HasComments) $.hidden}}
+					<button type="button" class="ui submit tiny basic button btn-cancel cancel-code-comment">{{ctx.Locale.Tr "cancel"}}</button>
+				{{end}}
+			</div>
+		</div>
+	</form>
+{{end}}
diff --git a/repo/diff/comment_form_datahandler.tmpl b/repo/diff/comment_form_datahandler.tmpl
new file mode 100644
index 0000000..d0e4934
--- /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..2d71668
--- /dev/null
+++ b/repo/diff/comments.tmpl
@@ -0,0 +1,75 @@
+{{range .comments}}
+
+{{$createdStr:= DateUtils.TimeSince .CreatedUnix}}
+<div class="comment" id="{{.HashTag}}">
+	{{if .OriginalAuthor}}
+		<span class="avatar">{{ctx.AvatarUtils.Avatar nil}}</span>
+	{{else}}
+		{{template "shared/user/avatarlink" dict "user" .Poster}}
+	{{end}}
+	<div class="content comment-container">
+		<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between">
+			<div class="comment-header-left tw-flex tw-items-center">
+				{{if .OriginalAuthor}}
+					<span class="text black tw-font-semibold tw-mr-1">
+						{{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}}
+						{{.OriginalAuthor}}
+					</span>
+					<span class="text grey muted-links">
+						{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}}
+					</span>
+					<span class="text migrate">
+						{{if $.root.Repository.OriginalURL}}
+							({{ctx.Locale.Tr "repo.migrated_from" $.root.Repository.OriginalURL $.root.Repository.GetOriginalURLHostname}})
+						{{end}}
+					</span>
+				{{else}}
+					<span class="text grey muted-links">
+						{{template "shared/user/namelink" .Poster}}
+						{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}}
+					</span>
+				{{end}}
+			</div>
+			<div class="comment-header-right actions tw-flex tw-items-center">
+				{{if .Invalidated}}
+					{{$referenceUrl := printf "%s#%s" $.root.Issue.Link .HashTag}}
+					<a href="{{$referenceUrl}}" class="ui label basic small" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
+						{{ctx.Locale.Tr "repo.issues.review.outdated"}}
+					</a>
+				{{end}}
+				{{if .Review}}
+					{{if eq .Review.Type 0}}
+						<div class="ui label basic small yellow pending-label" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.pending.tooltip" (ctx.Locale.Tr "repo.diff.review") (ctx.Locale.Tr "repo.diff.review.approve") (ctx.Locale.Tr "repo.diff.review.comment") (ctx.Locale.Tr "repo.diff.review.reject")}}">
+						{{ctx.Locale.Tr "repo.issues.review.pending"}}
+						</div>
+					{{else}}
+						<div class="ui label basic small">
+						{{ctx.Locale.Tr "repo.issues.review.review"}}
+						</div>
+					{{end}}
+				{{end}}
+				{{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.root.RepoLink .ID)}}
+				{{template "repo/issue/view_content/context_menu" dict "item" . "delete" true "issue" false "diff" true "IsCommentPoster" (and $.root.IsSigned (eq $.root.SignedUserID .PosterID))}}
+			</div>
+		</div>
+		<div class="ui attached segment comment-body">
+			<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.root.IsSigned (eq $.root.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
+			{{if .RenderedContent}}
+				{{.RenderedContent}}
+			{{else}}
+				<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
+			{{end}}
+			</div>
+			<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
+			<div class="edit-content-zone tw-hidden" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-content-version="{{.ContentVersion}}" data-context="{{$.root.RepoLink}}" data-attachment-url="{{$.root.RepoLink}}/comments/{{.ID}}/attachments"></div>
+			{{if .Attachments}}
+				{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
+			{{end}}
+		</div>
+		{{$reactions := .Reactions.GroupByType}}
+		{{if $reactions}}
+			{{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/comments/%d/reactions" $.root.RepoLink .ID) "Reactions" $reactions}}
+		{{end}}
+	</div>
+</div>
+{{end}}
diff --git a/repo/diff/compare.tmpl b/repo/diff/compare.tmpl
new file mode 100644
index 0000000..118d647
--- /dev/null
+++ b/repo/diff/compare.tmpl
@@ -0,0 +1,230 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository diff {{if .PageIsComparePull}}compare pull{{end}}">
+	{{template "repo/header" .}}
+	{{$showDiffBox := false}}
+	<div class="ui container fluid padded">
+	<h2 class="ui header">
+		{{if and $.PageIsComparePull $.IsSigned (not .Repository.IsArchived)}}
+			{{ctx.Locale.Tr "repo.pulls.compare_changes"}}
+			<div class="sub header">{{ctx.Locale.Tr "repo.pulls.compare_changes_desc"}}</div>
+		{{else}}
+			{{ctx.Locale.Tr "action.compare_commits_general"}}
+		{{end}}
+	</h2>
+	{{$BaseCompareName := $.BaseName -}}
+	{{- $HeadCompareName := $.HeadRepo.OwnerName -}}
+	{{- if and (eq $.BaseName $.HeadRepo.OwnerName) (ne $.Repository.Name $.HeadRepo.Name) -}}
+		{{- $HeadCompareName = printf "%s/%s" $.HeadRepo.OwnerName $.HeadRepo.Name -}}
+	{{- end -}}
+	{{- $OwnForkCompareName := "" -}}
+	{{- if .OwnForkRepo -}}
+		{{- $OwnForkCompareName = .OwnForkRepo.OwnerName -}}
+	{{- end -}}
+	{{- $RootRepoCompareName := "" -}}
+	{{- if .RootRepo -}}
+		{{- $RootRepoCompareName = .RootRepo.OwnerName -}}
+		{{- if eq $.HeadRepo.OwnerName .RootRepo.OwnerName -}}
+			{{- $HeadCompareName = printf "%s/%s" $.HeadRepo.OwnerName $.HeadRepo.Name -}}
+		{{- end -}}
+	{{- end -}}
+	<div class="ui segment choose branch">
+		<a class="tw-mr-2" href="{{$.HeadRepo.Link}}/compare/{{PathEscapeSegments $.HeadBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.BaseName}}/{{PathEscape $.Repository.Name}}:{{end}}{{PathEscapeSegments $.BaseBranch}}" title="{{ctx.Locale.Tr "repo.pulls.switch_head_and_base"}}">{{svg "octicon-git-compare"}}</a>
+		<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}">
+			<div class="ui basic small button">
+				<span class="text">{{if $.PageIsComparePull}}{{ctx.Locale.Tr "repo.pulls.compare_base"}}{{else}}{{ctx.Locale.Tr "repo.compare.compare_base"}}{{end}}: {{$BaseCompareName}}:{{$.BaseBranch}}</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			</div>
+			<div class="menu">
+				<div class="ui icon search input">
+					<i class="icon">{{svg "octicon-filter" 16}}</i>
+					<input name="search" placeholder="{{ctx.Locale.Tr "repo.filter_branch_and_tag"}}...">
+				</div>
+				<div class="header">
+					<div class="ui grid">
+						<div class="two column row">
+							<a class="reference column" href="#" data-target=".base-branch-list">
+								<span class="text black">
+									{{svg "octicon-git-branch" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.branches"}}
+								</span>
+							</a>
+							<a class="reference column" href="#" data-target=".base-tag-list">
+								<span class="text black">
+									{{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.tags"}}
+								</span>
+							</a>
+						</div>
+					</div>
+				</div>
+				<div class="scrolling menu reference-list-menu base-branch-list">
+					{{range .Branches}}
+						<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments $.HeadBranch}}">{{$BaseCompareName}}:{{.}}</div>
+					{{end}}
+					{{if not .PullRequestCtx.SameRepo}}
+						{{range .HeadBranches}}
+							<div class="item" data-url="{{$.HeadRepo.Link}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{PathEscapeSegments $.HeadBranch}}">{{$HeadCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+					{{if .OwnForkRepo}}
+						{{range .OwnForkRepoBranches}}
+							<div class="item" data-url="{{$.OwnForkRepo.Link}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{PathEscapeSegments $.HeadBranch}}">{{$OwnForkCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+					{{if and .RootRepo (.RootRepo.AllowsPulls ctx)}}
+						{{range .RootRepoBranches}}
+							<div class="item" data-url="{{$.RootRepo.Link}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{PathEscapeSegments $.HeadBranch}}">{{$RootRepoCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+				</div>
+				<div class="scrolling menu reference-list-menu base-tag-list tw-hidden">
+					{{range .Tags}}
+						<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments $.HeadBranch}}">{{$BaseCompareName}}:{{.}}</div>
+					{{end}}
+					{{if not .PullRequestCtx.SameRepo}}
+						{{range .HeadTags}}
+							<div class="item" data-url="{{$.HeadRepo.Link}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{PathEscapeSegments $.HeadBranch}}">{{$HeadCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+					{{if .OwnForkRepo}}
+						{{range .OwnForkRepoTags}}
+							<div class="item" data-url="{{$.OwnForkRepo.Link}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{PathEscapeSegments $.HeadBranch}}">{{$OwnForkCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+					{{if .RootRepo}}
+						{{range .RootRepoTags}}
+							<div class="item" data-url="{{$.RootRepo.Link}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{PathEscapeSegments $.HeadBranch}}">{{$RootRepoCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+				</div>
+			</div>
+		</div>
+		<a href="{{.RepoLink}}/compare/{{PathEscapeSegments .BaseBranch}}{{.OtherCompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments $.HeadBranch}}" title="{{ctx.Locale.Tr "repo.pulls.switch_comparison_type"}}">{{svg "octicon-arrow-left" 16}}<div class="compare-separator">{{.CompareSeparator}}</div></a>
+		<div class="ui floating filter dropdown">
+			<div class="ui basic small button">
+				<span class="text">{{if $.PageIsComparePull}}{{ctx.Locale.Tr "repo.pulls.compare_compare"}}{{else}}{{ctx.Locale.Tr "repo.compare.compare_head"}}{{end}}: {{$HeadCompareName}}:{{$.HeadBranch}}</span>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			</div>
+			<div class="menu">
+				<div class="ui icon search input">
+					<i class="icon">{{svg "octicon-filter" 16}}</i>
+					<input name="search" placeholder="{{ctx.Locale.Tr "repo.filter_branch_and_tag"}}...">
+				</div>
+				<div class="header">
+					<div class="ui grid">
+						<div class="two column row">
+							<a class="reference column" href="#" data-target=".head-branch-list">
+								<span class="text black">
+									{{svg "octicon-git-branch" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.branches"}}
+								</span>
+							</a>
+							<a class="reference column" href="#" data-target=".head-tag-list">
+								<span class="text black">
+									{{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.tags"}}
+								</span>
+							</a>
+						</div>
+					</div>
+				</div>
+				<div class="scrolling menu reference-list-menu head-branch-list">
+					{{range .HeadBranches}}
+						<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments .}}">{{$HeadCompareName}}:{{.}}</div>
+					{{end}}
+					{{if not .PullRequestCtx.SameRepo}}
+						{{range .Branches}}
+							<div class="item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{PathEscape $.BaseName}}/{{PathEscape $.Repository.Name}}:{{PathEscapeSegments .}}">{{$BaseCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+					{{if .OwnForkRepo}}
+						{{range .OwnForkRepoBranches}}
+							<div class="item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{PathEscape $.OwnForkRepo.OwnerName}}/{{PathEscape $.OwnForkRepo.Name}}:{{PathEscapeSegments .}}">{{$OwnForkCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+					{{if .RootRepo}}
+						{{range .RootRepoBranches}}
+							<div class="item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{PathEscape $.RootRepo.OwnerName}}/{{PathEscape $.RootRepo.Name}}:{{PathEscapeSegments .}}">{{$RootRepoCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+				</div>
+				<div class="scrolling menu reference-list-menu head-tag-list tw-hidden">
+					{{range .HeadTags}}
+						<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments .}}">{{$HeadCompareName}}:{{.}}</div>
+					{{end}}
+					{{if not .PullRequestCtx.SameRepo}}
+						{{range .Tags}}
+							<div class="item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{PathEscape $.BaseName}}/{{PathEscape $.Repository.Name}}:{{PathEscapeSegments .}}">{{$BaseCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+					{{if .OwnForkRepo}}
+						{{range .OwnForkRepoTags}}
+							<div class="item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{PathEscape $.OwnForkRepo.OwnerName}}/{{PathEscape $.OwnForkRepo.Name}}:{{PathEscapeSegments .}}">{{$OwnForkCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+					{{if .RootRepo}}
+						{{range .RootRepoTags}}
+							<div class="item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{PathEscape $.RootRepo.OwnerName}}/{{PathEscape $.RootRepo.Name}}:{{PathEscapeSegments .}}">{{$RootRepoCompareName}}:{{.}}</div>
+						{{end}}
+					{{end}}
+				</div>
+			</div>
+		</div>
+	</div>
+
+	{{if .IsNothingToCompare}}
+		{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived) .PageIsComparePull}}
+			<div class="ui segment">{{ctx.Locale.Tr "repo.pulls.nothing_to_compare_and_allow_empty_pr"}}</div>
+			<div class="ui info message show-form-container {{if .Flash}}tw-hidden{{end}}">
+				<button class="ui button primary show-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
+			</div>
+			<div class="pullrequest-form {{if not .Flash}}tw-hidden{{end}}">
+				{{template "repo/issue/new_form" .}}
+			</div>
+		{{else if and .HeadIsBranch .BaseIsBranch}}
+			<div class="ui segment">{{ctx.Locale.Tr "repo.pulls.nothing_to_compare"}}</div>
+		{{else}}
+			<div class="ui segment">{{ctx.Locale.Tr "repo.pulls.nothing_to_compare_have_tag"}}</div>
+		{{end}}
+	{{else if and .PageIsComparePull (gt .CommitCount 0)}}
+		{{if .HasPullRequest}}
+			<div class="ui segment flex-text-block tw-gap-4">
+				{{template "shared/issueicon" .}}
+				<div class="issue-title tw-break-anywhere">
+					{{ctx.RenderUtils.RenderIssueTitle .PullRequest.Issue.Title ($.Repository.ComposeMetas ctx)}}
+					<span class="index">#{{.PullRequest.Issue.Index}}</span>
+				</div>
+				<a href="{{$.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui compact button primary">
+					{{ctx.Locale.Tr "repo.pulls.view"}}
+				</a>
+			</div>
+		{{else}}
+			{{if and $.IsSigned (not .Repository.IsArchived)}}
+				<div class="ui info message show-form-container {{if .Flash}}tw-hidden{{end}}">
+					<button class="ui button primary show-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
+				</div>
+			{{else if .Repository.IsArchived}}
+				<div class="ui warning message tw-text-center">
+					{{if .Repository.ArchivedUnix.IsZero}}
+						{{ctx.Locale.Tr "repo.archive.title"}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.archive.title_date" (DateUtils.AbsoluteLong .Repository.ArchivedUnix)}}
+					{{end}}
+				</div>
+			{{end}}
+			{{if $.IsSigned}}
+				<div class="pullrequest-form {{if not .Flash}}tw-hidden{{end}}">
+					{{template "repo/issue/new_form" .}}
+				</div>
+			{{end}}
+			{{$showDiffBox = true}}
+		{{end}}
+	{{else if not .IsNothingToCompare}}
+		{{$showDiffBox = true}}
+	{{end}}
+	</div>
+
+	{{if $showDiffBox}}
+	<div class="ui container fluid padded">
+		{{template "repo/commits_table" .}}
+		{{template "repo/diff/box" .}}
+	</div>
+	{{end}}
+</div>
+{{template "base/footer" .}}
diff --git a/repo/diff/conversation.tmpl b/repo/diff/conversation.tmpl
new file mode 100644
index 0000000..08f6064
--- /dev/null
+++ b/repo/diff/conversation.tmpl
@@ -0,0 +1,72 @@
+{{if len .comments}}
+	{{$comment := index .comments 0}}
+	{{$resolved := $comment.IsResolved}}
+	{{$invalid := $comment.Invalidated}}
+	{{$resolveDoer := $comment.ResolveDoer}}
+	{{$hasReview := and $comment.Review}}
+	{{$isReviewPending := and $hasReview (eq $comment.Review.Type 0)}}
+	{{$referenceUrl := printf "%s#%s" $.Issue.Link $comment.HashTag}}
+	<div class="conversation-holder" data-path="{{$comment.TreePath}}" data-side="{{if lt $comment.Line 0}}left{{else}}right{{end}}" data-idx="{{$comment.UnsignedLine}}">
+		{{if $resolved}}
+			<div class="ui attached header resolved-placeholder tw-flex tw-items-center tw-justify-between">
+				<div class="ui grey text tw-flex tw-items-center tw-flex-wrap tw-gap-1">
+					{{svg "octicon-check" 16 "icon tw-mr-1"}}
+					<b>{{$resolveDoer.Name}}</b> {{ctx.Locale.Tr "repo.issues.review.resolved_by"}}
+					{{if $invalid}}
+						<!--
+						We only handle the case $resolved=true and $invalid=true in this template because if the comment is not resolved it has the outdated label in the comments area (not the header above).
+						The case $resolved=false and $invalid=true is handled in repo/diff/comments.tmpl
+						-->
+						<a href="{{$referenceUrl}}" class="ui label basic small tw-ml-2" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
+							{{ctx.Locale.Tr "repo.issues.review.outdated"}}
+						</a>
+					{{end}}
+				</div>
+				<div class="tw-flex tw-items-center tw-gap-2">
+					<button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button show-outdated tw-flex tw-items-center">
+						{{svg "octicon-unfold" 16 "tw-mr-2"}}
+						{{ctx.Locale.Tr "repo.issues.review.show_resolved"}}
+					</button>
+					<button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button hide-outdated tw-flex tw-items-center tw-hidden">
+						{{svg "octicon-fold" 16 "tw-mr-2"}}
+						{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}}
+					</button>
+				</div>
+			</div>
+		{{end}}
+		<div id="code-comments-{{$comment.ID}}" class="field comment-code-cloud {{if $resolved}}tw-hidden{{end}}">
+			<div class="comment-list">
+				<ui class="ui comments">
+					{{template "repo/diff/comments" dict "root" $ "comments" .comments}}
+				</ui>
+			</div>
+			<div class="tw-flex tw-justify-end tw-items-center tw-gap-2 tw-mt-2 tw-flex-wrap">
+				<div class="ui buttons">
+					<button class="ui icon tiny basic button previous-conversation">
+						{{svg "octicon-arrow-up" 12 "icon"}} {{ctx.Locale.Tr "repo.issues.previous"}}
+					</button>
+					<button class="ui icon tiny basic button next-conversation">
+						{{svg "octicon-arrow-down" 12 "icon"}} {{ctx.Locale.Tr "repo.issues.next"}}
+					</button>
+				</div>
+				{{if and $.CanMarkConversation $hasReview (not $isReviewPending)}}
+					<button class="ui icon tiny basic button resolve-conversation tw-mr-0" data-origin="diff" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{$comment.ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation">
+						{{if $resolved}}
+							{{ctx.Locale.Tr "repo.issues.review.un_resolve_conversation"}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.review.resolve_conversation"}}
+						{{end}}
+					</button>
+				{{end}}
+				{{if and $.SignedUserID (not $.Repository.IsArchived)}}
+					<button class="comment-form-reply ui primary tiny labeled icon button tw-mr-0">
+						{{svg "octicon-reply" 16 "reply icon tw-mr-1"}}{{ctx.Locale.Tr "repo.diff.comment.reply"}}
+					</button>
+				{{end}}
+			</div>
+			{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" $comment.ReviewID "root" $ "comment" $comment}}
+		</div>
+	</div>
+{{else}}
+	{{template "repo/diff/conversation_outdated"}}
+{{end}}
diff --git a/repo/diff/conversation_outdated.tmpl b/repo/diff/conversation_outdated.tmpl
new file mode 100644
index 0000000..c6a4bf1
--- /dev/null
+++ b/repo/diff/conversation_outdated.tmpl
@@ -0,0 +1,3 @@
+<div class="ui segment conversation-holder conversation-not-existing">
+	{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}
+</div>
diff --git a/repo/diff/csv_diff.tmpl b/repo/diff/csv_diff.tmpl
new file mode 100644
index 0000000..0f46da3
--- /dev/null
+++ b/repo/diff/csv_diff.tmpl
@@ -0,0 +1,58 @@
+<tr>
+	<td>
+		{{$result := call .root.CreateCsvDiff .file .blobBase .blobHead}}
+		{{if $result.Error}}
+			<div class="ui center">{{$result.Error}}</div>
+		{{else if $result.Sections}}
+			<table class="data-table">
+			{{range $i, $section := $result.Sections}}
+				<tbody {{if gt $i 0}}class="section"{{end}}>
+				{{range $j, $row := $section.Rows}}
+					<tr>
+						{{if and (eq $i 0) (eq $j 0)}}
+							<th class="line-num">{{.RowIdx}}</th>
+							{{range $j, $cell := $row.Cells}}
+								{{if not $cell}}
+									<th></th>
+								{{else if eq $cell.Type 2}}
+									<th class="modified"><span class="removed-code">{{.LeftCell}}</span> <span class="added-code">{{.RightCell}}</span></th>
+								{{else if eq $cell.Type 3}}
+									<th class="added"><span class="added-code">{{.RightCell}}</span></th>
+								{{else if eq $cell.Type 4}}
+									<th class="removed"><span class="removed-code">{{.LeftCell}}</span></th>
+								{{else if eq $cell.Type 5}}
+									<th class="moved">{{.RightCell}}</th>
+								{{else if eq $cell.Type 6}}
+									<th class="moved"><span class="removed-code">{{.LeftCell}}</span> <span class="added-code">{{.RightCell}}</span></th>
+								{{else}}
+									<th>{{.RightCell}}</th>
+								{{end}}
+							{{end}}
+						{{else}}
+							<td class="line-num">{{if .RowIdx}}{{.RowIdx}}{{end}}</td>
+							{{range $j, $cell := $row.Cells}}
+								{{if not $cell}}
+									<td></td>
+								{{else if eq $cell.Type 2}}
+									<td class="modified"><span class="removed-code">{{.LeftCell}}</span> <span class="added-code">{{.RightCell}}</span></td>
+								{{else if eq $cell.Type 3}}
+									<td class="added"><span class="added-code">{{.RightCell}}</span></td>
+								{{else if eq $cell.Type 4}}
+									<td class="removed"><span class="removed-code">{{.LeftCell}}</span></td>
+								{{else if eq $cell.Type 5}}
+									<td class="moved">{{.RightCell}}</td>
+								{{else if eq $cell.Type 6}}
+									<td class="moved"><span class="removed-code">{{.LeftCell}}</span> <span class="added-code">{{.RightCell}}</span></td>
+								{{else}}
+									<td>{{.RightCell}}</td>
+								{{end}}
+							{{end}}
+						{{end}}
+					</tr>
+				{{end}}
+				</tbody>
+			{{end}}
+			</table>
+		{{end}}
+	</td>
+</tr>
diff --git a/repo/diff/escape_title.tmpl b/repo/diff/escape_title.tmpl
new file mode 100644
index 0000000..e70f402
--- /dev/null
+++ b/repo/diff/escape_title.tmpl
@@ -0,0 +1,2 @@
+{{if .diff.EscapeStatus.HasInvisible}}{{ctx.Locale.Tr "repo.invisible_runes_line"}} {{end}}{{/*
+*/}}{{if .diff.EscapeStatus.HasAmbiguous}}{{ctx.Locale.Tr "repo.ambiguous_runes_line"}}{{end}}
diff --git a/repo/diff/image_diff.tmpl b/repo/diff/image_diff.tmpl
new file mode 100644
index 0000000..608174e
--- /dev/null
+++ b/repo/diff/image_diff.tmpl
@@ -0,0 +1,83 @@
+{{if or .blobBase .blobHead}}
+<tr>
+	<td colspan="2">
+		<div class="image-diff"
+			data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}"
+			data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}"
+			data-mime-before="{{.sniffedTypeBase.GetMimeType}}"
+			data-mime-after="{{.sniffedTypeHead.GetMimeType}}"
+		>
+			<overflow-menu class="ui secondary pointing tabular menu custom">
+				<div class="overflow-menu-items tw-justify-center">
+					<a class="item active" data-tab="diff-side-by-side-{{.file.Index}}">{{ctx.Locale.Tr "repo.diff.image.side_by_side"}}</a>
+					{{if and .blobBase .blobHead}}
+					<a class="item" data-tab="diff-swipe-{{.file.Index}}">{{ctx.Locale.Tr "repo.diff.image.swipe"}}</a>
+					<a class="item" data-tab="diff-overlay-{{.file.Index}}">{{ctx.Locale.Tr "repo.diff.image.overlay"}}</a>
+					{{end}}
+				</div>
+			</overflow-menu>
+			<div class="image-diff-tabs is-loading">
+				<div class="ui bottom attached tab image-diff-container active" data-tab="diff-side-by-side-{{.file.Index}}">
+					<div class="diff-side-by-side">
+						{{if .blobBase}}
+						<span class="side">
+							<p class="side-header">{{ctx.Locale.Tr "repo.diff.file_before"}}</p>
+							<span class="before-container"><img class="image-before"></span>
+							<p>
+								<span class="bounds-info-before">
+									{{ctx.Locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
+									&nbsp;|&nbsp;
+									{{ctx.Locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
+									&nbsp;|&nbsp;
+								</span>
+								{{ctx.Locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .blobBase.Size}}</span>
+							</p>
+						</span>
+						{{end}}
+						{{if .blobHead}}
+						<span class="side">
+							<p class="side-header">{{ctx.Locale.Tr "repo.diff.file_after"}}</p>
+							<span class="after-container"><img class="image-after"></span>
+							<p>
+								<span class="bounds-info-after">
+									{{ctx.Locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
+									&nbsp;|&nbsp;
+									{{ctx.Locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
+									&nbsp;|&nbsp;
+								</span>
+								{{ctx.Locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .blobHead.Size}}</span>
+							</p>
+						</span>
+						{{end}}
+					</div>
+				</div>
+				{{if and .blobBase .blobHead}}
+				<div class="ui bottom attached tab image-diff-container" data-tab="diff-swipe-{{.file.Index}}">
+					<div class="diff-swipe">
+						<div class="swipe-frame">
+							<span class="before-container"><img class="image-before"></span>
+							<span class="swipe-container">
+								<span class="after-container"><img class="image-after"></span>
+							</span>
+							<span class="swipe-bar">
+								<span class="handle top-handle"></span>
+								<span class="handle bottom-handle"></span>
+							</span>
+						</div>
+					</div>
+				</div>
+				<div class="ui bottom attached tab image-diff-container" data-tab="diff-overlay-{{.file.Index}}">
+					<div class="diff-overlay">
+						<input type="range" min="0" max="100" value="50">
+						<div class="overlay-frame">
+							<span class="before-container"><img class="image-before"></span>
+							<span class="after-container"><img class="image-after"></span>
+						</div>
+					</div>
+				</div>
+				{{end}}
+			</div>
+		</div>
+	</td>
+</tr>
+{{end}}
diff --git a/repo/diff/new_comment.tmpl b/repo/diff/new_comment.tmpl
new file mode 100644
index 0000000..6a71539
--- /dev/null
+++ b/repo/diff/new_comment.tmpl
@@ -0,0 +1,5 @@
+<div class="conversation-holder">
+	<div class="field comment-code-cloud">
+		{{template "repo/diff/comment_form_datahandler" .}}
+	</div>
+</div>
diff --git a/repo/diff/new_review.tmpl b/repo/diff/new_review.tmpl
new file mode 100644
index 0000000..2febc63
--- /dev/null
+++ b/repo/diff/new_review.tmpl
@@ -0,0 +1,56 @@
+<div id="review-box">
+	<button class="ui tiny primary button tw-pr-1 tw-flex js-btn-review {{if not $.IsShowingAllCommits}}disabled{{end}}" {{if not $.IsShowingAllCommits}}data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.review_only_possible_for_full_diff"}}"{{end}}>
+		{{ctx.Locale.Tr "repo.diff.review"}}
+		<span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span>
+		{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	</button>
+	{{if $.IsShowingAllCommits}}
+	<div class="review-box-panel tippy-target">
+		<div class="ui segment">
+			<form class="ui form form-fetch-action" action="{{.Link}}/reviews/submit" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="commit_id" value="{{.AfterCommitID}}">
+				<div class="field tw-flex tw-items-center">
+					<div class="tw-flex-1">{{ctx.Locale.Tr "repo.diff.review.header"}}</div>
+					<a class="muted close">{{svg "octicon-x" 16}}</a>
+				</div>
+				<div class="field">
+					{{template "shared/combomarkdowneditor" (dict
+						"MarkdownPreviewInRepo" $.Repository
+						"MarkdownPreviewMode" "comment"
+						"TextareaName" "content"
+						"TextareaPlaceholder" (ctx.Locale.Tr "repo.diff.review.placeholder")
+						"DropzoneParentContainer" "form"
+					)}}
+				</div>
+				{{if .IsAttachmentEnabled}}
+					<div class="field">
+						{{template "repo/upload" .}}
+					</div>
+				{{end}}
+				<div class="divider"></div>
+				{{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}}
+				{{if not $.Issue.IsClosed}}
+					{{if $showSelfTooltip}}
+						<span class="tw-inline-block" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.review.self_approve"}}">
+							<button type="submit" name="type" value="approve" disabled class="ui submit primary tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.approve"}}</button>
+						</span>
+					{{else}}
+						<button type="submit" name="type" value="approve" class="ui submit primary tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.approve"}}</button>
+					{{end}}
+				{{end}}
+				<button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{ctx.Locale.Tr "repo.diff.review.comment"}}</button>
+				{{if not $.Issue.IsClosed}}
+					{{if $showSelfTooltip}}
+						<span class="tw-inline-block" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.review.self_reject"}}">
+							<button type="submit" name="type" value="reject" disabled class="ui submit red tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.reject"}}</button>
+						</span>
+					{{else}}
+						<button type="submit" name="type" value="reject" class="ui submit red tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.reject"}}</button>
+					{{end}}
+				{{end}}
+			</form>
+		</div>
+	</div>
+	{{end}}
+</div>
diff --git a/repo/diff/options_dropdown.tmpl b/repo/diff/options_dropdown.tmpl
new file mode 100644
index 0000000..09b7b80
--- /dev/null
+++ b/repo/diff/options_dropdown.tmpl
@@ -0,0 +1,33 @@
+<div class="ui dropdown tiny basic button" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.options_button"}}">
+	{{svg "octicon-kebab-horizontal"}}
+	<div class="menu">
+		<a class="item" id="show-file-list-btn">{{ctx.Locale.Tr "repo.diff.show_diff_stats"}}</a>
+		{{if .Issue.Index}}
+			<a class="item" href="{{$.RepoLink}}/pulls/{{.Issue.Index}}.patch" download="{{.Issue.Index}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
+			<a class="item" href="{{$.RepoLink}}/pulls/{{.Issue.Index}}.diff" download="{{.Issue.Index}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
+		{{else if $.PageIsWiki}}
+			<a class="item" href="{{$.RepoLink}}/wiki/commit/{{PathEscape .Commit.ID.String}}.patch" download="{{ShortSha .Commit.ID.String}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
+			<a class="item" href="{{$.RepoLink}}/wiki/commit/{{PathEscape .Commit.ID.String}}.diff" download="{{ShortSha .Commit.ID.String}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
+		{{else if .Commit.ID.String}}
+			<a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.patch" download="{{ShortSha .Commit.ID.String}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
+			<a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.diff" download="{{ShortSha .Commit.ID.String}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
+		{{end}}
+		<a id="expand-files-btn" class="item">{{ctx.Locale.Tr "repo.pulls.expand_files"}}</a>
+		<a id="collapse-files-btn" class="item">{{ctx.Locale.Tr "repo.pulls.collapse_files"}}</a>
+		{{if .Issue.Index}}
+			{{if .ShowOutdatedComments}}
+				<a class="item" href="?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated=false">
+					<label class="tw-pointer-events-none">
+						{{ctx.Locale.Tr "repo.issues.review.option.hide_outdated_comments"}}
+					</label>
+				</a>
+			{{else}}
+				<a class="item" href="?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated=true">
+					<label class="tw-pointer-events-none">
+						{{ctx.Locale.Tr "repo.issues.review.option.show_outdated_comments"}}
+					</label>
+				</a>
+			{{end}}
+		{{end}}
+	</div>
+</div>
diff --git a/repo/diff/section_code.tmpl b/repo/diff/section_code.tmpl
new file mode 100644
index 0000000..3e8303e
--- /dev/null
+++ b/repo/diff/section_code.tmpl
@@ -0,0 +1 @@
+<code class="code-inner{{if .diff.EscapeStatus.Escaped}} has-escaped{{end}}"{{if .diff.EscapeStatus.Escaped}} title="{{template "repo/diff/escape_title" .}}"{{end}}>{{.diff.Content}}</code>
diff --git a/repo/diff/section_split.tmpl b/repo/diff/section_split.tmpl
new file mode 100644
index 0000000..37b42bc
--- /dev/null
+++ b/repo/diff/section_split.tmpl
@@ -0,0 +1,157 @@
+{{$file := .file}}
+{{$blobExcerptRepoLink := or ctx.RootData.CommitRepoLink ctx.RootData.RepoLink}}
+<colgroup>
+	<col width="50">
+	<col width="10">
+	<col width="10">
+	<col>
+	<col width="50">
+	<col width="10">
+	<col width="10">
+	<col>
+</colgroup>
+{{range $j, $section := $file.Sections}}
+	{{range $k, $line := $section.Lines}}
+		{{$hasmatch := ne $line.Match -1}}
+		{{if or (ne .GetType 2) (not $hasmatch)}}
+			<tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{.GetHTMLDiffLineType}}">
+				{{if eq .GetType 4}}
+					{{$expandDirection := $line.GetExpandDirection}}
+					<td class="lines-num lines-num-old">
+						<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
+						{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
+							<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
+								{{svg "octicon-fold-down"}}
+							</button>
+						{{end}}
+						{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
+							<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
+								{{svg "octicon-fold-up"}}
+							</button>
+						{{end}}
+						{{if eq $expandDirection 2}}
+							<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
+								{{svg "octicon-fold"}}
+							</button>
+						{{end}}
+						</div>
+					</td>{{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale}}
+					<td class="lines-escape lines-escape-old">{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
+					<td colspan="6" class="lines-code lines-code-old ">{{/*
+						*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
+					*/}}</td>
+				{{else if and (eq .GetType 3) $hasmatch}}{{/* DEL */}}
+					{{$match := index $section.Lines $line.Match}}
+					{{- $leftDiff := ""}}{{if $line.LeftIdx}}{{$leftDiff = $section.GetComputedInlineDiffFor $line ctx.Locale}}{{end}}
+					{{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match ctx.Locale}}{{end}}
+					<td class="lines-num lines-num-old del-code" data-line-num="{{$line.LeftIdx}}"><span rel="diff-{{$file.NameHash}}L{{$line.LeftIdx}}"></span></td>
+					<td class="lines-escape del-code lines-escape-old">{{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $leftDiff}}"></button>{{end}}{{end}}</td>
+					<td class="lines-type-marker lines-type-marker-old del-code"><span class="tw-font-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
+					<td class="lines-code lines-code-old del-code">{{/*
+						*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
+							*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} tw-invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/*
+								*/}}{{svg "octicon-plus"}}{{/*
+							*/}}</button>{{/*
+						*/}}{{end}}{{/*
+						*/}}{{if $line.LeftIdx}}{{/*
+							*/}}{{template "repo/diff/section_code" dict "diff" $leftDiff}}{{/*
+						*/}}{{else}}{{/*
+						*/}}<code class="code-inner"></code>{{/*
+						*/}}{{end}}{{/*
+					*/}}</td>
+					<td class="lines-num lines-num-new add-code" data-line-num="{{if $match.RightIdx}}{{$match.RightIdx}}{{end}}"><span rel="{{if $match.RightIdx}}diff-{{$file.NameHash}}R{{$match.RightIdx}}{{end}}"></span></td>
+					<td class="lines-escape add-code lines-escape-new">{{if $match.RightIdx}}{{if $rightDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $rightDiff}}"></button>{{end}}{{end}}</td>
+					<td class="lines-type-marker lines-type-marker-new add-code">{{if $match.RightIdx}}<span class="tw-font-mono" data-type-marker="{{$match.GetLineTypeMarker}}"></span>{{end}}</td>
+					<td class="lines-code lines-code-new add-code">{{/*
+						*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
+							*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-right{{if (not $match.CanComment)}} tw-invisible{{end}}" data-side="right" data-idx="{{$match.RightIdx}}">{{/*
+								*/}}{{svg "octicon-plus"}}{{/*
+							*/}}</button>{{/*
+						*/}}{{end}}{{/*
+						*/}}{{if $match.RightIdx}}{{/*
+							*/}}{{template "repo/diff/section_code" dict "diff" $rightDiff}}{{/*
+						*/}}{{else}}{{/*
+							*/}}<code class="code-inner"></code>{{/*
+						*/}}{{end}}{{/*
+					*/}}</td>
+				{{else}}
+					{{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale}}
+					<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$file.NameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
+					<td class="lines-escape lines-escape-old">{{if $line.LeftIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}{{end}}</td>
+					<td class="lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="tw-font-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td>
+					<td class="lines-code lines-code-old">{{/*
+						*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}{{/*
+							*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} tw-invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/*
+								*/}}{{svg "octicon-plus"}}{{/*
+							*/}}</button>{{/*
+						*/}}{{end}}{{/*
+						*/}}{{if $line.LeftIdx}}{{/*
+							*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
+						*/}}{{else}}{{/*
+						*/}}<code class="code-inner"></code>{{/*
+						*/}}{{end}}{{/*
+					*/}}</td>
+					<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$file.NameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
+					<td class="lines-escape lines-escape-new">{{if $line.RightIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}{{end}}</td>
+					<td class="lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="tw-font-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td>
+					<td class="lines-code lines-code-new">{{/*
+						*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}{{/*
+							*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-right{{if (not $line.CanComment)}} tw-invisible{{end}}" data-side="right" data-idx="{{$line.RightIdx}}">{{/*
+								*/}}{{svg "octicon-plus"}}{{/*
+							*/}}</button>{{/*
+						*/}}{{end}}{{/*
+						*/}}{{if $line.RightIdx}}{{/*
+							*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
+						*/}}{{else}}{{/*
+						*/}}<code class="code-inner"></code>{{/*
+						*/}}{{end}}{{/*
+					*/}}</td>
+				{{end}}
+			</tr>
+			{{if and (eq .GetType 3) $hasmatch}}
+				{{$match := index $section.Lines $line.Match}}
+				{{if or $line.Comments $match.Comments}}
+					<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
+						<td class="add-comment-left" colspan="4">
+							{{if $line.Comments}}
+								{{if eq $line.GetCommentSide "previous"}}
+									{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
+								{{end}}
+							{{end}}
+							{{if $match.Comments}}
+								{{if eq $match.GetCommentSide "previous"}}
+									{{template "repo/diff/conversation" dict "." $.root "comments" $match.Comments}}
+								{{end}}
+							{{end}}
+						</td>
+						<td class="add-comment-right" colspan="4">
+							{{if $line.Comments}}
+								{{if eq $line.GetCommentSide "proposed"}}
+									{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
+								{{end}}
+							{{end}}
+							{{if $match.Comments}}
+								{{if eq $match.GetCommentSide "proposed"}}
+									{{template "repo/diff/conversation" dict "." $.root "comments" $match.Comments}}
+								{{end}}
+							{{end}}
+						</td>
+					</tr>
+				{{end}}
+			{{else if $line.Comments}}
+				<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
+					<td class="add-comment-left" colspan="4">
+						{{if eq $line.GetCommentSide "previous"}}
+							{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
+						{{end}}
+					</td>
+					<td class="add-comment-right" colspan="4">
+						{{if eq $line.GetCommentSide "proposed"}}
+							{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
+						{{end}}
+					</td>
+				</tr>
+			{{end}}
+		{{end}}
+	{{end}}
+{{end}}
diff --git a/repo/diff/section_unified.tmpl b/repo/diff/section_unified.tmpl
new file mode 100644
index 0000000..708b333
--- /dev/null
+++ b/repo/diff/section_unified.tmpl
@@ -0,0 +1,73 @@
+{{$file := .file}}
+{{$blobExcerptRepoLink := or ctx.RootData.CommitRepoLink ctx.RootData.RepoLink}}
+<colgroup>
+	<col width="50">
+	<col width="50">
+	<col width="10">
+	<col width="10">
+	<col>
+</colgroup>
+{{range $j, $section := $file.Sections}}
+	{{range $k, $line := $section.Lines}}
+		<tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{.GetHTMLDiffLineType}}">
+			{{if eq .GetType 4}}
+				{{if $.root.AfterCommitID}}
+					{{$expandDirection := $line.GetExpandDirection}}
+					<td colspan="2" class="lines-num">
+						<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
+							{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
+								<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
+									{{svg "octicon-fold-down"}}
+								</button>
+							{{end}}
+							{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
+								<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
+									{{svg "octicon-fold-up"}}
+								</button>
+							{{end}}
+							{{if eq $expandDirection 2}}
+								<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
+									{{svg "octicon-fold"}}
+								</button>
+							{{end}}
+						</div>
+					</td>
+				{{else}}
+					{{/* for code file preview page or comment diffs on pull comment pages, do not show the expansion arrows */}}
+					<td colspan="2" class="lines-num"></td>
+				{{end}}
+			{{else}}
+				<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$file.NameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
+				<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$file.NameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
+			{{end}}
+			{{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale -}}
+			<td class="lines-escape">
+				{{- if $inlineDiff.EscapeStatus.Escaped -}}
+					<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>
+				{{- end -}}
+			</td>
+			<td class="lines-type-marker"><span class="tw-font-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
+			{{if eq .GetType 4}}
+				<td class="chroma lines-code blob-hunk">{{/*
+					*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
+				*/}}</td>
+			{{else}}
+				<td class="chroma lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}">{{/*
+					*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
+						*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} tw-invisible{{end}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">{{/*
+							*/}}{{svg "octicon-plus"}}{{/*
+						*/}}</button>{{/*
+					*/}}{{end}}{{/*
+					*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
+				*/}}</td>
+			{{end}}
+		</tr>
+		{{if $line.Comments}}
+			<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
+				<td class="add-comment-left add-comment-right" colspan="5">
+					{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
+				</td>
+			</tr>
+		{{end}}
+	{{end}}
+{{end}}
diff --git a/repo/diff/stats.tmpl b/repo/diff/stats.tmpl
new file mode 100644
index 0000000..d0dff1b
--- /dev/null
+++ b/repo/diff/stats.tmpl
@@ -0,0 +1,5 @@
+{{Eval .file.Addition "+" .file.Deletion}}
+<span class="diff-stats-bar tw-mx-2" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.stats_desc_file" (Eval .file.Addition "+" .file.Deletion) .file.Addition .file.Deletion}}">
+	{{/* if the denominator is zero, then the float result is "width: NaNpx", as before, it just works */}}
+	<div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .file.Addition "/" "(" .file.Addition "+" .file.Deletion "+" 0.0 ")"}}%"></div>
+</span>
diff --git a/repo/diff/whitespace_dropdown.tmpl b/repo/diff/whitespace_dropdown.tmpl
new file mode 100644
index 0000000..cf69579
--- /dev/null
+++ b/repo/diff/whitespace_dropdown.tmpl
@@ -0,0 +1,30 @@
+<div class="ui dropdown tiny basic button" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.whitespace_button"}}">
+	{{svg "gitea-whitespace"}}
+	<div class="menu">
+		<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=show-all&show-outdated={{$.ShowOutdatedComments}}">
+			<label class="tw-pointer-events-none">
+				<input class="tw-mr-2 tw-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "show-all"}} checked{{end}}>
+				{{ctx.Locale.Tr "repo.diff.whitespace_show_everything"}}
+			</label>
+		</a>
+		<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-all&show-outdated={{$.ShowOutdatedComments}}">
+			<label class="tw-pointer-events-none">
+				<input class="tw-mr-2 tw-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-all"}} checked{{end}}>
+				{{ctx.Locale.Tr "repo.diff.whitespace_ignore_all_whitespace"}}
+			</label>
+		</a>
+		<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-change&show-outdated={{$.ShowOutdatedComments}}">
+			<label class="tw-pointer-events-none">
+				<input class="tw-mr-2 tw-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-change"}} checked{{end}}>
+				{{ctx.Locale.Tr "repo.diff.whitespace_ignore_amount_changes"}}
+			</label>
+		</a>
+		<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-eol&show-outdated={{$.ShowOutdatedComments}}">
+			<label class="tw-pointer-events-none">
+				<input class="tw-mr-2 tw-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-eol"}} checked{{end}}>
+				{{ctx.Locale.Tr "repo.diff.whitespace_ignore_at_eol"}}
+			</label>
+		</a>
+	</div>
+</div>
+<a class="ui tiny basic button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated={{$.ShowOutdatedComments}}" data-tooltip-content="{{if .IsSplitStyle}}{{ctx.Locale.Tr "repo.diff.show_unified_view"}}{{else}}{{ctx.Locale.Tr "repo.diff.show_split_view"}}{{end}}">{{svg (Iif .IsSplitStyle "gitea-join" "gitea-split")}}</a>
diff --git a/repo/editor/cherry_pick.tmpl b/repo/editor/cherry_pick.tmpl
new file mode 100644
index 0000000..f9c9eef
--- /dev/null
+++ b/repo/editor/cherry_pick.tmpl
@@ -0,0 +1,30 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository file editor edit">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<form class="ui edit form" method="post" action="{{.RepoLink}}/_cherrypick/{{.SHA}}/{{.BranchName | PathEscapeSegments}}">
+			{{.CsrfTokenHtml}}
+			<input type="hidden" name="last_commit" value="{{.last_commit}}">
+			<input type="hidden" name="page_has_posted" value="true">
+			<input type="hidden" name="revert" value="{{if eq .CherryPickType "revert"}}true{{else}}false{{end}}">
+			<div class="repo-editor-header">
+				<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
+					{{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}}
+					{{$shalink := HTMLFormat `<a class="ui primary sha label" href="%s">%s</a>` $shaurl (ShortSha .SHA)}}
+					{{if eq .CherryPickType "revert"}}
+						{{ctx.Locale.Tr "repo.editor.revert" $shalink}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.editor.cherry_pick" $shalink}}
+					{{end}}
+					<a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
+					<div class="breadcrumb-divider">:</div>
+					<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
+					<span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$shaurl}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
+				</div>
+			</div>
+			{{template "repo/editor/commit_form" .}}
+		</form>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/editor/commit_form.tmpl b/repo/editor/commit_form.tmpl
new file mode 100644
index 0000000..c050324
--- /dev/null
+++ b/repo/editor/commit_form.tmpl
@@ -0,0 +1,74 @@
+<div class="commit-form-wrapper">
+	{{ctx.AvatarUtils.Avatar .SignedUser 40 "commit-avatar"}}
+	<div class="commit-form">
+		<h3>{{- if .CanCommitToBranch.WillSign}}
+			<span title="{{ctx.Locale.Tr "repo.signing.will_sign" .CanCommitToBranch.SigningKey}}">{{svg "octicon-lock" 24}}</span>
+			{{ctx.Locale.Tr "repo.editor.commit_signed_changes"}}
+		{{- else}}
+			<span title="{{ctx.Locale.Tr (printf "repo.signing.wont_sign.%s" .CanCommitToBranch.WontSignReason)}}">{{svg "octicon-unlock" 24}}</span>
+			{{ctx.Locale.Tr "repo.editor.commit_changes"}}
+		{{- end}}</h3>
+		<div class="field">
+			<input name="commit_summary" maxlength="100" placeholder="{{if .PageIsDelete}}{{ctx.Locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{ctx.Locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{ctx.Locale.Tr "repo.editor.add_tmpl"}}{{else if .PageIsPatch}}{{ctx.Locale.Tr "repo.editor.patch"}}{{else}}{{ctx.Locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
+		</div>
+		<div class="field">
+			<textarea name="commit_message" placeholder="{{ctx.Locale.Tr "repo.editor.commit_message_desc"}}" rows="5">{{.commit_message}}</textarea>
+		</div>
+		<div class="inline field">
+			<div class="ui checkbox">
+				<input name="signoff" type="checkbox">
+				<label>{{ctx.Locale.Tr "repo.editor.signoff_desc"}}</label>
+			</div>
+		</div>
+		<div class="quick-pull-choice js-quick-pull-choice">
+			<div class="field">
+				<div class="ui radio checkbox {{if not .CanCommitToBranch.CanCommitToBranch}}disabled{{end}}">
+					<input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="direct" data-button-text="{{ctx.Locale.Tr "repo.editor.commit_changes"}}" {{if eq .commit_choice "direct"}}checked{{end}}>
+					<label>
+						{{svg "octicon-git-commit"}}
+						{{ctx.Locale.Tr "repo.editor.commit_directly_to_this_branch" .BranchName}}
+						{{if not .CanCommitToBranch.CanCommitToBranch}}
+						<div class="ui visible small warning message">
+							{{ctx.Locale.Tr "repo.editor.no_commit_to_branch"}}
+							<ul>
+								{{if not .CanCommitToBranch.UserCanPush}}<li>{{ctx.Locale.Tr "repo.editor.user_no_push_to_branch"}}</li>{{end}}
+								{{if and .CanCommitToBranch.RequireSigned (not .CanCommitToBranch.WillSign)}}<li>{{ctx.Locale.Tr "repo.editor.require_signed_commit"}}</li>{{end}}
+							</ul>
+						</div>
+						{{end}}
+					</label>
+				</div>
+			</div>
+			{{if and (not .Repository.IsEmpty) (not .IsEditingFileOnly)}}
+				<div class="field">
+					<div class="ui radio checkbox">
+						{{if .CanCreatePullRequest}}
+							<input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="commit-to-new-branch" data-button-text="{{ctx.Locale.Tr "repo.editor.propose_file_change"}}" {{if eq .commit_choice "commit-to-new-branch"}}checked{{end}}>
+						{{else}}
+							<input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="commit-to-new-branch" data-button-text="{{ctx.Locale.Tr "repo.editor.commit_changes"}}" {{if eq .commit_choice "commit-to-new-branch"}}checked{{end}}>
+						{{end}}
+						<label>
+							{{svg "octicon-git-pull-request"}}
+							{{if .CanCreatePullRequest}}
+								{{ctx.Locale.Tr "repo.editor.create_new_branch"}}
+							{{else}}
+								{{ctx.Locale.Tr "repo.editor.create_new_branch_np"}}
+							{{end}}
+						</label>
+					</div>
+				</div>
+				<div class="quick-pull-branch-name {{if not (eq .commit_choice "commit-to-new-branch")}}tw-hidden{{end}}">
+					<div class="new-branch-name-input field {{if .Err_NewBranchName}}error{{end}}">
+						{{svg "octicon-git-branch"}}
+						<input type="text" name="new_branch_name" maxlength="100" value="{{.new_branch_name}}" class="input-contrast tw-mr-1 js-quick-pull-new-branch-name" placeholder="{{ctx.Locale.Tr "repo.editor.new_branch_name_desc"}}" {{if eq .commit_choice "commit-to-new-branch"}}required{{end}} title="{{ctx.Locale.Tr "repo.editor.new_branch_name"}}">
+						<span class="text-muted js-quick-pull-normalization-info"></span>
+					</div>
+				</div>
+			{{end}}
+		</div>
+	</div>
+	<button id="commit-button" type="submit" class="ui primary button">
+		{{if eq .commit_choice "commit-to-new-branch"}}{{ctx.Locale.Tr "repo.editor.propose_file_change"}}{{else}}{{ctx.Locale.Tr "repo.editor.commit_changes"}}{{end}}
+	</button>
+	<a class="ui button red" href="{{if .ReturnURI}}{{.ReturnURI}}{{else}}{{$.BranchLink}}/{{PathEscapeSegments .TreePath}}{{end}}">{{ctx.Locale.Tr "repo.editor.cancel"}}</a>
+</div>
diff --git a/repo/editor/delete.tmpl b/repo/editor/delete.tmpl
new file mode 100644
index 0000000..2c0c2fc
--- /dev/null
+++ b/repo/editor/delete.tmpl
@@ -0,0 +1,13 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository file editor delete">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<form class="ui form" method="post">
+			{{.CsrfTokenHtml}}
+			<input type="hidden" name="last_commit" value="{{.last_commit}}">
+			{{template "repo/editor/commit_form" .}}
+		</form>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/editor/diff_preview.tmpl b/repo/editor/diff_preview.tmpl
new file mode 100644
index 0000000..fd543a5
--- /dev/null
+++ b/repo/editor/diff_preview.tmpl
@@ -0,0 +1,17 @@
+{{if .File}}
+<div class="diff-file-box">
+	<div class="ui attached table segment">
+		<div class="file-body file-code code-diff code-diff-unified unicode-escaped">
+			<table>
+				<tbody>
+					{{template "repo/diff/section_unified" dict "file" .File "root" $}}
+				</tbody>
+			</table>
+		</div>
+	</div>
+</div>
+{{else}}
+<div class="tw-p-6 tw-text-center">
+	{{ctx.Locale.Tr "repo.editor.no_changes_to_show"}}
+</div>
+{{end}}
diff --git a/repo/editor/edit.tmpl b/repo/editor/edit.tmpl
new file mode 100644
index 0000000..204a426
--- /dev/null
+++ b/repo/editor/edit.tmpl
@@ -0,0 +1,60 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository file editor edit">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<form class="ui edit form" method="post"
+					data-text-empty-confirm-header="{{ctx.Locale.Tr "repo.editor.commit_empty_file_header"}}"
+					data-text-empty-confirm-content="{{ctx.Locale.Tr "repo.editor.commit_empty_file_text"}}"
+		>
+			{{.CsrfTokenHtml}}
+			<input type="hidden" name="last_commit" value="{{.last_commit}}">
+			<input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}">
+			<div class="repo-editor-header">
+				<div class="ui breadcrumb field{{if .Err_TreePath}} error{{end}}">
+					<a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
+					{{$n := len .TreeNames}}
+					{{$l := Eval $n "-" 1}}
+					{{range $i, $v := .TreeNames}}
+						<div class="breadcrumb-divider">/</div>
+						{{if eq $i $l}}
+							<input id="file-name" maxlength="255" value="{{$v}}" placeholder="{{ctx.Locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.EditorconfigJson}}" required autofocus>
+							<span data-tooltip-content="{{ctx.Locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
+						{{else}}
+							<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
+						{{end}}
+					{{end}}
+					<span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{if .ReturnURI}}{{.ReturnURI}}{{else}}{{$.BranchLink}}{{if not .IsNewFile}}/{{PathEscapeSegments .TreePath}}{{end}}{{end}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
+					<input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
+				</div>
+			</div>
+			<div class="field">
+				<div class="ui top attached header">
+					<div class="ui compact small menu small-menu-items repo-editor-menu">
+						<a class="active item" data-tab="write">{{svg "octicon-code"}} {{if .IsNewFile}}{{ctx.Locale.Tr "repo.editor.new_file"}}{{else}}{{ctx.Locale.Tr "repo.editor.edit_file"}}{{end}}</a>
+						<a class="item" data-tab="preview" data-preview-url="{{.Repository.Link}}/markup" data-preview-context-ref="{{.RepoLink}}/src/{{.BranchNameSubURL}}">{{svg "octicon-eye"}} {{ctx.Locale.Tr "preview"}}</a>
+						{{if not .IsNewFile}}
+						<a class="item" data-tab="diff" hx-params="context,content" hx-vals='{"context":"{{.BranchLink}}"}' hx-include="#edit_area" hx-swap="innerHTML" hx-target=".tab[data-tab='diff']" hx-indicator=".tab[data-tab='diff']" hx-post="{{.RepoLink}}/_preview/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">{{svg "octicon-diff"}} {{ctx.Locale.Tr "repo.editor.preview_changes"}}</a>
+						{{end}}
+					</div>
+				</div>
+				<div class="ui bottom attached segment tw-p-0">
+					<div class="ui active tab tw-rounded-b" data-tab="write">
+						<textarea id="edit_area" name="content" class="tw-hidden" data-id="repo-{{.Repository.Name}}-{{.TreePath}}"
+							data-previewable-extensions="{{.PreviewableExtensions}}"
+							data-line-wrap-extensions="{{.LineWrapExtensions}}">{{.FileContent}}</textarea>
+						<div class="editor-loading is-loading"></div>
+					</div>
+					<div class="ui tab markup tw-px-4 tw-py-3" data-tab="preview">
+						{{ctx.Locale.Tr "loading"}}
+					</div>
+					<div class="ui tab diff edit-diff" data-tab="diff">
+						<div class="tw-p-16"></div>
+					</div>
+				</div>
+			</div>
+			{{template "repo/editor/commit_form" .}}
+		</form>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/editor/patch.tmpl b/repo/editor/patch.tmpl
new file mode 100644
index 0000000..33a7c2a
--- /dev/null
+++ b/repo/editor/patch.tmpl
@@ -0,0 +1,40 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository file editor edit">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<form class="ui edit form" method="post" action="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}"
+					data-text-empty-confirm-header="{{ctx.Locale.Tr "repo.editor.commit_empty_file_header"}}"
+					data-text-empty-confirm-content="{{ctx.Locale.Tr "repo.editor.commit_empty_file_text"}}"
+		>
+			{{.CsrfTokenHtml}}
+			<input type="hidden" name="last_commit" value="{{.last_commit}}">
+			<input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}">
+			<div class="repo-editor-header">
+				<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
+					{{ctx.Locale.Tr "repo.editor.patching"}}
+					<a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
+					<div class="breadcrumb-divider">:</div>
+					<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
+					<span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
+					<input type="hidden" name="tree_path" value="__dummy_for_EditRepoFileForm.TreePath(Required)__">
+					<input id="file-name" type="hidden" value="diff.patch">
+				</div>
+			</div>
+			<div class="field">
+				<div class="ui compact small menu small-menu-items repo-editor-menu">
+					<a class="active item" data-tab="write">{{svg "octicon-code" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.editor.new_patch"}}</a>
+				</div>
+				<div class="ui active tab segment tw-rounded tw-p-0" data-tab="write">
+					<textarea id="edit_area" name="content" class="tw-hidden" data-id="repo-{{.Repository.Name}}-patch"
+						data-context="{{.RepoLink}}"
+						data-line-wrap-extensions="{{.LineWrapExtensions}}">
+{{.FileContent}}</textarea>
+					<div class="editor-loading is-loading"></div>
+				</div>
+			</div>
+			{{template "repo/editor/commit_form" .}}
+		</form>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/editor/upload.tmpl b/repo/editor/upload.tmpl
new file mode 100644
index 0000000..5725020
--- /dev/null
+++ b/repo/editor/upload.tmpl
@@ -0,0 +1,33 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository file editor upload">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<form class="ui comment form" method="post">
+			{{.CsrfTokenHtml}}
+			<div class="repo-editor-header">
+				<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
+					<a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
+					{{$n := len .TreeNames}}
+					{{$l := Eval $n "-" 1}}
+					{{range $i, $v := .TreeNames}}
+						<div class="breadcrumb-divider">/</div>
+						{{if eq $i $l}}
+							<input type="text" id="file-name" maxlength="255" value="{{$v}}" placeholder="{{ctx.Locale.Tr "repo.editor.add_subdir"}}" autofocus>
+							<span data-tooltip-content="{{ctx.Locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
+						{{else}}
+							<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
+						{{end}}
+					{{end}}
+					<span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{.TreePath | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
+					<input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
+				</div>
+			</div>
+			<div class="field">
+				{{template "repo/upload" .}}
+			</div>
+			{{template "repo/editor/commit_form" .}}
+		</form>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/empty.tmpl b/repo/empty.tmpl
new file mode 100644
index 0000000..ae3f950
--- /dev/null
+++ b/repo/empty.tmpl
@@ -0,0 +1,76 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository quickstart">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<div class="ui grid">
+			<div class="sixteen wide column content">
+				{{template "base/alert" .}}
+				{{if .Repository.IsArchived}}
+					<div class="ui warning message tw-text-center">
+						{{if .Repository.ArchivedUnix.IsZero}}
+							{{ctx.Locale.Tr "repo.archive.title"}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.archive.title_date" (DateUtils.AbsoluteLong .Repository.ArchivedUnix)}}
+						{{end}}
+					</div>
+				{{end}}
+
+				{{if .Repository.IsBroken}}
+					<div class="ui segment center">{{ctx.Locale.Tr "repo.broken_message"}}</div>
+				{{else if .RepoHasContentsWithoutBranch}}
+					<div class="ui segment center">{{ctx.Locale.Tr "repo.no_branch"}}</div>
+				{{else if .CanWriteCode}}
+					<h4 class="ui top attached header">{{ctx.Locale.Tr "repo.quick_guide"}}</h4>
+					<div class="ui attached guide table segment empty-repo-guide">
+						<div class="item">
+							<h3>{{ctx.Locale.Tr "repo.clone_this_repo"}} <small>{{ctx.Locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository"}}</small></h3>
+
+							<div class="repo-button-row">
+								{{if and .CanWriteCode (not .Repository.IsArchived)}}
+									<a class="ui small button" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/">
+										{{ctx.Locale.Tr "repo.editor.new_file"}}
+									</a>
+									{{if .RepositoryUploadEnabled}}
+									<a class="ui small button" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/">
+										{{ctx.Locale.Tr "repo.editor.upload_file"}}
+									</a>
+									{{end}}
+								{{end}}
+								{{template "repo/clone_buttons" .}}
+							</div>
+						</div>
+
+						{{if not .Repository.IsArchived}}
+							<div class="divider tw-my-0"></div>
+
+							<div class="item">
+								<h3>{{ctx.Locale.Tr "repo.create_new_repo_command"}}</h3>
+								<div class="markup">
+									<pre><code>touch README.md
+git init
+{{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}}
+git add README.md
+git commit -m "first commit"
+git remote add origin <span class="js-clone-url">{{$.CloneButtonOriginLink.HTTPS}}</span>
+git push -u origin {{.Repository.DefaultBranch}}</code></pre>
+								</div>
+							</div>
+							<div class="divider"></div>
+
+							<div class="item">
+								<h3>{{ctx.Locale.Tr "repo.push_exist_repo"}}</h3>
+								<div class="markup">
+									<pre><code>git remote add origin <span class="js-clone-url">{{$.CloneButtonOriginLink.HTTPS}}</span>
+git push -u origin {{.Repository.DefaultBranch}}</code></pre>
+								</div>
+							</div>
+						{{end}}
+					</div>
+				{{else}}
+					<div class="ui segment center">{{ctx.Locale.Tr "repo.empty_message"}}</div>
+				{{end}}
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/file_info.tmpl b/repo/file_info.tmpl
new file mode 100644
index 0000000..b63af68
--- /dev/null
+++ b/repo/file_info.tmpl
@@ -0,0 +1,48 @@
+<div class="file-info tw-font-mono">
+	{{if .FileIsSymlink}}
+		<div class="file-info-entry">
+			{{ctx.Locale.Tr "repo.symbolic_link"}}
+		</div>
+	{{end}}
+	{{if ne .NumLines nil}}
+		<div class="file-info-entry">
+			{{.NumLines}} {{ctx.Locale.TrN .NumLines "repo.line" "repo.lines"}}
+		</div>
+	{{end}}
+	{{if ne .FileSize nil}}
+		<div class="file-info-entry">
+			{{FileSize .FileSize}}{{if .IsLFSFile}} ({{ctx.Locale.Tr "repo.stored_lfs"}}){{end}}
+		</div>
+	{{end}}
+	{{if .LFSLock}}
+		<div class="file-info-entry ui" data-tooltip-content="{{.LFSLockHint}}">
+			{{svg "octicon-lock" 16 "tw-mr-1"}}
+			<a href="{{.LFSLockOwnerHomeLink}}">{{.LFSLockOwner}}</a>
+		</div>
+	{{end}}
+	{{if .LexerName}}
+		<div class="file-info-entry">
+			{{.LexerName}}
+		</div>
+	{{end}}
+	{{if .IsExecutable}}
+		<div class="file-info-entry">
+			{{ctx.Locale.Tr "repo.executable_file"}}
+		</div>
+	{{end}}
+	{{if .IsVendored}}
+		<div class="file-info-entry">
+			{{ctx.Locale.Tr "repo.vendored"}}
+		</div>
+	{{end}}
+	{{if .IsGenerated}}
+		<div class="file-info-entry">
+			{{ctx.Locale.Tr "repo.generated"}}
+		</div>
+	{{end}}
+	{{if .ImageSize}}
+		<div class="file-info-entry">
+			{{.ImageSize}}
+		</div>
+	{{end}}
+</div>
diff --git a/repo/find/files.tmpl b/repo/find/files.tmpl
new file mode 100644
index 0000000..ce24279
--- /dev/null
+++ b/repo/find/files.tmpl
@@ -0,0 +1,21 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<div class="tw-flex tw-items-center">
+			<a href="{{$.RepoLink}}">{{.RepoName}}</a>
+			<span class="tw-mx-2">/</span>
+			<div class="ui input tw-flex-1">
+				<input id="repo-file-find-input" type="text" autofocus data-url-data-link="{{.DataLink}}" data-url-tree-link="{{.TreeLink}}">
+			</div>
+		</div>
+		<table id="repo-find-file-table" class="ui single line fixed table">
+			<tbody>
+			</tbody>
+		</table>
+		<div id="repo-find-file-no-result" class="ui row center tw-mt-8 tw-hidden">
+			<h3>{{ctx.Locale.Tr "repo.find_file.no_matching"}}</h3>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/forks.tmpl b/repo/forks.tmpl
new file mode 100644
index 0000000..725b67c
--- /dev/null
+++ b/repo/forks.tmpl
@@ -0,0 +1,20 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository forks">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<h2 class="ui dividing header">
+			{{ctx.Locale.Tr "repo.forks"}}
+		</h2>
+		<div class="flex-list">
+		{{range .Forks}}
+			<div class="flex-item tw-border-0 repo-fork-item">
+				<span>{{ctx.AvatarUtils.Avatar .Owner}}</span>
+				<span><a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="{{.Link}}">{{.Name}}</a></span>
+			</div>
+		{{end}}
+		</div>
+	</div>
+
+	{{template "base/paginate" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/repo/graph.tmpl b/repo/graph.tmpl
new file mode 100644
index 0000000..9eb4bd4
--- /dev/null
+++ b/repo/graph.tmpl
@@ -0,0 +1,62 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository commits">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<div id="git-graph-container" class="ui segment{{if eq .Mode "monochrome"}} monochrome{{end}}">
+			<h2 class="ui header dividing">
+				{{ctx.Locale.Tr "repo.commit_graph"}}
+				<div class="ui icon buttons tiny color-buttons">
+					<div class="ui multiple selection search dropdown" id="flow-select-refs-dropdown">
+						<input type="hidden" name="flow">
+						<div class="default text">{{ctx.Locale.Tr "repo.commit_graph.select"}}</div>
+						<div class="menu">
+							<div class="item" data-value="...flow-hide-pr-refs">
+								<span class="truncate">
+									{{svg "octicon-eye-closed" 16 "tw-mr-1"}}<span title="{{ctx.Locale.Tr "repo.commit_graph.hide_pr_refs"}}">{{ctx.Locale.Tr "repo.commit_graph.hide_pr_refs"}}</span>
+								</span>
+							</div>
+							{{range .AllRefs}}
+								{{$refGroup := .RefGroup}}
+								{{if eq $refGroup "pull"}}
+									<div class="item" data-value="{{.Name}}">
+										<span class="truncate">
+											{{svg "octicon-git-pull-request" 16 "tw-mr-1"}}<span title="{{.ShortName}}">#{{.ShortName}}</span>
+										</span>
+									</div>
+								{{else if eq $refGroup "tags"}}
+									<div class="item" data-value="{{.Name}}">
+										<span class="truncate">
+											{{svg "octicon-tag" 16 "tw-mr-1"}}<span title="{{.ShortName}}">{{.ShortName}}</span>
+										</span>
+									</div>
+								{{else if eq $refGroup "remotes"}}
+									<div class="item" data-value="{{.Name}}">
+										<span class="truncate">
+											{{svg "octicon-cross-reference" 16 "tw-mr-1"}}<span title="{{.ShortName}}">{{.ShortName}}</span>
+										</span>
+									</div>
+								{{else if eq $refGroup "heads"}}
+									<div class="item" data-value="{{.Name}}">
+										<span class="truncate">
+											{{svg "octicon-git-branch" 16 "tw-mr-1"}}<span title="{{.ShortName}}">{{.ShortName}}</span>
+										</span>
+									</div>
+								{{end}}
+							{{end}}
+						</div>
+					</div>
+					<button id="flow-color-monochrome" class="ui labelled icon button{{if eq .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}">{{svg "material-invert-colors" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}</button>
+					<button id="flow-color-colored" class="ui labelled icon button{{if ne .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.color"}}">{{svg "material-palette" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.color"}}</button>
+				</div>
+			</h2>
+			<div class="ui dividing"></div>
+			<div class="is-loading tw-py-32 tw-hidden" id="loading-indicator"></div>
+			{{template "repo/graph/svgcontainer" .}}
+			{{template "repo/graph/commits" .}}
+		</div>
+	</div>
+</div>
+<div id="pagination">
+	{{template "base/paginate" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/repo/graph/commits.tmpl b/repo/graph/commits.tmpl
new file mode 100644
index 0000000..f1d0e62
--- /dev/null
+++ b/repo/graph/commits.tmpl
@@ -0,0 +1,77 @@
+<div id="rev-container">
+	<ul id="rev-list">
+		{{range $commitI, $commit := .Graph.Commits}}
+			<li {{if $commit.Rev}}id="commit-{{$commit.Rev}}"{{end}} data-flow="{{$commit.Flow}}">
+				{{if $commit.OnlyRelation}}
+					<span></span>
+				{{else}}
+					<span class="sha" id="{{$commit.ShortRev}}">
+						{{$class := "ui sha label"}}
+						{{if $commit.Commit.Signature}}
+							{{$class = (print $class " isSigned")}}
+							{{if $commit.Verification.Verified}}
+								{{if eq $commit.Verification.TrustStatus "trusted"}}
+									{{$class = (print $class " isVerified")}}
+								{{else if eq $commit.Verification.TrustStatus "untrusted"}}
+									{{$class = (print $class " isVerifiedUntrusted")}}
+								{{else}}
+									{{$class = (print $class " isVerifiedUnmatched")}}
+								{{end}}
+							{{else if $commit.Verification.Warning}}
+								{{$class = (print $class " isWarning")}}
+							{{end}}
+						{{end}}
+						<a href="{{$.RepoLink}}/commit/{{$commit.Rev|PathEscape}}" rel="nofollow" class="{{$class}}">
+							<span class="shortsha">{{ShortSha $commit.Commit.ID.String}}</span>
+							{{- if $commit.Commit.Signature -}}
+								{{template "repo/shabox_badge" dict "root" $ "verification" $commit.Verification}}
+							{{- end -}}
+						</a>
+					</span>
+					<span class="message tw-inline-block gt-ellipsis tw-mr-2">
+						<span>{{ctx.RenderUtils.RenderCommitMessage $commit.Subject ($.Repository.ComposeMetas ctx)}}</span>
+					</span>
+					<span class="commit-refs tw-flex tw-items-center tw-mr-1">
+						{{range $commit.Refs}}
+							{{$refGroup := .RefGroup}}
+							{{if eq $refGroup "pull"}}
+								{{if or (not $.HidePRRefs) (SliceUtils.Contains $.SelectedBranches .Name)}}
+									<!-- it's intended to use issues not pulls, if it's a pull you will get redirected -->
+									<a class="ui labelled basic tiny button" href="{{$.RepoLink}}/{{if $.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypePullRequests}}pulls{{else}}issues{{end}}/{{.ShortName|PathEscape}}">
+										{{svg "octicon-git-pull-request"}} #{{.ShortName}}
+									</a>
+								{{end}}
+							{{else if eq $refGroup "tags"}}
+								{{- template "repo/tag/name" dict "RepoLink" $.Repository.Link "TagName" .ShortName -}}
+							{{else if eq $refGroup "remotes"}}
+								<a class="ui labelled basic tiny button" href="{{$.RepoLink}}/src/commit/{{$commit.Rev|PathEscape}}">
+									{{svg "octicon-cross-reference"}} {{.ShortName}}
+								</a>
+							{{else if eq $refGroup "heads"}}
+								<a class="ui labelled basic tiny button" href="{{$.RepoLink}}/src/branch/{{.ShortName|PathEscape}}">
+									{{svg "octicon-git-branch"}} {{.ShortName}}
+								</a>
+							{{else}}
+								<!-- Unknown ref type .Name -->
+							{{end}}
+						{{end}}
+					</span>
+					<span class="author tw-flex tw-items-center tw-mr-2 tw-gap-1">
+						{{$userName := $commit.Commit.Author.Name}}
+						{{if $commit.User}}
+							{{if and $commit.User.FullName DefaultShowFullName}}
+								{{$userName = $commit.User.FullName}}
+							{{end}}
+							{{ctx.AvatarUtils.Avatar $commit.User 18}}
+							<a href="{{$commit.User.HomeLink}}">{{$userName}}</a>
+						{{else}}
+							{{ctx.AvatarUtils.AvatarByEmail $commit.Commit.Author.Email $userName 18}}
+							{{$userName}}
+						{{end}}
+					</span>
+					<span class="time tw-flex tw-items-center">{{DateUtils.FullTime $commit.Date}}</span>
+				{{end}}
+			</li>
+		{{end}}
+	</ul>
+</div>
diff --git a/repo/graph/div.tmpl b/repo/graph/div.tmpl
new file mode 100644
index 0000000..c0bd4e2
--- /dev/null
+++ b/repo/graph/div.tmpl
@@ -0,0 +1,7 @@
+<div>
+	{{template "repo/graph/svgcontainer" .}}
+	{{template "repo/graph/commits" .}}
+	<div id="pagination">
+		{{template "base/paginate" .}}
+	</div>
+</div>
diff --git a/repo/graph/svgcontainer.tmpl b/repo/graph/svgcontainer.tmpl
new file mode 100644
index 0000000..99c3c87
--- /dev/null
+++ b/repo/graph/svgcontainer.tmpl
@@ -0,0 +1,24 @@
+<div id="rel-container">
+	<svg viewbox="{{Eval .Graph.MinColumn "*" 5}} {{Eval .Graph.MinRow "*" 12}} {{Eval .Graph.Width "*" 5 "+" 5}} {{Eval .Graph.Height "*" 12}}" width="{{Eval .Graph.Width "*" 10 "+" 10}}px">
+		{{range $flowid, $flow := .Graph.Flows}}
+			<g id="flow-{{$flow.ID}}" class="flow-group flow-color-{{$flow.ColorNumber}} flow-color-16-{{$flow.Color16}}" data-flow="{{$flow.ID}}" data-color="{{$flow.ColorNumber}}">
+				<path d="{{range $i, $glyph := $flow.Glyphs -}}
+					{{- if or (eq $glyph.Glyph '*') (eq $glyph.Glyph '|') -}}
+						M {{Eval $glyph.Column "*" 5 "+" 5}} {{Eval $glyph.Row "*" 12 "+" 0}} v 12 {{/* */ -}}
+					{{- else if eq $glyph.Glyph '/' -}}
+						M {{Eval $glyph.Column "*" 5 "+" 10}} {{Eval $glyph.Row "*" 12 "+" 0}} l -10 12 {{/* */ -}}
+					{{- else if eq $glyph.Glyph '\\' -}}
+						M {{Eval $glyph.Column "*" 5 "+" 0}} {{Eval $glyph.Row "*" 12 "+" 0}} l 10 12 {{/* */ -}}
+					{{- else if or (eq $glyph.Glyph '-') (eq $glyph.Glyph '.') -}}
+						M {{Eval $glyph.Column "*" 5 "+" 0}} {{Eval $glyph.Row "*" 12 "+" 12}} h 5 {{/* */ -}}
+					{{- else if eq $glyph.Glyph '_' -}}
+						M {{Eval $glyph.Column "*" 5 "+" 0}} {{Eval $glyph.Row "*" 12 "+" 12}} h 10 {{/* */ -}}
+					{{- end -}}
+				{{- end}}" stroke-width="1" fill="none" id="flow-{{$flow.ID}}-path" stroke-linecap="round"></path>
+				{{range $flow.Commits}}
+					<circle class="flow-commit" cx="{{Eval .Column "*" 5 "+" 5}}" cy="{{Eval .Row "*" 12 "+" 6}}" r="2.5" stroke="none" id="flow-commit-{{.Rev}}" data-rev="{{.Rev}}"></circle>
+				{{end}}
+			</g>
+		{{end}}
+	</svg>
+</div>
diff --git a/repo/header.tmpl b/repo/header.tmpl
new file mode 100644
index 0000000..e187ef1
--- /dev/null
+++ b/repo/header.tmpl
@@ -0,0 +1,236 @@
+<div class="secondary-nav">
+{{with .Repository}}
+	<div class="ui container">
+		<div class="repo-header">
+			<div class="flex-item tw-items-center">
+				<div class="flex-item-leading">
+					{{template "repo/icon" .}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-title tw-text-18">
+						<a class="muted tw-font-normal" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/<a class="muted" href="{{$.RepoLink}}">{{.Name}}</a>
+					</div>
+				</div>
+				<div class="flex-item-trailing">
+					{{if .IsArchived}}
+						<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
+						<div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.archived"}}">{{svg "octicon-archive" 18}}</div>
+					{{end}}
+					{{if .IsPrivate}}
+						<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.private"}}</span>
+						<div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.private"}}">{{svg "octicon-lock" 18}}</div>
+					{{else}}
+						{{if .Owner.Visibility.IsPrivate}}
+							<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
+							<div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.internal"}}">{{svg "octicon-shield-lock" 18}}</div>
+						{{end}}
+					{{end}}
+					{{if .IsTemplate}}
+						<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.template"}}</span>
+						<div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div>
+					{{end}}
+					{{if eq .ObjectFormatName "sha256"}}
+						<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
+					{{end}}
+				</div>
+			</div>
+			{{if not (or .IsBeingCreated .IsBroken)}}
+				<div class="repo-buttons">
+					{{if $.RepoTransfer}}
+						<form method="post" action="{{$.RepoLink}}/action/accept_transfer?redirect_to={{$.RepoLink}}">
+							{{$.CsrfTokenHtml}}
+							<div data-tooltip-content="{{if $.CanUserAcceptTransfer}}{{ctx.Locale.Tr "repo.transfer.accept_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{ctx.Locale.Tr "repo.transfer.no_permission_to_accept"}}{{end}}">
+								<button type="submit" class="ui basic button {{if $.CanUserAcceptTransfer}}primary {{end}} ok small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}>
+									{{ctx.Locale.Tr "repo.transfer.accept"}}
+								</button>
+							</div>
+						</form>
+						<form method="post" action="{{$.RepoLink}}/action/reject_transfer?redirect_to={{$.RepoLink}}">
+							{{$.CsrfTokenHtml}}
+							<div data-tooltip-content="{{if $.CanUserAcceptTransfer}}{{ctx.Locale.Tr "repo.transfer.reject_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{ctx.Locale.Tr "repo.transfer.no_permission_to_reject"}}{{end}}">
+								<button type="submit" class="ui basic button {{if $.CanUserAcceptTransfer}}red {{end}}ok small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}>
+									{{ctx.Locale.Tr "repo.transfer.reject"}}
+								</button>
+							</div>
+						</form>
+					{{end}}
+					{{if $.EnableFeed}}
+					{{/* An extra div-element is not necessary here, as this button does not secretly contain two buttons. */}}
+					<a class="ui compact small basic button" href="{{$.RepoLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
+						{{svg "octicon-rss" 16}}
+					</a>
+					{{end}}
+					{{template "repo/watch_unwatch" $}}
+					{{if not $.DisableStars}}
+					{{template "repo/star_unstar" $}}
+					{{end}}
+					{{if and (not .IsEmpty) ($.Permission.CanRead ctx.Consts.RepoUnitTypeCode)}}
+						<div class="ui labeled button
+							{{if or (not $.IsSigned) (and (not $.CanSignedUserFork) (not $.UserAndOrgForks))}}
+								disabled
+							{{end}}"
+							{{if not $.IsSigned}}
+								data-tooltip-content="{{ctx.Locale.Tr "repo.fork_guest_user"}}"
+							{{else if and (not $.CanSignedUserFork) (not $.UserAndOrgForks)}}
+								data-tooltip-content="{{ctx.Locale.Tr "repo.fork_from_self"}}"
+							{{end}}
+						>
+							<a class="ui compact{{if $.ShowForkModal}} show-modal{{end}} small basic button"
+								{{if not $.CanSignedUserFork}}
+									{{if gt (len $.UserAndOrgForks) 1}}
+										href="#" data-modal="#fork-repo-modal"
+									{{else if eq (len $.UserAndOrgForks) 1}}
+										href="{{AppSubUrl}}/{{(index $.UserAndOrgForks 0).FullName}}"
+									{{/*else is not required here, because the button shouldn't link to any site if you can't create a fork*/}}
+									{{end}}
+								{{else if not $.UserAndOrgForks}}
+									href="{{$.RepoLink}}/fork"
+								{{else}}
+									href="#" data-modal="#fork-repo-modal"
+								{{end}}
+							>
+								{{svg "octicon-repo-forked"}}<span class="text not-mobile">{{ctx.Locale.Tr "repo.fork"}}</span>
+							</a>
+							<a class="ui basic label" href="{{.Link}}/forks">
+								{{CountFmt .NumForks}}
+							</a>
+						</div>
+						<div class="ui small modal" id="fork-repo-modal">
+							<div class="header">
+								{{ctx.Locale.Tr "repo.already_forked" .Name}}
+							</div>
+							<div class="content tw-text-left">
+								<div class="ui list">
+									{{range $.UserAndOrgForks}}
+										<div class="ui item tw-py-2">
+											<a href="{{.Link}}">{{svg "octicon-repo-forked" 16 "tw-mr-2"}}{{.FullName}}</a>
+										</div>
+									{{end}}
+								</div>
+								{{if $.CanSignedUserFork}}
+								<div class="divider"></div>
+								<a href="{{$.RepoLink}}/fork">{{ctx.Locale.Tr "repo.fork_to_different_account"}}</a>
+								{{end}}
+							</div>
+						</div>
+					{{end}}
+				</div>
+			{{end}}
+		</div>
+		{{if $.PullMirror}}
+			<div class="fork-flag">
+				{{ctx.Locale.Tr "repo.mirror_from"}}
+				<a target="_blank" rel="noopener noreferrer" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a>
+				{{if $.PullMirror.UpdatedUnix}}{{ctx.Locale.Tr "repo.mirror_sync"}} {{DateUtils.TimeSince $.PullMirror.UpdatedUnix}}{{end}}
+			</div>
+		{{end}}
+		{{if .IsFork}}<div class="fork-flag">{{ctx.Locale.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{.BaseRepo.FullName}}</a></div>{{end}}
+		{{if .IsGenerated}}<div class="fork-flag">{{ctx.Locale.Tr "repo.generated_from"}} <a href="{{(.TemplateRepo ctx).Link}}">{{(.TemplateRepo ctx).FullName}}</a></div>{{end}}
+	</div>
+{{end}}
+	<div class="ui container">
+		<overflow-menu class="ui secondary pointing menu">
+			{{if not (or .Repository.IsBeingCreated .Repository.IsBroken)}}
+				<div class="overflow-menu-items">
+					{{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
+					<a class="{{if .PageIsViewCode}}active {{end}}item" href="{{.RepoLink}}{{if and (ne .BranchName .Repository.DefaultBranch) (not $.PageIsWiki)}}/src/{{.BranchNameSubURL}}{{end}}">
+						{{svg "octicon-code"}} {{ctx.Locale.Tr "repo.code"}}
+					</a>
+					{{end}}
+
+					{{if .Permission.CanRead ctx.Consts.RepoUnitTypeIssues}}
+						<a class="{{if .PageIsIssueList}}active {{end}}item" href="{{.RepoLink}}/issues">
+							{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues"}}
+							{{if .Repository.NumOpenIssues}}
+								<span class="ui small label">{{CountFmt .Repository.NumOpenIssues}}</span>
+							{{end}}
+						</a>
+					{{end}}
+
+					{{if .Permission.CanRead ctx.Consts.RepoUnitTypeExternalTracker}}
+						<a class="{{if .PageIsIssueList}}active {{end}}item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
+							{{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.issues"}}
+						</a>
+					{{end}}
+
+					{{if and .Repository.CanEnablePulls (.Permission.CanRead ctx.Consts.RepoUnitTypePullRequests)}}
+						<a class="{{if .PageIsPullList}}active {{end}}item" href="{{.RepoLink}}/pulls">
+							{{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "repo.pulls"}}
+							{{if .Repository.NumOpenPulls}}
+								<span class="ui small label">{{CountFmt .Repository.NumOpenPulls}}</span>
+							{{end}}
+						</a>
+					{{end}}
+
+					{{if and .EnableActions (.Permission.CanRead ctx.Consts.RepoUnitTypeActions) (not .IsEmptyRepo)}}
+						<a class="{{if .PageIsActions}}active {{end}}item" href="{{.RepoLink}}/actions">
+							{{svg "octicon-play"}} {{ctx.Locale.Tr "actions.actions"}}
+							{{if .Repository.NumOpenActionRuns}}
+								<span class="ui small label">{{CountFmt .Repository.NumOpenActionRuns}}</span>
+							{{end}}
+						</a>
+					{{end}}
+
+					{{if .Permission.CanRead ctx.Consts.RepoUnitTypePackages}}
+						<a href="{{.RepoLink}}/packages" class="{{if .IsPackagesPage}}active {{end}}item">
+							{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
+						</a>
+					{{end}}
+
+					{{$projectsUnit := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeProjects}}
+					{{if and (not ctx.Consts.RepoUnitTypeProjects.UnitGlobalDisabled) (.Permission.CanRead ctx.Consts.RepoUnitTypeProjects) ($projectsUnit.ProjectsConfig.IsProjectsAllowed "repo")}}
+						<a href="{{.RepoLink}}/projects" class="{{if .IsProjectsPage}}active {{end}}item">
+							{{svg "octicon-project"}} {{ctx.Locale.Tr "repo.projects"}}
+							{{if .Repository.NumOpenProjects}}
+								<span class="ui small label">{{CountFmt .Repository.NumOpenProjects}}</span>
+							{{end}}
+						</a>
+					{{end}}
+
+					{{if and (.Permission.CanRead ctx.Consts.RepoUnitTypeReleases) (not .IsEmptyRepo)}}
+					<a class="{{if or .PageIsReleaseList .PageIsTagList}}active {{end}}item" href="{{.RepoLink}}/releases">
+						{{svg "octicon-tag"}} {{ctx.Locale.Tr "repo.releases"}}
+						{{if .NumReleases}}
+							<span class="ui small label">{{CountFmt .NumReleases}}</span>
+						{{end}}
+					</a>
+					{{end}}
+
+					{{if .Permission.CanRead ctx.Consts.RepoUnitTypeWiki}}
+						<a class="{{if .PageIsWiki}}active {{end}}item" href="{{.RepoLink}}/wiki">
+							{{svg "octicon-book"}} {{ctx.Locale.Tr "repo.wiki"}}
+						</a>
+					{{end}}
+
+					{{if .Permission.CanRead ctx.Consts.RepoUnitTypeExternalWiki}}
+						<a class="item" href="{{(.Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL}}" target="_blank" rel="noopener noreferrer">
+							{{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.wiki"}}
+						</a>
+					{{end}}
+
+					{{if and (.Permission.CanReadAny ctx.Consts.RepoUnitTypePullRequests ctx.Consts.RepoUnitTypeIssues ctx.Consts.RepoUnitTypeReleases) (not .IsEmptyRepo)}}
+						<a class="{{if .PageIsActivity}}active {{end}}item" href="{{.RepoLink}}/activity">
+							{{svg "octicon-pulse"}} {{ctx.Locale.Tr "repo.activity"}}
+						</a>
+					{{end}}
+
+					{{template "custom/extra_tabs" .}}
+
+					{{if .Permission.IsAdmin}}
+						<span class="item-flex-space"></span>
+						<a class="{{if .PageIsRepoSettings}}active {{end}} item" href="{{.RepoLink}}/settings">
+							{{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
+						</a>
+					{{end}}
+				</div>
+			{{else if .Permission.IsAdmin}}
+				<div class="overflow-menu-items">
+					<a class="{{if .PageIsRepoSettings}}active {{end}} item" href="{{.RepoLink}}/settings">
+						{{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
+					</a>
+				</div>
+			{{end}}
+		</overflow-menu>
+	</div>
+	<div class="ui tabs divider"></div>
+</div>
diff --git a/repo/home.tmpl b/repo/home.tmpl
new file mode 100644
index 0000000..f80c9c1
--- /dev/null
+++ b/repo/home.tmpl
@@ -0,0 +1,145 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository file list {{if .IsBlame}}blame{{end}}">
+	{{template "repo/header" .}}
+	<div class="ui container {{if .IsBlame}}fluid padded{{end}}">
+		{{template "base/alert" .}}
+
+		{{if .Repository.IsArchived}}
+			<div class="ui warning message tw-text-center">
+				{{if .Repository.ArchivedUnix.IsZero}}
+					{{ctx.Locale.Tr "repo.archive.title"}}
+				{{else}}
+					{{ctx.Locale.Tr "repo.archive.title_date" (DateUtils.AbsoluteLong .Repository.ArchivedUnix)}}
+				{{end}}
+			</div>
+		{{end}}
+
+		{{template "repo/code/recently_pushed_new_branches" .}}
+
+		{{$treeNamesLen := len .TreeNames}}
+		{{$isTreePathRoot := eq $treeNamesLen 0}}
+		{{$showSidebar := and $isTreePathRoot (not .HideRepoInfo) (not .IsBlame)}}
+		<div class="{{Iif $showSidebar "repo-grid-filelist-sidebar" "repo-grid-filelist-only"}}">
+			<div class="repo-home-filelist">
+				{{template "repo/sub_menu" .}}
+				<div class="repo-button-row">
+					<div class="repo-button-row-left">
+						{{- /* for repo home (default branch) and /owner/repo/src/branch/the-name */ -}}
+						{{- $branchDropdownCurrentRefType := "branch" -}}
+						{{- $branchDropdownCurrentRefShortName := .BranchName -}}
+						{{- if .IsViewTag -}}
+							{{- /* for /owner/repo/src/tag/the-name */ -}}
+							{{- $branchDropdownCurrentRefType = "tag" -}}
+							{{- $branchDropdownCurrentRefShortName = .TagName -}}
+						{{- else if .IsViewCommit -}}
+							{{- /* for /owner/repo/src/commit/000000 */ -}}
+							{{- $branchDropdownCurrentRefType = "commit" -}}
+							{{- $branchDropdownCurrentRefShortName = ShortSha .CommitID -}}
+						{{- end -}}
+						{{- template "repo/branch_dropdown" dict
+							"Repository" .Repository
+							"ShowTabBranches" true
+							"ShowTabTags" true
+							"CurrentRefType" $branchDropdownCurrentRefType
+							"CurrentRefShortName" $branchDropdownCurrentRefShortName
+							"CurrentTreePath" .TreePath
+							"RefLinkTemplate" "{RepoLink}/src/{RefType}/{RefShortName}/{TreePath}"
+							"AllowCreateNewRef" .CanCreateBranch
+							"ShowViewAllRefsEntry" true
+						-}}
+						{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
+							{{$cmpBranch := ""}}
+							{{if ne .Repository.ID .BaseRepo.ID}}
+								{{$cmpBranch = printf "%s/%s:" (.Repository.OwnerName|PathEscape) (.Repository.Name|PathEscape)}}
+							{{end}}
+							{{$cmpBranch = print $cmpBranch (.BranchName|PathEscapeSegments)}}
+							{{$compareLink := printf "%s/compare/%s...%s" .BaseRepo.Link (.BaseRepo.DefaultBranch|PathEscapeSegments) $cmpBranch}}
+							<a id="new-pull-request" role="button" class="ui compact basic button" href="{{$compareLink}}"
+								data-tooltip-content="{{if .PullRequestCtx.Allowed}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}">
+								{{svg "octicon-git-pull-request"}}
+							</a>
+						{{end}}
+
+						<!-- Show go to file if on home page -->
+						{{if $isTreePathRoot}}
+							<a href="{{.Repository.Link}}/find/{{.BranchNameSubURL}}" class="ui compact basic button">{{ctx.Locale.Tr "repo.find_file.go_to_file"}}</a>
+						{{end}}
+
+						{{if and .CanWriteCode .IsViewBranch (not .Repository.IsMirror) (not .Repository.IsArchived) (not .IsViewFile)}}
+							<button class="ui dropdown basic compact jump button"{{if not .Repository.CanEnableEditor}} disabled{{end}}>
+								{{ctx.Locale.Tr "repo.editor.add_file"}}
+								{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+								<div class="menu">
+									<a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
+										{{ctx.Locale.Tr "repo.editor.new_file"}}
+									</a>
+									{{if .RepositoryUploadEnabled}}
+									<a class="item" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
+										{{ctx.Locale.Tr "repo.editor.upload_file"}}
+									</a>
+									{{end}}
+									<a class="item" href="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
+										{{ctx.Locale.Tr "repo.editor.patch"}}
+									</a>
+								</div>
+							</button>
+						{{end}}
+
+						{{if and $isTreePathRoot .Repository.IsTemplate}}
+							<a role="button" class="ui primary compact button" href="{{AppSubUrl}}/repo/create?template_id={{.Repository.ID}}">
+								{{ctx.Locale.Tr "repo.use_template"}}
+							</a>
+						{{end}}
+
+						{{if not $isTreePathRoot}}
+							{{$treeNameIdxLast := Eval $treeNamesLen "-" 1}}
+							<span class="breadcrumb repo-path tw-ml-1">
+								<a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{StringUtils.EllipsisString .Repository.Name 30}}</a>
+								{{- range $i, $v := .TreeNames -}}
+									<span class="breadcrumb-divider">/</span>
+									{{- if eq $i $treeNameIdxLast -}}
+										<span class="active section" title="{{$v}}">{{$v}}</span>
+										<button class="btn interact-fg tw-mx-1" data-clipboard-text="{{$.TreePath}}" data-tooltip-content="{{ctx.Locale.Tr "copy_path"}}">{{svg "octicon-copy" 14}}</button>
+									{{- else -}}
+										{{$p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{$v}}</a></span>
+									{{- end -}}
+								{{- end -}}
+							</span>
+						{{end}}
+					</div>
+
+					<div class="repo-button-row-right">
+						<!-- Only show clone panel in repository home page -->
+						{{if $isTreePathRoot}}
+							{{template "repo/clone_panel" .}}
+						{{end}}
+						{{if and (not $isTreePathRoot) (not .IsViewFile) (not .IsBlame)}}{{/* IsViewDirectory (not home), TODO: split the templates, avoid using "if" tricks */}}
+							<a class="ui button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">
+								{{svg "octicon-history" 16 "tw-mr-2"}}{{ctx.Locale.Tr "repo.file_history"}}
+							</a>
+						{{end}}
+					</div>
+				</div>
+				{{if .IsViewFile}}
+					{{template "repo/view_file" .}}
+				{{else if .IsBlame}}
+					{{template "repo/blame" .}}
+				{{else}}{{/* IsViewDirectory */}}
+					{{if $isTreePathRoot}}
+						{{template "repo/code/upstream_diverging_info" .}}
+					{{end}}
+					{{template "repo/view_list" .}}
+					{{if and .ReadmeExist (or .IsMarkup .IsPlainText)}}
+						{{template "repo/view_file" .}}
+					{{end}}
+				{{end}}
+			</div>
+
+			{{if $showSidebar}}
+				{{template "repo/home_sidebar_top" .}}
+				{{template "repo/home_sidebar_bottom" .}}
+			{{end}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/home_sidebar_bottom.tmpl b/repo/home_sidebar_bottom.tmpl
new file mode 100644
index 0000000..f780dc1
--- /dev/null
+++ b/repo/home_sidebar_bottom.tmpl
@@ -0,0 +1,61 @@
+<div class="repo-home-sidebar-bottom">
+	<div class="flex-list">
+		{{if .LatestRelease}}
+		<div class="flex-item">
+			<div class="flex-item-main">
+				<div class="flex-item-title">
+					<a class="item muted" href="{{.Link}}/releases">
+						{{ctx.Locale.Tr "repo.releases"}}
+						<span class="ui small label">{{.NumReleases}}</span>
+					</a>
+				</div>
+				<div class="flex-item">
+					<div class="flex-item-icon">
+						{{svg "octicon-tag" 16}}
+					</div>
+					<div class="flex-item-main">
+						<div class="flex-item-header">
+							<div class="flex-item-title tw-gap-2">
+								<a class="gt-ellipsis muted" href="{{.LatestRelease.Link}}" title="{{.LatestRelease.Title}}">{{.LatestRelease.Title}}</a>
+								{{template "repo/release/label" (dict "Release" .LatestRelease "IsLatest" true)}}
+							</div>
+						</div>
+						<div class="flex-item-body">
+							<span class="time">{{DateUtils.TimeSince .LatestRelease.CreatedUnix}}</span>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		{{end}}
+
+		{{if and (not .IsEmptyRepo) .LanguageStats}}
+		<div class="flex-item">
+			<div class="flex-item-main">
+				<div class="flex-item-title">
+					{{ctx.Locale.Tr "repo.repo_lang"}}
+				</div>
+
+				<div class="flex-item-body">
+					<div class="language-stats">
+						{{range .LanguageStats}}
+							<div class="bar" style="width: {{.Percentage}}%; background-color: {{.Color}}" data-tooltip-placement="top" data-tooltip-content={{.Language}} data-tooltip-follow-cursor="horizontal"></div>
+						{{end}}
+					</div>
+					<div class="language-stats-details">
+						{{range .LanguageStats}}
+							<div class="item">
+								<i class="color-icon" style="background-color: {{.Color}}"></i>
+								<span class="tw-font-semibold">
+									{{Iif (eq .Language "other") (ctx.Locale.Tr "repo.language_other") .Language}}
+								</span>
+								{{.Percentage}}%
+							</div>
+						{{end}}
+					</div>
+				</div>
+			</div>
+		</div>
+		{{end}}
+	</div>
+</div>
diff --git a/repo/home_sidebar_top.tmpl b/repo/home_sidebar_top.tmpl
new file mode 100644
index 0000000..8d3d7c6
--- /dev/null
+++ b/repo/home_sidebar_top.tmpl
@@ -0,0 +1,75 @@
+<div class="repo-home-sidebar-top">
+	<form class="ignore-dirty tw-flex tw-flex-1" action="{{.RepoLink}}/search" method="get">
+		<div class="ui small action input tw-flex-1">
+			<input name="q" size="10" placeholder="{{ctx.Locale.Tr "search.code_kind"}}"> {{template "shared/search/button"}}
+		</div>
+	</form>
+
+	<div class="flex-list">
+		<div class="flex-item">
+			<div class="flex-item-main">
+				<div class="flex-item-title">{{ctx.Locale.Tr "repo.repo_desc"}}</div>
+				<div class="flex-item-body tw-text-16">
+					<div class="tw-flex tw-flex-col tw-gap-2 tw-mt-2">
+						<div class="repo-description tw-break-anywhere tw-gap-2">
+							{{- $description := .Repository.DescriptionHTML ctx -}}
+							{{if $description}}{{$description | RenderCodeBlock}}{{else}}{{ctx.Locale.Tr "repo.repo_no_desc"}}{{end}}
+						</div>
+
+						{{if .Repository.Website}}
+							<a class="flex-text-block" href="{{.Repository.Website}}">
+								{{svg "octicon-link" 16 "tw-text-text"}} <span class="tw-text-primary">{{.Repository.Website}}</span>
+							</a>
+						{{end}}
+
+						<div id="repo-topics" class="flex-text-block tw-flex-wrap tw-gap-1 tw-my-1 tw-text-text">
+							{{/* !!!! it SHOULD and MUST match the code in repo-home.ts */}}
+							{{range .Topics}}<a class="repo-topic ui large label gt-ellipsis" title={{.Name}} href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
+						</div>
+						{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
+							<button id="manage_topic" class="btn interact-fg tw-mb-2 tw-text-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>
+							<div class="ui form tw-hidden tw-my-2" id="topic_edit">
+								<div class="ui fluid multiple search selection dropdown tw-flex-wrap tw-flex-1">
+									<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}">
+									{{range .Topics}}
+										{{/* keep the same layout as Fomantic UI generated labels */}}
+										<a class="ui label transition visible tw-cursor-default tw-inline-block repo-topic" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a>
+									{{end}}
+									<div class="text"></div>
+								</div>
+								<div class="tw-my-2">
+									<button class="ui primary button" id="save_topic" data-link="{{.RepoLink}}/topics">{{ctx.Locale.Tr "save"}}</button>
+									<button class="ui basic button" id="cancel_topic_edit">{{ctx.Locale.Tr "cancel"}}</button>
+								</div>
+							</div>
+						{{end}}
+
+						{{if .ReadmeExist}}
+							<a class="flex-text-block muted" href="{{.TreeLink}}/{{.FileName}}">
+								{{svg "octicon-book"}} {{ctx.Locale.Tr "readme"}}
+							</a>
+						{{end}}
+
+						{{if .DetectedRepoLicenses}}
+							<a class="flex-text-block muted" href="{{.RepoLink}}/src/{{.Repository.DefaultBranch}}/{{PathEscapeSegments .LicenseFileName}}" title="{{StringUtils.Join .DetectedRepoLicenses ", "}}">
+								{{svg "octicon-law"}} {{if eq (len .DetectedRepoLicenses) 1}}{{index .DetectedRepoLicenses 0}}{{else}}{{ctx.Locale.Tr "repo.multiple_licenses"}}{{end}}
+							</a>
+						{{end}}
+
+						{{if .CitiationExist}}
+							{{template "repo/cite/cite_modal" .}}
+							<a class="flex-text-block muted" id="cite-repo-button">
+								{{svg "octicon-cross-reference"}} {{ctx.Locale.Tr "repo.cite_this_repo"}}
+							</a>
+						{{end}}
+						<span class="flex-text-block muted" {{if not (eq .Repository.Size 0)}}data-tooltip-placement="top" data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}>
+							{{$fileSizeFormatted := FileSize .Repository.Size}}{{/* the formatted string is always "{val} {unit}" */}}
+							{{$fileSizeFields := StringUtils.Split $fileSizeFormatted " "}}
+							{{svg "octicon-database"}} <b>{{ctx.Locale.PrettyNumber (index $fileSizeFields 0)}}</b> {{index $fileSizeFields 1}}
+						</span>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
diff --git a/repo/icon.tmpl b/repo/icon.tmpl
new file mode 100644
index 0000000..e5e0bd6
--- /dev/null
+++ b/repo/icon.tmpl
@@ -0,0 +1,10 @@
+{{$avatarLink := (.RelAvatarLink ctx)}}
+{{if $avatarLink}}
+	<img class="ui avatar tw-align-middle" src="{{$avatarLink}}" width="24" height="24" alt="{{.FullName}}">
+{{else if $.IsMirror}}
+	{{svg "octicon-mirror" 24}}
+{{else if $.IsFork}}
+	{{svg "octicon-repo-forked" 24}}
+{{else}}
+	{{svg "octicon-repo" 24}}
+{{end}}
diff --git a/repo/issue/branch_selector_field.tmpl b/repo/issue/branch_selector_field.tmpl
new file mode 100644
index 0000000..9183b7b
--- /dev/null
+++ b/repo/issue/branch_selector_field.tmpl
@@ -0,0 +1,62 @@
+{{/* TODO: RemoveIssueRef: the Issue.Ref will be removed in 1.24 or 1.25 if no end user really needs it or there could be better alternative then.
+PR: https://github.com/go-gitea/gitea/pull/32744
+
+The Issue.Ref was added by Add possibility to record branch or tag information in an issue (#780)
+After 8 years, this "branch selector" does nothing more than saving the branch/tag name into database and displays it.
+
+There are still users using it:
+* @didim99: it is a really useful feature to specify a branch in which issue found.
+
+Still needs to figure out:
+* Could the "recording branch/tag name" be replaced by other approaches?
+	* Write the branch name in the issue title/body then it will still be displayed, eg: `[bug] (fix/ui-broken-bug) there is a bug ....`
+* Is "GitHub-like development sidebar (`#31899`)" good enough (or better) for your usage?
+*/}}
+{{if and (not .Issue.IsPull) (not .PageIsComparePull)}}
+<input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}">
+<div class="ui dropdown select-branch branch-selector-dropdown ellipsis-items-nowrap {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}"
+	data-no-results="{{ctx.Locale.Tr "no_results_found"}}"
+	{{if and .Issue (or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}data-url-update-issueref="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref"{{end}}
+>
+	<div class="ui button branch-dropdown-button">
+		<span class="text-branch-name gt-ellipsis">{{if .Reference}}{{$.RefEndName}}{{else}}{{ctx.Locale.Tr "repo.issues.no_ref"}}{{end}}</span>
+		{{if .HasIssuesOrPullsWritePermission}}{{svg "octicon-triangle-down" 14 "dropdown icon"}}{{end}}
+	</div>
+	<div class="menu">
+		<div class="ui icon search input">
+			<i class="icon">{{svg "octicon-filter" 16}}</i>
+			<input name="search" placeholder="{{ctx.Locale.Tr "repo.filter_branch_and_tag"}}...">
+		</div>
+		<div class="branch-tag-tab">
+			<a class="branch-tag-item reference column muted active" href="#" data-target="#branch-list">
+				{{svg "octicon-git-branch" 16 "tw-mr-1"}} {{ctx.Locale.Tr "repo.branches"}}
+			</a>
+			<a class="branch-tag-item reference column muted" href="#" data-target="#tag-list">
+				{{svg "octicon-tag" 16 "tw-mr-1"}} {{ctx.Locale.Tr "repo.tags"}}
+			</a>
+		</div>
+		<div class="branch-tag-divider"></div>
+		<div id="branch-list" class="scrolling menu reference-list-menu">
+			{{if or .Reference (not .Issue)}}
+				<div class="item text small" data-id="" data-name="{{ctx.Locale.Tr "repo.issues.no_ref"}}" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div>
+			{{end}}
+			{{range .Branches}}
+				<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector" title="{{.}}">{{.}}</div>
+			{{else}}
+				<div class="item disabled">{{ctx.Locale.Tr "no_results_found"}}</div>
+			{{end}}
+		</div>
+		<div id="tag-list" class="scrolling menu reference-list-menu tw-hidden">
+			{{if or .Reference (not .Issue)}}
+				<div class="item text small" data-id="" data-name="{{ctx.Locale.Tr "repo.issues.no_ref"}}" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div>
+			{{end}}
+			{{range .Tags}}
+				<div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div>
+			{{else}}
+				<div class="item disabled">{{ctx.Locale.Tr "no_results_found"}}</div>
+			{{end}}
+		</div>
+	</div>
+</div>
+<div class="divider"></div>
+{{end}}
diff --git a/repo/issue/card.tmpl b/repo/issue/card.tmpl
new file mode 100644
index 0000000..2e19e86
--- /dev/null
+++ b/repo/issue/card.tmpl
@@ -0,0 +1,78 @@
+{{with .Issue}}
+	{{if eq $.Page.Project.CardType 1}}{{/* Images and Text*/}}
+		{{$attachments := index $.Page.issuesAttachmentMap .ID}}
+		{{if $attachments}}
+		<div class="card-attachment-images">
+			{{range $attachments}}
+				<img src="{{.DownloadURL}}" alt="{{.Name}}" />
+			{{end}}
+		</div>
+		{{end}}
+	{{end}}
+	<div class="content tw-w-full">
+		<div class="tw-flex tw-items-start tw-gap-[5px]">
+			<div class="issue-card-icon">
+				{{template "shared/issueicon" .}}
+			</div>
+			<a class="issue-card-title muted issue-title tw-break-anywhere" href="{{.Link}}">{{.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+			{{if and $.isPinnedIssueCard $.Page.IsRepoAdmin}}
+				<a role="button" class="issue-card-unpin muted tw-flex tw-items-center" data-tooltip-content={{ctx.Locale.Tr "repo.issues.unpin_issue"}} data-issue-id="{{.ID}}" data-unpin-url="{{$.Page.Link}}/unpin/{{.Index}}">
+					{{svg "octicon-x" 16}}
+				</a>
+			{{end}}
+		</div>
+		<div class="meta">
+			<span class="text light grey muted-links">
+				{{if not $.Page.Repository}}{{.Repo.FullName}}{{end}}#{{.Index}}
+				{{$timeStr := DateUtils.TimeSince .GetLastEventTimestamp}}
+				{{if .OriginalAuthor}}
+					{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}}
+				{{else if gt .Poster.ID 0}}
+					{{ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}}
+				{{else}}
+					{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}}
+				{{end}}
+			</span>
+		</div>
+		{{if .MilestoneID}}
+		<div class="meta tw-my-1">
+			<a class="milestone" href="{{.Repo.Link}}/milestone/{{.MilestoneID}}">
+				{{svg "octicon-milestone" 16 "tw-mr-1 tw-align-middle"}}
+				<span class="tw-align-middle">{{.Milestone.Name}}</span>
+			</a>
+		</div>
+		{{end}}
+		{{if $.Page.LinkedPRs}}
+		{{range index $.Page.LinkedPRs .ID}}
+		<div class="meta tw-my-1">
+			<a href="{{$.Issue.Repo.Link}}/pulls/{{.Index}}">
+				<span class="tw-m-0 text {{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge" 16 "tw-mr-1 tw-align-middle"}}</span>
+				<span class="tw-align-middle">{{.Title}} <span class="text light grey">#{{.Index}}</span></span>
+			</a>
+		</div>
+		{{end}}
+		{{end}}
+		{{$tasks := .GetTasks}}
+		{{if gt $tasks 0}}
+			<div class="meta tw-my-1">
+				{{svg "octicon-checklist" 16 "tw-mr-1 tw-align-middle"}}
+				<span class="tw-align-middle">{{.GetTasksDone}} / {{$tasks}}</span>
+			</div>
+		{{end}}
+	</div>
+
+	{{if or .Labels .Assignees}}
+	<div class="issue-card-bottom">
+		<div class="labels-list">
+			{{range .Labels}}
+				<a target="_blank" href="{{$.Issue.Repo.Link}}/issues?labels={{.ID}}">{{ctx.RenderUtils.RenderLabel .}}</a>
+			{{end}}
+		</div>
+		<div class="issue-card-assignees">
+			{{range .Assignees}}
+				<a target="_blank" href="{{.HomeLink}}" data-tooltip-content="{{ctx.Locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{ctx.AvatarUtils.Avatar . 28}}</a>
+			{{end}}
+		</div>
+	</div>
+	{{end}}
+{{end}}
diff --git a/repo/issue/choose.tmpl b/repo/issue/choose.tmpl
new file mode 100644
index 0000000..38cf9e4
--- /dev/null
+++ b/repo/issue/choose.tmpl
@@ -0,0 +1,59 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new issue">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<div class="issue-navbar">
+			{{template "repo/issue/navbar" .}}
+		</div>
+		<div class="divider"></div>
+		{{range .IssueTemplates}}
+			<div class="ui attached segment">
+				<div class="ui two column grid">
+					<div class="column left aligned">
+						<strong>{{.Name}}</strong>
+						<br>{{.About}}
+					</div>
+					<div class="column right aligned">
+						<a href="{{$.RepoLink}}/issues/new?template={{.FileName}}{{if $.milestone}}&milestone={{$.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui primary button">{{ctx.Locale.Tr "repo.issues.choose.get_started"}}</a>
+					</div>
+				</div>
+			</div>
+		{{end}}
+		{{range .IssueConfig.ContactLinks}}
+			<div class="ui attached segment">
+				<div class="ui two column grid">
+					<div class="column left aligned">
+						<strong>{{.Name}}</strong>
+						<br>{{.About}}
+					</div>
+					<div class="column right aligned">
+						<a href="{{.URL}}" class="ui primary button">{{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.issues.choose.open_external_link"}}</a>
+					</div>
+				</div>
+			</div>
+		{{end}}
+		{{if .IssueConfig.BlankIssuesEnabled}}
+			<div class="ui attached segment">
+				<div class="ui two column grid">
+					<div class="column left aligned">
+						<strong>{{ctx.Locale.Tr "repo.issues.choose.blank"}}</strong>
+						<br/>{{ctx.Locale.Tr "repo.issues.choose.blank_about"}}
+					</div>
+					<div class="column right aligned">
+						<a href="{{.RepoLink}}/issues/new?{{if .milestone}}&milestone={{.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui primary button">{{ctx.Locale.Tr "repo.issues.choose.get_started"}}</a>
+					</div>
+				</div>
+			</div>
+		{{end}}
+		{{- if .IssueConfigError}}{{/* normal warning flash makes problems here*/}}
+			<div class="ui warning message">
+				<div class="text left">
+					<div>{{ctx.Locale.Tr "repo.issues.choose.invalid_config"}}</div>
+					<div>{{.IssueConfigError}}</div>
+				</div>
+			</div>
+		{{end}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/issue/comment_tab.tmpl b/repo/issue/comment_tab.tmpl
new file mode 100644
index 0000000..a4626dd
--- /dev/null
+++ b/repo/issue/comment_tab.tmpl
@@ -0,0 +1,22 @@
+{{$textareaContent := .BodyQuery}}
+{{if not $textareaContent}}{{$textareaContent = .IssueTemplate}}{{end}}
+{{if not $textareaContent}}{{$textareaContent = .PullRequestTemplate}}{{end}}
+{{if not $textareaContent}}{{$textareaContent = .content}}{{end}}
+
+<div class="field">
+	{{template "shared/combomarkdowneditor" (dict
+		"CustomInit" true
+		"MarkdownPreviewInRepo" $.Repository
+		"MarkdownPreviewMode" "comment"
+		"TextareaName" "content"
+		"TextareaContent" $textareaContent
+		"TextareaPlaceholder" (ctx.Locale.Tr "repo.diff.comment.placeholder")
+		"DropzoneParentContainer" "form, .ui.form"
+	)}}
+</div>
+
+{{if .IsAttachmentEnabled}}
+	<div class="field">
+		{{template "repo/upload" .}}
+	</div>
+{{end}}
diff --git a/repo/issue/fields/checkboxes.tmpl b/repo/issue/fields/checkboxes.tmpl
new file mode 100644
index 0000000..6134c32
--- /dev/null
+++ b/repo/issue/fields/checkboxes.tmpl
@@ -0,0 +1,14 @@
+<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}}">
+	{{template "repo/issue/fields/header" .}}
+	{{range $i, $opt := .item.Attributes.options}}
+		<div class="field inline">
+			<div class="ui checkbox tw-mr-0 {{if and ($opt.visible) (not (SliceUtils.Contains $opt.visible "form"))}}tw-hidden{{end}}">
+				<input type="checkbox" name="form-field-{{$.item.ID}}-{{$i}}" {{if $opt.required}}required{{end}}>
+				<label>{{ctx.RenderUtils.MarkdownToHtml $opt.label}}</label>
+			</div>
+			{{if $opt.required}}
+				<label class="required"></label>
+			{{end}}
+		</div>
+	{{end}}
+</div>
diff --git a/repo/issue/fields/dropdown.tmpl b/repo/issue/fields/dropdown.tmpl
new file mode 100644
index 0000000..26505f5
--- /dev/null
+++ b/repo/issue/fields/dropdown.tmpl
@@ -0,0 +1,17 @@
+<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}}">
+	{{template "repo/issue/fields/header" .}}
+	{{/* FIXME: required validation */}}
+	<div class="ui fluid selection dropdown {{if .item.Attributes.multiple}}multiple clearable{{end}}">
+		<input type="hidden" name="form-field-{{.item.ID}}" value="{{.item.Attributes.default}}">
+		{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+		{{if not .item.Validations.required}}
+		{{svg "octicon-x" 14 "remove icon"}}
+		{{end}}
+		<div class="default text"></div>
+		<div class="menu">
+			{{range $i, $opt := .item.Attributes.options}}
+				<div class="item" data-value="{{$i}}">{{$opt}}</div>
+			{{end}}
+		</div>
+	</div>
+</div>
diff --git a/repo/issue/fields/header.tmpl b/repo/issue/fields/header.tmpl
new file mode 100644
index 0000000..bcd0ffb
--- /dev/null
+++ b/repo/issue/fields/header.tmpl
@@ -0,0 +1,6 @@
+{{if and (.item.Attributes.label) (not .item.Attributes.hide_label)}}
+	<h3>{{.item.Attributes.label}}{{if .item.Validations.required}}<label class="required"></label>{{end}}</h3>
+{{end}}
+{{if .item.Attributes.description}}
+	<span class="help">{{ctx.RenderUtils.MarkdownToHtml .item.Attributes.description}}</span>
+{{end}}
diff --git a/repo/issue/fields/input.tmpl b/repo/issue/fields/input.tmpl
new file mode 100644
index 0000000..039f9a9
--- /dev/null
+++ b/repo/issue/fields/input.tmpl
@@ -0,0 +1,4 @@
+<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}}">
+	{{template "repo/issue/fields/header" .}}
+	<input type="{{if .item.Validations.is_number}}number{{else}}text{{end}}" name="form-field-{{.item.ID}}" placeholder="{{.item.Attributes.placeholder}}" value="{{.item.Attributes.value}}" {{if .item.Validations.required}}required{{end}} {{if .item.Validations.regex}}pattern="{{.item.Validations.regex}}" title="{{.item.Validations.regex}}"{{end}}>
+</div>
diff --git a/repo/issue/fields/markdown.tmpl b/repo/issue/fields/markdown.tmpl
new file mode 100644
index 0000000..da8f5e6
--- /dev/null
+++ b/repo/issue/fields/markdown.tmpl
@@ -0,0 +1,3 @@
+<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}}">
+	<div class="markup">{{ctx.RenderUtils.MarkdownToHtml .item.Attributes.value}}</div>
+</div>
diff --git a/repo/issue/fields/textarea.tmpl b/repo/issue/fields/textarea.tmpl
new file mode 100644
index 0000000..722b670
--- /dev/null
+++ b/repo/issue/fields/textarea.tmpl
@@ -0,0 +1,25 @@
+{{$useMarkdownEditor := not .item.Attributes.render}}
+<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}} {{if $useMarkdownEditor}}combo-editor-dropzone{{end}}">
+	{{template "repo/issue/fields/header" .}}
+
+	{{/* the real form element to provide the value */}}
+	<textarea class="form-field-real" name="form-field-{{.item.ID}}" placeholder="{{.item.Attributes.placeholder}}" {{if and .item.Validations.required}}required{{end}}>{{.item.Attributes.value}}</textarea>
+
+	{{if $useMarkdownEditor}}
+		{{template "shared/combomarkdowneditor" (dict
+			"CustomInit" true
+			"ContainerClasses" "tw-hidden"
+			"MarkdownPreviewInRepo" $.root.Repository
+			"MarkdownPreviewMode" "comment"
+			"TextareaContent" .item.Attributes.value
+			"TextareaPlaceholder" .item.Attributes.placeholder
+			"DropzoneParentContainer" ".combo-editor-dropzone"
+		)}}
+
+		{{if .root.IsAttachmentEnabled}}
+		<div class="tw-mt-4 form-field-dropzone tw-hidden">
+			{{template "repo/upload" .root}}
+		</div>
+		{{end}}
+	{{end}}
+</div>
diff --git a/repo/issue/filter_actions.tmpl b/repo/issue/filter_actions.tmpl
new file mode 100644
index 0000000..8e24103
--- /dev/null
+++ b/repo/issue/filter_actions.tmpl
@@ -0,0 +1,128 @@
+<div class="ui secondary filter menu">
+	{{if not .Repository.IsArchived}}
+		<!-- Action Button -->
+		{{if and .IsShowClosed.Has .IsShowClosed.Value}}
+			<button class="ui primary basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{ctx.Locale.Tr "repo.issues.action_open"}}</button>
+		{{else if and .IsShowClosed.Has (not .IsShowClosed.Value)}}
+			<button class="ui red basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{ctx.Locale.Tr "repo.issues.action_close"}}</button>
+		{{end}}
+		{{if $.IsRepoAdmin}}
+			<button class="ui red button issue-action"
+				data-action="delete" data-url="{{$.RepoLink}}/issues/delete"
+				data-action-delete-confirm="{{ctx.Locale.Tr "confirm_delete_selected"}}"
+			>{{ctx.Locale.Tr "repo.issues.delete"}}</button>
+		{{end}}
+	<!-- Labels -->
+		<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
+			<span class="text">
+				{{ctx.Locale.Tr "repo.issues.action_label"}}
+			</span>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				<div class="item issue-action" data-action="clear" data-url="{{$.RepoLink}}/issues/labels">
+					{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}
+				</div>
+				{{$previousExclusiveScope := "_no_scope"}}
+				{{range .Labels}}
+					{{$exclusiveScope := .ExclusiveScope}}
+					{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
+						<div class="divider"></div>
+					{{end}}
+					{{$previousExclusiveScope = $exclusiveScope}}
+					<div class="item issue-action tw-flex tw-justify-between" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels">
+						{{if SliceUtils.Contains $.SelLabelIDs .ID}}{{svg (Iif $exclusiveScope "octicon-dot-fill" "octicon-check")}}{{end}} {{ctx.RenderUtils.RenderLabel .}}
+						{{template "repo/issue/labels/label_archived" .}}
+					</div>
+				{{end}}
+			</div>
+		</div>
+
+		<!-- Milestone -->
+		<div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item">
+			<span class="text">
+				{{ctx.Locale.Tr "repo.issues.action_milestone"}}
+			</span>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/milestone">
+				{{ctx.Locale.Tr "repo.issues.action_milestone_no_select"}}
+				</div>
+				{{if .OpenMilestones}}
+					<div class="divider"></div>
+					<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_open"}}</div>
+					{{range .OpenMilestones}}
+						<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/milestone">
+							{{.Name}}
+						</div>
+					{{end}}
+				{{end}}
+				{{if .ClosedMilestones}}
+					<div class="divider"></div>
+					<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_closed"}}</div>
+					{{range .ClosedMilestones}}
+						<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/milestone">
+							{{.Name}}
+						</div>
+					{{end}}
+				{{end}}
+			</div>
+		</div>
+
+		<!-- Projects -->
+		<div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item">
+			<span class="text">
+				{{ctx.Locale.Tr "repo.projects"}}
+			</span>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/projects">
+				{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}
+				</div>
+				{{if .OpenProjects}}
+					<div class="divider"></div>
+					<div class="header">
+						{{ctx.Locale.Tr "repo.issues.new.open_projects"}}
+					</div>
+					{{range .OpenProjects}}
+						<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/projects">
+							{{svg .IconName 18 "tw-mr-2"}}{{.Title}}
+						</div>
+					{{end}}
+				{{end}}
+				{{if .ClosedProjects}}
+					<div class="divider"></div>
+					<div class="header">
+						{{ctx.Locale.Tr "repo.issues.new.closed_projects"}}
+					</div>
+					{{range .ClosedProjects}}
+						<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/projects">
+							{{svg .IconName 18 "tw-mr-2"}}{{.Title}}
+						</div>
+					{{end}}
+				{{end}}
+			</div>
+		</div>
+
+		<!-- Assignees -->
+		<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
+			<span class="text">
+				{{ctx.Locale.Tr "repo.issues.action_assignee"}}
+			</span>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				<div class="item issue-action" data-action="clear" data-url="{{$.Link}}/assignee">
+					{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}
+				</div>
+				<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/assignee">
+					{{ctx.Locale.Tr "repo.issues.action_assignee_no_select"}}
+				</div>
+				{{range .Assignees}}
+					<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/assignee">
+						{{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}}
+					</div>
+				{{end}}
+			</div>
+		</div>
+	{{end}}
+</div>
+
diff --git a/repo/issue/filter_item_label.tmpl b/repo/issue/filter_item_label.tmpl
new file mode 100644
index 0000000..88e2e43
--- /dev/null
+++ b/repo/issue/filter_item_label.tmpl
@@ -0,0 +1,48 @@
+{{/*
+* "labels" from query string (needed by JS)
+* QueryLink
+* Labels
+* SupportArchivedLabel, if true, then it needs "archived_labels" from query string
+*/}}
+{{$queryLink := .QueryLink}}
+<div class="item ui dropdown jump {{if not .Labels}}disabled{{end}} label-filter">
+	<span class="text">{{ctx.Locale.Tr "repo.issues.filter_label"}}</span>
+	{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	<div class="menu flex-items-menu">
+		<div class="ui icon search input">
+			<i class="icon">{{svg "octicon-search" 16}}</i>
+			<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_label"}}">
+		</div>
+		{{if .SupportArchivedLabel}}{{/* this checkbox has a hard dependency with the "labels" and "archived_label" query parameter */}}
+		<label class="label-filter-archived-toggle flex-text-block">
+			<input type="checkbox"> {{ctx.Locale.Tr "repo.issues.label_archived_filter"}}
+			<span data-tooltip-content={{ctx.Locale.Tr "repo.issues.label_archive_tooltip"}}>{{svg "octicon-info"}}</span>
+		</label>
+		{{end}}
+		<span class="label-filter-exclude-info">{{ctx.Locale.Tr "repo.issues.filter_label_exclude"}}</span>
+		<div class="divider"></div>
+		<a class="item label-filter-query-default" href="{{QueryBuild $queryLink "labels" NIL}}">{{ctx.Locale.Tr "repo.issues.filter_label_no_select"}}</a>
+		<a class="item label-filter-query-not-set" href="{{QueryBuild $queryLink "labels" 0}}">{{ctx.Locale.Tr "repo.issues.filter_label_select_no_label"}}</a>
+		{{/* The logic here is not the same as the label selector in the issue sidebar.
+		The one in the issue sidebar renders "repo labels | divider | org labels".
+		Maybe the logic should be updated to be consistent.*/}}
+		{{$previousExclusiveScope := "_no_scope"}}
+		{{range .Labels}}
+			{{$exclusiveScope := .ExclusiveScope}}
+			{{if and (ne $previousExclusiveScope $exclusiveScope)}}
+				<div class="divider" data-scope="{{.ExclusiveScope}}"></div>
+			{{end}}
+			{{$previousExclusiveScope = $exclusiveScope}}
+			<a class="item label-filter-query-item" data-label-id="{{.ID}}" data-scope="{{.ExclusiveScope}}" {{if .IsArchived}}data-is-archived{{end}}
+				href="{{QueryBuild $queryLink "labels" .QueryString}}">
+				{{if .IsExcluded}}
+					{{svg "octicon-circle-slash"}}
+				{{else if .IsSelected}}
+					{{Iif $exclusiveScope (svg "octicon-dot-fill") (svg "octicon-check")}}
+				{{end}}
+				{{ctx.RenderUtils.RenderLabel .}}
+				<p class="tw-ml-auto">{{template "repo/issue/labels/label_archived" .}}</p>
+			</a>
+		{{end}}
+	</div>
+</div>
diff --git a/repo/issue/filter_item_user_assign.tmpl b/repo/issue/filter_item_user_assign.tmpl
new file mode 100644
index 0000000..4f1db71
--- /dev/null
+++ b/repo/issue/filter_item_user_assign.tmpl
@@ -0,0 +1,31 @@
+{{/* This is a user list for filter, the data is provided by a local variable assignment
+* QueryParamKey: eg: "poster", "assignee"
+* QueryLink
+* UserSearchList
+* SelectedUserId: 0 or empty means default, -1 means "no user is set"
+* TextFilterTitle
+* TextZeroValue: the text for "all issues"
+* TextNegativeOne: the text for "issues with no assignee"
+*/}}
+{{$queryLink := .QueryLink}}
+<div class="item ui dropdown jump {{if not .UserSearchList}}disabled{{end}}">
+	{{$.TextFilterTitle}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	<div class="menu">
+		<div class="ui icon search input">
+			<i class="icon">{{svg "octicon-search" 16}}</i>
+			<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_user_placeholder"}}">
+		</div>
+		{{if $.TextZeroValue}}
+			<a class="item {{if not .SelectedUserId}}selected{{end}}" href="{{QueryBuild $queryLink $.QueryParamKey NIL}}">{{$.TextZeroValue}}</a>
+		{{end}}
+		{{if $.TextNegativeOne}}
+			<a class="item {{if eq .SelectedUserId -1}}selected{{end}}" href="{{QueryBuild $queryLink $.QueryParamKey -1}}">{{$.TextNegativeOne}}</a>
+		{{end}}
+		<div class="divider"></div>
+		{{range .UserSearchList}}
+			<a class="item {{if eq $.SelectedUserId .ID}}selected{{end}}" href="{{QueryBuild $queryLink $.QueryParamKey .ID}}">
+				{{ctx.AvatarUtils.Avatar . 20}}{{template "repo/search_name" .}}
+			</a>
+		{{end}}
+	</div>
+</div>
diff --git a/repo/issue/filter_item_user_fetch.tmpl b/repo/issue/filter_item_user_fetch.tmpl
new file mode 100644
index 0000000..5fa8142
--- /dev/null
+++ b/repo/issue/filter_item_user_fetch.tmpl
@@ -0,0 +1,23 @@
+{{/* This is a user list for filter, the data is provided by a remote "fetch" request
+* QueryParamKey: eg: "poster", "assignee"
+* QueryLink
+* UserSearchUrl
+* SelectedUsername
+* TextFilterTitle
+*/}}
+{{$queryLink := .QueryLink}}
+<div class="item ui dropdown custom user-remote-search" data-tooltip-content="{{ctx.Locale.Tr "repo.user_search_tooltip"}}"
+		data-search-url="{{$.UserSearchUrl}}"
+		data-selected-username="{{$.SelectedUsername}}"
+		data-action-jump-url="{{QueryBuild $queryLink $.QueryParamKey NIL}}&{{$.QueryParamKey}}={username}"
+>
+	{{$.TextFilterTitle}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	<div class="menu">
+		<div class="ui icon search input">
+			<i class="icon">{{svg "octicon-search" 16}}</i>
+			<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_user_placeholder"}}">
+		</div>
+		<a class="item" data-value="">{{ctx.Locale.Tr "repo.issues.filter_user_no_select"}}</a>
+		<a class="item item-from-input tw-hidden"></a>
+	</div>
+</div>
diff --git a/repo/issue/filter_list.tmpl b/repo/issue/filter_list.tmpl
new file mode 100644
index 0000000..7612d93
--- /dev/null
+++ b/repo/issue/filter_list.tmpl
@@ -0,0 +1,137 @@
+{{$queryLink := QueryBuild "?" "q" $.Keyword "type" $.ViewType "sort" $.SortType "state" $.State "labels" $.SelectLabels "milestone" $.MilestoneID "project" $.ProjectID "assignee" $.AssigneeID "poster" $.PosterUsername "archived_labels" (Iif $.ShowArchivedLabels "true")}}
+
+{{template "repo/issue/filter_item_label" dict "Labels" .Labels "QueryLink" $queryLink "SupportArchivedLabel" true}}
+
+{{if not .Milestone}}
+<!-- Milestone -->
+<div class="item ui dropdown jump {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}}">
+	<span class="text">
+		{{ctx.Locale.Tr "repo.issues.filter_milestone"}}
+	</span>
+	{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	<div class="menu">
+		<div class="ui icon search input">
+			<i class="icon">{{svg "octicon-search" 16}}</i>
+			<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_milestone"}}">
+		</div>
+		<div class="divider"></div>
+		<a class="{{if not $.MilestoneID}}active selected {{end}}item" href="{{QueryBuild $queryLink "milestone" 0}}">{{ctx.Locale.Tr "repo.issues.filter_milestone_all"}}</a>
+		<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID -1}}active selected {{end}}{{end}}item" href="{{QueryBuild $queryLink "milestone" -1}}">{{ctx.Locale.Tr "repo.issues.filter_milestone_none"}}</a>
+		{{if .OpenMilestones}}
+			<div class="divider"></div>
+			<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_open"}}</div>
+			{{range .OpenMilestones}}
+			<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{QueryBuild $queryLink "milestone" .ID}}">
+				{{svg "octicon-milestone" 16 "mr-2"}}
+				{{.Name}}
+			</a>
+			{{end}}
+		{{end}}
+		{{if .ClosedMilestones}}
+			<div class="divider"></div>
+			<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_closed"}}</div>
+			{{range .ClosedMilestones}}
+			<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{QueryBuild $queryLink "milestone" .ID}}">
+				{{svg "octicon-milestone" 16 "mr-2"}}
+				{{.Name}}
+			</a>
+			{{end}}
+		{{end}}
+	</div>
+</div>
+{{end}}
+
+<!-- Project -->
+<div class="item ui dropdown jump {{if not (or .OpenProjects .ClosedProjects)}}disabled{{end}}">
+	<span class="text">
+		{{ctx.Locale.Tr "repo.issues.filter_project"}}
+	</span>
+	{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	<div class="menu">
+		<div class="ui icon search input">
+			<i class="icon">{{svg "octicon-search" 16}}</i>
+			<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_project"}}">
+		</div>
+		<a class="{{if not .ProjectID}}active selected {{end}}item" href="{{QueryBuild $queryLink "project" NIL}}">{{ctx.Locale.Tr "repo.issues.filter_project_all"}}</a>
+		<a class="{{if eq .ProjectID -1}}active selected {{end}}item" href="{{QueryBuild $queryLink "project" -1}}">{{ctx.Locale.Tr "repo.issues.filter_project_none"}}</a>
+		{{if .OpenProjects}}
+			<div class="divider"></div>
+			<div class="header">
+				{{ctx.Locale.Tr "repo.issues.new.open_projects"}}
+			</div>
+			{{range .OpenProjects}}
+				<a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item tw-flex" href="{{QueryBuild $queryLink "project" .ID}}">
+					{{svg .IconName 18 "tw-mr-2 tw-shrink-0"}}<span class="gt-ellipsis">{{.Title}}</span>
+				</a>
+			{{end}}
+		{{end}}
+		{{if .ClosedProjects}}
+			<div class="divider"></div>
+			<div class="header">
+				{{ctx.Locale.Tr "repo.issues.new.closed_projects"}}
+			</div>
+			{{range .ClosedProjects}}
+				<a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item" href="{{QueryBuild $queryLink "project" .ID}}">
+					{{svg .IconName 18 "tw-mr-2"}}{{.Title}}
+				</a>
+			{{end}}
+		{{end}}
+	</div>
+</div>
+
+{{/* TODO: the UserSearchUrl is old logic but not right, milestone could also have "pull request" posters */}}
+{{template "repo/issue/filter_item_user_fetch" dict
+	"QueryParamKey" "poster"
+	"QueryLink" $queryLink
+	"UserSearchUrl" (Iif .Milestone (print $.RepoLink "/issues/posters") (print $.Link "/posters"))
+	"SelectedUsername" $.PosterUsername
+	"TextFilterTitle" (ctx.Locale.Tr "repo.issues.filter_poster")
+}}
+
+{{template "repo/issue/filter_item_user_assign" dict
+	"QueryParamKey" "assignee"
+	"QueryLink" $queryLink
+	"UserSearchList" $.Assignees
+	"SelectedUserId" $.AssigneeID
+	"TextFilterTitle" (ctx.Locale.Tr "repo.issues.filter_assignee")
+	"TextZeroValue" (ctx.Locale.Tr "repo.issues.filter_assginee_no_select")
+	"TextNegativeOne" (ctx.Locale.Tr "repo.issues.filter_assginee_no_assignee")
+}}
+
+{{if .IsSigned}}
+	<!-- Type -->
+	<div class="item ui dropdown jump">
+		<span class="text">
+			{{ctx.Locale.Tr "repo.issues.filter_type"}}
+		</span>
+		{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+		<div class="menu">
+			<a class="{{if eq .ViewType "all"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "all"}}">{{ctx.Locale.Tr "repo.issues.filter_type.all_issues"}}</a>
+			<a class="{{if eq .ViewType "assigned"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "assigned"}}">{{ctx.Locale.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
+			<a class="{{if eq .ViewType "created_by"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "created_by"}}">{{ctx.Locale.Tr "repo.issues.filter_type.created_by_you"}}</a>
+			{{if .PageIsPullList}}
+				<a class="{{if eq .ViewType "review_requested"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "review_requested"}}">{{ctx.Locale.Tr "repo.issues.filter_type.review_requested"}}</a>
+				<a class="{{if eq .ViewType "reviewed_by"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "reviewed_by"}}">{{ctx.Locale.Tr "repo.issues.filter_type.reviewed_by_you"}}</a>
+			{{end}}
+			<a class="{{if eq .ViewType "mentioned"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "mentioned"}}">{{ctx.Locale.Tr "repo.issues.filter_type.mentioning_you"}}</a>
+		</div>
+	</div>
+{{end}}
+
+<!-- Sort -->
+<div class="item ui dropdown jump">
+	<span class="text">
+		{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+	</span>
+	{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	<div class="menu">
+		<a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "latest"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
+		<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "oldest"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
+		<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "recentupdate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+		<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "leastupdate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+		<a class="{{if eq .SortType "mostcomment"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "mostcomment"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
+		<a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "leastcomment"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
+		<a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "nearduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
+		<a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "farduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
+	</div>
+</div>
diff --git a/repo/issue/filters.tmpl b/repo/issue/filters.tmpl
new file mode 100644
index 0000000..06e7c1a
--- /dev/null
+++ b/repo/issue/filters.tmpl
@@ -0,0 +1,26 @@
+<div id="issue-filters" class="issue-list-toolbar">
+	<div class="issue-list-toolbar-left">
+		{{if and $.CanWriteIssuesOrPulls .Issues}}
+			<input type="checkbox" autocomplete="off" class="issue-checkbox-all tw-mr-4" title="{{ctx.Locale.Tr "repo.issues.action_check_all"}}">
+		{{end}}
+		{{template "repo/issue/openclose" .}}
+		<!-- Total Tracked Time -->
+		{{if .TotalTrackedTime}}
+			<div class="ui compact tiny secondary menu">
+				<span class="item" data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'>
+					{{svg "octicon-clock"}}
+					{{.TotalTrackedTime | Sec2Time}}
+				</span>
+			</div>
+		{{end}}
+	</div>
+	<div class="issue-list-toolbar-right">
+		<div class="ui secondary filter menu labels">
+			{{if .PageIsMilestones}}
+				{{template "repo/issue/milestone/filter_list" .}}
+			{{else}}
+				{{template "repo/issue/filter_list" .}}
+			{{end}}
+		</div>
+	</div>
+</div>
diff --git a/repo/issue/label_precolors.tmpl b/repo/issue/label_precolors.tmpl
new file mode 100644
index 0000000..8000766
--- /dev/null
+++ b/repo/issue/label_precolors.tmpl
@@ -0,0 +1,22 @@
+<div class="precolors">
+	<div class="tw-flex">
+		<a class="color" style="background-color:#e11d21" data-color-hex="#e11d21"></a>
+		<a class="color" style="background-color:#eb6420" data-color-hex="#eb6420"></a>
+		<a class="color" style="background-color:#fbca04" data-color-hex="#fbca04"></a>
+		<a class="color" style="background-color:#009800" data-color-hex="#009800"></a>
+		<a class="color" style="background-color:#006b75" data-color-hex="#006b75"></a>
+		<a class="color" style="background-color:#207de5" data-color-hex="#207de5"></a>
+		<a class="color" style="background-color:#0052cc" data-color-hex="#0052cc"></a>
+		<a class="color" style="background-color:#5319e7" data-color-hex="#5319e7"></a>
+	</div>
+	<div class="tw-flex">
+		<a class="color" style="background-color:#f6c6c7" data-color-hex="#f6c6c7"></a>
+		<a class="color" style="background-color:#fad8c7" data-color-hex="#fad8c7"></a>
+		<a class="color" style="background-color:#fef2c0" data-color-hex="#fef2c0"></a>
+		<a class="color" style="background-color:#bfe5bf" data-color-hex="#bfe5bf"></a>
+		<a class="color" style="background-color:#bfdadc" data-color-hex="#bfdadc"></a>
+		<a class="color" style="background-color:#c7def8" data-color-hex="#c7def8"></a>
+		<a class="color" style="background-color:#bfd4f2" data-color-hex="#bfd4f2"></a>
+		<a class="color" style="background-color:#d4c5f9" data-color-hex="#d4c5f9"></a>
+	</div>
+</div>
diff --git a/repo/issue/labels.tmpl b/repo/issue/labels.tmpl
new file mode 100644
index 0000000..317fe09
--- /dev/null
+++ b/repo/issue/labels.tmpl
@@ -0,0 +1,18 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository labels">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<div class="issue-navbar tw-mb-4">
+			{{template "repo/issue/navbar" .}}
+			{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
+				<button class="ui small primary new-label button">{{ctx.Locale.Tr "repo.issues.new_label"}}</button>
+			{{end}}
+		</div>
+		{{template "base/alert" .}}
+		{{template "repo/issue/labels/label_list" .}}
+	</div>
+	{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
+		{{template "repo/issue/labels/label_edit_modal" .}}
+	{{end}}
+</div>
+{{template "base/footer" .}}
diff --git a/repo/issue/labels/label_archived.tmpl b/repo/issue/labels/label_archived.tmpl
new file mode 100644
index 0000000..feaf77e
--- /dev/null
+++ b/repo/issue/labels/label_archived.tmpl
@@ -0,0 +1,5 @@
+{{if .IsArchived}}
+	<span class="ui label basic small" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.label_archive_tooltip"}}">
+		{{ctx.Locale.Tr "archived"}}
+	</span>
+{{end}}
diff --git a/repo/issue/labels/label_edit_modal.tmpl b/repo/issue/labels/label_edit_modal.tmpl
new file mode 100644
index 0000000..f04d499
--- /dev/null
+++ b/repo/issue/labels/label_edit_modal.tmpl
@@ -0,0 +1,63 @@
+<div class="ui small modal" id="issue-label-edit-modal"
+		data-current-page-link="{{$.Link}}"{{/*will be used to construct "new label" and "edit label" URLs*/}}
+		data-text-new-label="{{ctx.Locale.Tr "repo.issues.new_label"}}"
+		data-text-edit-label="{{ctx.Locale.Tr "repo.issues.label_modify"}}"
+>
+	<div class="header"></div>
+	<div class="content">
+		<form class="ui form ignore-dirty" method="post">
+			{{.CsrfTokenHtml}}
+			<input name="id" type="hidden">
+			<div class="required field">
+				<label for="name">{{ctx.Locale.Tr "repo.issues.label_title"}}</label>
+				<div class="ui small input">
+					<input class="label-name-input" name="title" placeholder="{{ctx.Locale.Tr "repo.issues.new_label_placeholder"}}" autofocus required maxlength="50">
+				</div>
+			</div>
+			<div class="field label-exclusive-input-field">
+				<div class="ui checkbox">
+					<input class="label-exclusive-input" name="exclusive" type="checkbox">
+					<label>{{ctx.Locale.Tr "repo.issues.label_exclusive"}}</label>
+				</div>
+				<br>
+				<small class="desc">{{ctx.Locale.Tr "repo.issues.label_exclusive_desc"}}</small>
+				<div class="desc tw-ml-1 tw-mt-2 tw-hidden label-exclusive-warning">
+					{{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.issues.label_exclusive_warning"}}
+				</div>
+				<br>
+			</div>
+			<div class="field label-is-archived-input-field">
+				<div class="ui checkbox">
+					<input class="label-is-archived-input" name="is_archived" type="checkbox">
+					<label>{{ctx.Locale.Tr "repo.issues.label_archive"}}</label>
+				</div>
+				<i class="tw-ml-1" data-tooltip-content={{ctx.Locale.Tr "repo.issues.label_archive_tooltip"}}>
+					{{svg "octicon-info"}}
+				</i>
+			</div>
+			<div class="field">
+				<label for="description">{{ctx.Locale.Tr "repo.issues.label_description"}}</label>
+				<div class="ui small fluid input">
+					<input class="label-desc-input" name="description" placeholder="{{ctx.Locale.Tr "repo.issues.new_label_desc_placeholder"}}" maxlength="200">
+				</div>
+			</div>
+			<div class="field color-field">
+				<label for="color">{{ctx.Locale.Tr "repo.issues.label_color"}}</label>
+				<div class="column js-color-picker-input">
+					<input name="color" value="#70c24a"placeholder="#c320f6" required maxlength="7">
+					{{template "repo/issue/label_precolors"}}
+				</div>
+			</div>
+		</form>
+	</div>
+	<div class="actions">
+		<button class="ui small basic cancel button">
+			{{svg "octicon-x"}}
+			{{ctx.Locale.Tr "cancel"}}
+		</button>
+		<button class="ui primary small approve button">
+			{{svg "fontawesome-save"}}
+			{{ctx.Locale.Tr "save"}}
+		</button>
+	</div>
+</div>
diff --git a/repo/issue/labels/label_list.tmpl b/repo/issue/labels/label_list.tmpl
new file mode 100644
index 0000000..8225673
--- /dev/null
+++ b/repo/issue/labels/label_list.tmpl
@@ -0,0 +1,92 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "repo.issues.label_count" .NumLabels}}
+	<div class="ui right">
+		<!-- Sort -->
+		<div class="item ui jump dropdown tw-py-2">
+			<span class="text">
+				{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+			</span>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				<a class="{{if or (eq .SortType "alphabetically") (not .SortType)}}active {{end}}item" href="?sort=alphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
+				<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="?sort=reversealphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
+				<a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="?sort=leastissues&state={{$.State}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
+				<a class="{{if eq .SortType "mostissues"}}active {{end}}item" href="?sort=mostissues&state={{$.State}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_issues"}}</a>
+			</div>
+		</div>
+	</div> <!-- filter menu -->
+</h4>
+
+<div class="ui attached segment">
+	{{if and (not $.PageIsOrgSettingsLabels) (or $.CanWriteIssues $.CanWritePulls) (eq .NumLabels 0) (not $.Repository.IsArchived)}}
+		{{template "repo/issue/labels/label_load_template" .}}
+		<div class="divider"></div>
+	{{else if and ($.PageIsOrgSettingsLabels) (eq .NumLabels 0)}}
+		{{template "repo/issue/labels/label_load_template" .}}
+		<div class="divider"></div>
+	{{end}}
+
+	<ul class="issue-label-list">
+		{{$canEditLabel := and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}}
+		{{$canEditLabel = or $canEditLabel $.PageIsOrgSettingsLabels}}
+		{{range .Labels}}
+		<li class="item">
+			<div class="label-title">
+				{{ctx.RenderUtils.RenderLabel .}}
+				{{if .Description}}<br><small class="desc">{{.Description | ctx.RenderUtils.RenderEmoji}}</small>{{end}}
+			</div>
+			<div class="label-issues">
+				{{if $.PageIsOrgSettingsLabels}}
+					<a class="open-issues" href="{{AppSubUrl}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a>
+				{{else}}
+					<a class="open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a>
+				{{end}}
+			</div>
+			<div class="label-operation tw-flex">
+				{{template "repo/issue/labels/label_archived" .}}
+				<div class="tw-flex tw-ml-auto">
+					{{if $canEditLabel}}
+						<a class="edit-label-button" href="#"
+							data-label-id="{{.ID}}" data-label-name="{{.Name}}" data-label-color="{{.Color}}"
+							data-label-exclusive="{{.Exclusive}}" data-label-is-archived="{{gt .ArchivedUnix 0}}"
+							data-label-num-issues="{{.NumIssues}}" data-label-description="{{.Description}}"
+						>{{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
+						<a class="link-action" href="#" data-url="{{$.Link}}/delete?id={{.ID}}"
+							data-modal-confirm-header="{{ctx.Locale.Tr "repo.issues.label_deletion"}}"
+							data-modal-confirm-content="{{ctx.Locale.Tr "repo.issues.label_deletion_desc"}}"
+						>{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
+					{{end}}
+				</div>
+			</div>
+		</li>
+		{{end}}
+
+		{{if and (not .PageIsOrgSettingsLabels) (.OrgLabels)}}
+			<li class="item">
+				<div class="ui grid middle aligned">
+					<div class="ten wide column">
+						{{ctx.Locale.Tr "repo.org_labels_desc"}}
+						{{if .IsOrganizationOwner}}
+							<a href="{{.OrganizationLink}}/settings/labels">({{ctx.Locale.Tr "repo.org_labels_desc_manage"}})</a>:
+						{{end}}
+					</div>
+				</div>
+			</li>
+
+			{{range .OrgLabels}}
+			<li class="item org-label">
+				<div class="label-title">
+					{{ctx.RenderUtils.RenderLabel .}}
+					{{if .Description}}<br><small class="desc">{{.Description | ctx.RenderUtils.RenderEmoji}}</small>{{end}}
+				</div>
+				<div class="label-issues">
+					<a class="open-issues" {{if .IsArchived}}data-is-archived{{end}} href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues.label_open_issues" .NumOpenRepoIssues}}</a>
+				</div>
+				<div class="label-operation">
+					{{template "repo/issue/labels/label_archived" .}}
+				</div>
+			</li>
+			{{end}}
+		{{end}}
+	</ul>
+</div>
diff --git a/repo/issue/labels/label_load_template.tmpl b/repo/issue/labels/label_load_template.tmpl
new file mode 100644
index 0000000..3cb2442
--- /dev/null
+++ b/repo/issue/labels/label_load_template.tmpl
@@ -0,0 +1,21 @@
+<div class="ui centered grid">
+	<div class="twelve wide computer column">
+		<p>{{ctx.Locale.Tr "repo.issues.label_templates.info"}}</p>
+		<form class="ui form center" action="{{.Link}}/initialize" method="post">
+			{{.CsrfTokenHtml}}
+			<div class="field">
+				<div class="ui selection dropdown">
+					<input type="hidden" name="template_name" value="Default">
+					<div class="default text">{{ctx.Locale.Tr "repo.issues.label_templates.helper"}}</div>
+					<div class="menu">
+						{{range .LabelTemplateFiles}}
+							<div class="item" data-value="{{.DisplayName}}">{{.DisplayName}}<br><i>({{.Description}})</i></div>
+						{{end}}
+					</div>
+					{{svg "octicon-triangle-down" 18 "dropdown icon"}}
+				</div>
+			</div>
+			<button type="submit" class="ui primary button">{{ctx.Locale.Tr "repo.issues.label_templates.use"}}</button>
+		</form>
+	</div>
+</div>
diff --git a/repo/issue/list.tmpl b/repo/issue/list.tmpl
new file mode 100644
index 0000000..ee783b4
--- /dev/null
+++ b/repo/issue/list.tmpl
@@ -0,0 +1,56 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository issue-list">
+	{{template "repo/header" .}}
+	<div class="ui container">
+	{{template "base/alert" .}}
+
+	{{if .PinnedIssues}}
+		<div id="issue-pins" {{if .IsRepoAdmin}}data-is-repo-admin{{end}}>
+			{{range .PinnedIssues}}
+				<div class="issue-card tw-break-anywhere {{if $.IsRepoAdmin}}tw-cursor-grab{{end}}" data-move-url="{{$.Link}}/move_pin" data-issue-id="{{.ID}}">
+					{{template "repo/issue/card" (dict "Issue" . "Page" $ "isPinnedIssueCard" true)}}
+				</div>
+			{{end}}
+		</div>
+	{{end}}
+
+		<div class="list-header flex-text-block">
+			{{template "repo/issue/search" .}}
+			<a class="ui small button" href="{{.RepoLink}}/labels">{{ctx.Locale.Tr "repo.labels"}}</a>
+			<a class="ui small button" href="{{.RepoLink}}/milestones">{{ctx.Locale.Tr "repo.milestones"}}</a>
+			{{if not .Repository.IsArchived}}
+				{{if .PageIsIssueList}}
+					<a class="ui small primary button issue-list-new" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
+				{{else}}
+					<a class="ui small primary button new-pr-button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.Repository.Link}}/compare/{{.Repository.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "repo.pulls.new"}}</a>
+				{{end}}
+			{{else}}
+				{{if not .PageIsIssueList}}
+					<a class="ui small primary small button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.PullRequestCtx.BaseRepo.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "action.compare_commits_general"}}</a>
+				{{end}}
+			{{end}}
+		</div>
+
+		{{template "repo/issue/filters" .}}
+
+		<div id="issue-actions" class="issue-list-toolbar tw-hidden">
+			<div class="issue-list-toolbar-left">
+				{{template "repo/issue/openclose" .}}
+				<!-- Total Tracked Time -->
+				{{if .TotalTrackedTime}}
+					<div class="ui compact tiny secondary menu">
+						<span class="item" data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'>
+							{{svg "octicon-clock"}}
+							{{.TotalTrackedTime | Sec2Time}}
+						</span>
+					</div>
+				{{end}}
+			</div>
+			<div class="issue-list-toolbar-right">
+				{{template "repo/issue/filter_actions" .}}
+			</div>
+		</div>
+		{{template "shared/issuelist" dict "." . "listType" "repo"}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/issue/milestone/filter_list.tmpl b/repo/issue/milestone/filter_list.tmpl
new file mode 100644
index 0000000..0740b86
--- /dev/null
+++ b/repo/issue/milestone/filter_list.tmpl
@@ -0,0 +1,16 @@
+<!-- Sort -->
+<div class="item ui small dropdown jump">
+	<span class="text">
+		{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+	</span>
+	{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	<div class="menu">
+		<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active {{end}}item" href="?sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.earliest_due_data"}}</a>
+		<a class="{{if eq .SortType "furthestduedate"}}active {{end}}item" href="?sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.latest_due_date"}}</a>
+		<a class="{{if eq .SortType "leastcomplete"}}active {{end}}item" href="?sort=leastcomplete&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_complete"}}</a>
+		<a class="{{if eq .SortType "mostcomplete"}}active {{end}}item" href="?sort=mostcomplete&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_complete"}}</a>
+		<a class="{{if eq .SortType "mostissues"}}active {{end}}item" href="?sort=mostissues&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_issues"}}</a>
+		<a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="?sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
+		<a class="{{if eq .SortType "name"}}active {{end}}item" href="{{$.Link}}?sort=name&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.name"}}</a>
+	</div>
+</div>
diff --git a/repo/issue/milestone_issues.tmpl b/repo/issue/milestone_issues.tmpl
new file mode 100644
index 0000000..4fc6057
--- /dev/null
+++ b/repo/issue/milestone_issues.tmpl
@@ -0,0 +1,65 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository milestone-issue-list">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<div class="tw-flex">
+			<h1 class="tw-mb-2">{{.Milestone.Name}}</h1>
+			{{if not .Repository.IsArchived}}
+				<div class="text right tw-flex-1">
+					{{if or .CanWriteIssues .CanWritePulls}}
+						{{if .Milestone.IsClosed}}
+							<a class="ui primary basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{ctx.Locale.Tr "repo.milestones.open"}}
+							</a>
+						{{else}}
+							<a class="ui red basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/close">{{ctx.Locale.Tr "repo.milestones.close"}}
+							</a>
+						{{end}}
+						<a class="ui button" href="{{.RepoLink}}/milestones/{{.MilestoneID}}/edit">{{ctx.Locale.Tr "repo.milestones.edit"}}</a>
+					{{end}}
+					<a class="ui primary button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}?milestone={{.MilestoneID}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
+				</div>
+			{{end}}
+		</div>
+		{{if .Milestone.RenderedContent}}
+		<div class="markup content tw-mb-4">
+				{{.Milestone.RenderedContent}}
+		</div>
+		{{end}}
+		<div class="tw-flex tw-flex-col tw-gap-2">
+			<progress class="milestone-progress-big" value="{{.Milestone.Completeness}}" max="100"></progress>
+			<div class="tw-flex tw-gap-4">
+				<div classs="tw-flex tw-items-center">
+					{{$closedDate:= DateUtils.TimeSince .Milestone.ClosedDateUnix}}
+					{{if .IsClosed}}
+						{{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}}
+					{{else}}
+
+						{{if .Milestone.DeadlineString}}
+							<span{{if .IsOverdue}} class="text red"{{end}}>
+								{{svg "octicon-calendar"}}
+								{{DateUtils.AbsoluteShort (.Milestone.DeadlineString|DateUtils.ParseLegacy)}}
+							</span>
+						{{else}}
+							{{svg "octicon-calendar"}}
+							{{ctx.Locale.Tr "repo.milestones.no_due_date"}}
+						{{end}}
+					{{end}}
+				</div>
+				<div class="tw-mr-2">{{ctx.Locale.Tr "repo.milestones.completeness" .Milestone.Completeness}}</div>
+				{{if .TotalTrackedTime}}
+					<div data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'>
+						{{svg "octicon-clock"}}
+						{{.TotalTrackedTime | Sec2Time}}
+					</div>
+				{{end}}
+			</div>
+		</div>
+		<div class="divider"></div>
+
+		{{template "repo/issue/filters" .}}
+
+		{{template "shared/issuelist" dict "." . "listType" "milestone"}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/issue/milestone_new.tmpl b/repo/issue/milestone_new.tmpl
new file mode 100644
index 0000000..4809149
--- /dev/null
+++ b/repo/issue/milestone_new.tmpl
@@ -0,0 +1,64 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new milestone">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<div class="issue-navbar">
+			{{template "repo/issue/navbar" .}}
+			{{if and (or .CanWriteIssues .CanWritePulls) .PageIsEditMilestone}}
+				<div class="ui right">
+					<a class="ui primary button" href="{{$.RepoLink}}/milestones/new">{{ctx.Locale.Tr "repo.milestones.new"}}</a>
+				</div>
+			{{end}}
+		</div>
+		<div class="divider"></div>
+		<h2 class="ui dividing header">
+			{{if .PageIsEditMilestone}}
+				{{ctx.Locale.Tr "repo.milestones.edit"}}
+				<div class="sub header">{{ctx.Locale.Tr "repo.milestones.edit_subheader"}}</div>
+			{{else}}
+				{{ctx.Locale.Tr "repo.milestones.new"}}
+				<div class="sub header">{{ctx.Locale.Tr "repo.milestones.new_subheader"}}</div>
+			{{end}}
+		</h2>
+		{{template "base/alert" .}}
+		<form class="ui form" action="{{.Link}}" method="post">
+			{{.CsrfTokenHtml}}
+				<div class="field {{if .Err_Title}}error{{end}}">
+					<label>{{ctx.Locale.Tr "repo.milestones.title"}}</label>
+					<input name="title" placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}" value="{{.title}}" autofocus required maxlength="50">
+				</div>
+				<div class="field {{if .Err_Deadline}}error{{end}}">
+					<label>
+						{{ctx.Locale.Tr "repo.milestones.due_date"}}
+						<a id="milestone-clear-deadline">{{ctx.Locale.Tr "repo.milestones.clear"}}</a>
+					</label>
+					<input type="date" name="deadline" class="tw-w-auto" value="{{.deadline}}" placeholder="{{ctx.Locale.Tr "repo.issues.due_date_form"}}">
+				</div>
+				<div class="field">
+					<label>{{ctx.Locale.Tr "repo.milestones.desc"}}</label>
+					{{template "shared/combomarkdowneditor" (dict
+						"MarkdownPreviewInRepo" $.Repository
+						"MarkdownPreviewMode" "comment"
+						"TextareaName" "content"
+						"TextareaContent" .content
+						"TextareaPlaceholder" (ctx.Locale.Tr "repo.milestones.desc")
+					)}}
+				</div>
+				<div class="tw-text-right">
+					{{if .PageIsEditMilestone}}
+						<a class="ui primary basic button" href="{{.RepoLink}}/milestones">
+							{{ctx.Locale.Tr "repo.milestones.cancel"}}
+						</a>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.milestones.modify"}}
+						</button>
+					{{else}}
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.milestones.create"}}
+						</button>
+					{{end}}
+			</div>
+		</form>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/issue/milestones.tmpl b/repo/issue/milestones.tmpl
new file mode 100644
index 0000000..9515acf
--- /dev/null
+++ b/repo/issue/milestones.tmpl
@@ -0,0 +1,108 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository milestones">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+
+		<div class="list-header">
+			{{template "repo/issue/navbar" .}}
+			{{template "repo/issue/search" .}}
+			{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
+				<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.milestones.new"}}</a>
+			{{end}}
+		</div>
+
+		{{template "repo/issue/filters" .}}
+
+		<!-- milestone list -->
+		<div class="milestone-list">
+			{{range .Milestones}}
+				<li class="milestone-card">
+					<div class="milestone-header">
+						<h3 class="flex-text-block tw-m-0">
+							{{svg "octicon-milestone" 16}}
+							<a class="muted" href="{{$.RepoLink}}/milestone/{{.ID}}">{{.Name}}</a>
+						</h3>
+						<div class="tw-flex tw-items-center">
+							<span class="tw-mr-2">{{.Completeness}}%</span>
+							<progress value="{{.Completeness}}" max="100"></progress>
+						</div>
+					</div>
+					<div class="milestone-toolbar">
+						<div class="group">
+							<div class="flex-text-block">
+								{{svg "octicon-issue-opened" 14}}
+								{{ctx.Locale.PrettyNumber .NumOpenIssues}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
+							</div>
+							<div class="flex-text-block">
+								{{svg "octicon-check" 14}}
+								{{ctx.Locale.PrettyNumber .NumClosedIssues}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
+							</div>
+							{{if .TotalTrackedTime}}
+								<div class="flex-text-block">
+									{{svg "octicon-clock"}}
+									{{.TotalTrackedTime|Sec2Time}}
+								</div>
+							{{end}}
+							{{if .UpdatedUnix}}
+								<div class="flex-text-block">
+									{{svg "octicon-clock"}}
+									{{ctx.Locale.Tr "repo.milestones.update_ago" (DateUtils.TimeSince .UpdatedUnix)}}
+								</div>
+							{{end}}
+							<div class="flex-text-block">
+								{{if .IsClosed}}
+									{{$closedDate:= DateUtils.TimeSince .ClosedDateUnix}}
+									{{svg "octicon-clock" 14}}
+									{{ctx.Locale.Tr "repo.milestones.closed" $closedDate}}
+								{{else}}
+									{{if .DeadlineString}}
+										<span class="flex-text-inline {{if .IsOverdue}}text red{{end}}">
+											{{svg "octicon-calendar" 14}}
+											{{DateUtils.AbsoluteShort (.DeadlineString|DateUtils.ParseLegacy)}}
+										</span>
+									{{else}}
+										{{svg "octicon-calendar" 14}}
+										{{ctx.Locale.Tr "repo.milestones.no_due_date"}}
+									{{end}}
+								{{end}}
+							</div>
+						</div>
+						{{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
+							<div class="group">
+								<a class="flex-text-inline" href="{{$.Link}}/{{.ID}}/edit">{{svg "octicon-pencil" 14}}{{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
+								{{if .IsClosed}}
+									<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/open">{{svg "octicon-check" 14}}{{ctx.Locale.Tr "repo.milestones.open"}}</a>
+								{{else}}
+									<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{ctx.Locale.Tr "repo.milestones.close"}}</a>
+								{{end}}
+								<a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
+							</div>
+						{{end}}
+					</div>
+					{{if .Content}}
+						<div class="markup content">
+							{{.RenderedContent}}
+						</div>
+					{{end}}
+				</li>
+			{{end}}
+
+			{{template "base/paginate" .}}
+		</div>
+	</div>
+</div>
+
+{{if or .CanWriteIssues .CanWritePulls}}
+	<div class="ui g-modal-confirm delete modal">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "repo.milestones.deletion"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "repo.milestones.deletion_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+{{end}}
+{{template "base/footer" .}}
diff --git a/repo/issue/navbar.tmpl b/repo/issue/navbar.tmpl
new file mode 100644
index 0000000..30e42c7
--- /dev/null
+++ b/repo/issue/navbar.tmpl
@@ -0,0 +1,4 @@
+<h2 class="ui compact small menu small-menu-items issue-list-navbar">
+	<a class="{{if .PageIsLabels}}active {{end}}item" href="{{.RepoLink}}/labels">{{ctx.Locale.Tr "repo.labels"}}</a>
+	<a class="{{if .PageIsMilestones}}active {{end}}item" href="{{.RepoLink}}/milestones">{{ctx.Locale.Tr "repo.milestones"}}</a>
+</h2>
diff --git a/repo/issue/new.tmpl b/repo/issue/new.tmpl
new file mode 100644
index 0000000..ccd45fd
--- /dev/null
+++ b/repo/issue/new.tmpl
@@ -0,0 +1,8 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new issue">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "repo/issue/new_form" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/issue/new_form.tmpl b/repo/issue/new_form.tmpl
new file mode 100644
index 0000000..dd4c761
--- /dev/null
+++ b/repo/issue/new_form.tmpl
@@ -0,0 +1,73 @@
+{{if .Flash}}
+{{template "base/alert" .}}
+{{end}}
+<form class="issue-content ui comment form form-fetch-action" id="new-issue" action="{{.Link}}" method="post">
+	{{.CsrfTokenHtml}}
+	<div class="issue-content-left">
+		<div class="ui comments">
+			<div class="comment">
+				{{ctx.AvatarUtils.Avatar .SignedUser 40}}
+				<div class="ui segment content tw-my-0">
+					<div class="field">
+						<input name="title" class="js-autofocus-end" id="issue_title" placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" required maxlength="255" autocomplete="off">
+						{{if .PageIsComparePull}}
+							<div class="title_wip_desc" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}">{{ctx.Locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0)}}</div>
+						{{end}}
+					</div>
+					{{if .Fields}}
+						<input type="hidden" name="template-file" value="{{.TemplateFile}}">
+						{{range .Fields}}
+							{{if eq .Type "input"}}
+								{{template "repo/issue/fields/input" dict "item" .}}
+							{{else if eq .Type "markdown"}}
+								{{template "repo/issue/fields/markdown" dict "item" .}}
+							{{else if eq .Type "textarea"}}
+								{{template "repo/issue/fields/textarea" dict "item" . "root" $}}
+							{{else if eq .Type "dropdown"}}
+								{{template "repo/issue/fields/dropdown" dict "item" .}}
+							{{else if eq .Type "checkboxes"}}
+								{{template "repo/issue/fields/checkboxes" dict "item" .}}
+							{{end}}
+						{{end}}
+					{{else}}
+						{{template "repo/issue/comment_tab" .}}
+					{{end}}
+					<div class="text right">
+						<button class="ui primary button">
+							{{if .PageIsComparePull}}
+								{{ctx.Locale.Tr "repo.pulls.create"}}
+							{{else}}
+								{{ctx.Locale.Tr "repo.issues.create"}}
+							{{end}}
+						</button>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<div class="issue-content-right ui segment">
+		{{template "repo/issue/branch_selector_field" $}}{{/* TODO: RemoveIssueRef: template "repo/issue/branch_selector_field" $*/}}
+
+		{{if .PageIsComparePull}}
+			{{template "repo/issue/sidebar/reviewer_list" $.IssuePageMetaData}}
+			<div class="divider"></div>
+		{{end}}
+
+		{{template "repo/issue/sidebar/label_list" $.IssuePageMetaData}}
+		{{template "repo/issue/sidebar/milestone_list" $.IssuePageMetaData}}
+		{{if .IsProjectsEnabled}}
+			{{template "repo/issue/sidebar/project_list" $.IssuePageMetaData}}
+		{{end}}
+		{{template "repo/issue/sidebar/assignee_list" $.IssuePageMetaData}}
+
+		{{if and .PageIsComparePull (not (eq .HeadRepo.FullName .BaseCompareRepo.FullName)) .CanWriteToHeadRepo}}
+			<div class="divider"></div>
+			<div class="ui checkbox">
+				<label data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
+				<input name="allow_maintainer_edit" type="checkbox" {{if .AllowMaintainerEdit}}checked{{end}}>
+			</div>
+		{{end}}
+	</div>
+	<input type="hidden" name="redirect_after_creation" value="{{.redirect_after_creation}}">
+</form>
diff --git a/repo/issue/openclose.tmpl b/repo/issue/openclose.tmpl
new file mode 100644
index 0000000..00a31b5
--- /dev/null
+++ b/repo/issue/openclose.tmpl
@@ -0,0 +1,23 @@
+{{/* this tmpl is quite dirty, it should not mix unrelated things together .... need to split it in the future*/}}
+{{$allStatesLink := ""}}{{$openLink := ""}}{{$closedLink := ""}}
+{{if .PageIsMilestones}}
+	{{$allStatesLink = QueryBuild "?" "q" $.Keyword "sort" $.SortType "state" "all"}}
+{{else}}
+	{{$allStatesLink = QueryBuild "?" "q" $.Keyword "type" $.ViewType "sort" $.SortType "state" "all" "labels" $.SelectLabels "milestone" $.MilestoneID "project" $.ProjectID "assignee" $.AssigneeID "poster" $.PosterUsername "archived_labels" (Iif $.ShowArchivedLabels "true")}}
+{{end}}
+{{$openLink = QueryBuild $allStatesLink "state" "open"}}
+{{$closedLink = QueryBuild $allStatesLink "state" "closed"}}
+<div class="small-menu-items ui compact tiny menu">
+	<a class="{{if eq .State "open"}}active {{end}}item flex-text-inline" href="{{if eq .State "open"}}{{$allStatesLink}}{{else}}{{$openLink}}{{end}}">
+		{{if .PageIsMilestones}}
+			{{svg "octicon-milestone"}}
+		{{else}}
+			{{Iif .PageIsPullList (svg "octicon-git-pull-request") (svg "octicon-issue-opened")}}
+		{{end}}
+		{{ctx.Locale.PrettyNumber .OpenCount}} {{ctx.Locale.Tr "repo.issues.open_title"}}
+	</a>
+	<a class="{{if eq .State "closed"}}active {{end}}item flex-text-inline" href="{{if eq .State "closed"}}{{$allStatesLink}}{{else}}{{$closedLink}}{{end}}">
+		{{svg "octicon-issue-closed"}}
+		{{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}}
+	</a>
+</div>
diff --git a/repo/issue/search.tmpl b/repo/issue/search.tmpl
new file mode 100644
index 0000000..07732ab
--- /dev/null
+++ b/repo/issue/search.tmpl
@@ -0,0 +1,18 @@
+<form class="list-header-search ui form ignore-dirty issue-list-search">
+	<div class="ui small search fluid action input">
+		<input type="hidden" name="state" value="{{$.State}}">
+		{{if not .PageIsMilestones}}
+			<input type="hidden" name="type" value="{{$.ViewType}}">
+			<input type="hidden" name="labels" value="{{$.SelectLabels}}">
+			<input type="hidden" name="milestone" value="{{$.MilestoneID}}">
+			<input type="hidden" name="project" value="{{$.ProjectID}}">
+			<input type="hidden" name="assignee" value="{{$.AssigneeID}}">
+			<input type="hidden" name="poster" value="{{$.PosterUsername}}">
+		{{end}}
+		{{template "shared/search/input" dict "Value" .Keyword}}
+		{{if .PageIsIssueList}}
+			<button id="issue-list-quick-goto" class="ui small icon button tw-hidden" data-tooltip-content="{{ctx.Locale.Tr "explore.go_to"}}" data-repo-link="{{.RepoLink}}">{{svg "octicon-hash"}}</button>
+		{{end}}
+		{{template "shared/search/button"}}
+	</div>
+</form>
diff --git a/repo/issue/sidebar/allow_maintainer_edit.tmpl b/repo/issue/sidebar/allow_maintainer_edit.tmpl
new file mode 100644
index 0000000..ad4ce96
--- /dev/null
+++ b/repo/issue/sidebar/allow_maintainer_edit.tmpl
@@ -0,0 +1,13 @@
+{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
+	{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
+	<div class="divider"></div>
+	<div class="ui checkbox loading-icon-2px" id="allow-edits-from-maintainers"
+			data-url="{{.Issue.Link}}"
+			data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
+			data-prompt-error="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}"
+	>
+		<label><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
+		<input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}>
+	</div>
+	{{end}}
+{{end}}
diff --git a/repo/issue/sidebar/assignee_list.tmpl b/repo/issue/sidebar/assignee_list.tmpl
new file mode 100644
index 0000000..f124c3f
--- /dev/null
+++ b/repo/issue/sidebar/assignee_list.tmpl
@@ -0,0 +1,38 @@
+{{$pageMeta := .}}
+{{$data := .AssigneesData}}
+{{$issueAssignees := NIL}}{{if $pageMeta.Issue}}{{$issueAssignees = $pageMeta.Issue.Assignees}}{{end}}
+<div class="divider"></div>
+<div class="issue-sidebar-combo" data-selection-mode="multiple" data-update-algo="diff"
+		{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/assignee?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
+>
+	<input class="combo-value" name="assignee_ids" type="hidden" value="{{$data.SelectedAssigneeIDs}}">
+	<div class="ui dropdown {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
+		<a class="text muted">
+			<strong>{{ctx.Locale.Tr "repo.issues.new.assignees"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}}
+		</a>
+		<div class="menu">
+			<div class="ui icon search input">
+				<i class="icon">{{svg "octicon-search" 16}}</i>
+				<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_assignees"}}">
+			</div>
+			<div class="scrolling menu flex-items-block">
+				<div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
+				<div class="divider"></div>
+				{{range $data.CandidateAssignees}}
+					<a class="item" href="#" data-value="{{.ID}}">
+						<span class="item-check-mark">{{svg "octicon-check"}}</span>
+						{{ctx.AvatarUtils.Avatar . 20}} {{template "repo/search_name" .}}
+					</a>
+				{{end}}
+			</div>
+		</div>
+	</div>
+	<div class="ui list muted-links flex-items-block tw-flex tw-flex-col tw-gap-2">
+		<span class="item empty-list {{if $issueAssignees}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}</span>
+		{{range $issueAssignees}}
+			<a class="item" href="{{$pageMeta.RepoLink}}/{{if $pageMeta.IsPullRequest}}pulls{{else}}issues{{end}}?assignee={{.ID}}">
+					{{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}}
+			</a>
+		{{end}}
+	</div>
+</div>
diff --git a/repo/issue/sidebar/due_date.tmpl b/repo/issue/sidebar/due_date.tmpl
new file mode 100644
index 0000000..e6e19f6
--- /dev/null
+++ b/repo/issue/sidebar/due_date.tmpl
@@ -0,0 +1,29 @@
+<div class="divider"></div>
+<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.due_date"}}</strong></span>
+<div class="ui form tw-mt-2">
+	{{if .Issue.DeadlineUnix}}
+		<div class="tw-flex tw-justify-between tw-items-center tw-gap-2">
+			<div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_overdue"}}"{{end}}>
+				{{svg "octicon-calendar"}} {{DateUtils.AbsoluteLong .Issue.DeadlineUnix}}
+			</div>
+			<div class="flex-text-block">
+				{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
+					<a class="issue-due-edit muted" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_form_edit"}}">{{svg "octicon-pencil"}}</a>
+					<a class="issue-due-remove muted" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_form_remove"}}">{{svg "octicon-trash"}}</a>
+				{{end}}
+			</div>
+		</div>
+	{{else}}
+		{{ctx.Locale.Tr "repo.issues.due_date_not_set"}}
+	{{end}}
+
+	{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
+		<form class="ui fluid action input issue-due-form form-fetch-action tw-mt-2 {{if .Issue.DeadlineUnix}}tw-hidden{{end}}"
+					method="post" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline"
+		>
+			{{$.CsrfTokenHtml}}
+			<input required type="date" name="deadline" placeholder="{{ctx.Locale.Tr "repo.issues.due_date_form"}}" {{if .Issue.DeadlineUnix}}value="{{.Issue.DeadlineUnix.FormatDate}}"{{end}}>
+			<button class="ui icon button">{{Iif .Issue.DeadlineUnix (svg "octicon-pencil") (svg "octicon-plus")}}</button>
+		</form>
+	{{end}}
+</div>
diff --git a/repo/issue/sidebar/issue_dependencies.tmpl b/repo/issue/sidebar/issue_dependencies.tmpl
new file mode 100644
index 0000000..17e9738
--- /dev/null
+++ b/repo/issue/sidebar/issue_dependencies.tmpl
@@ -0,0 +1,149 @@
+{{if .Repository.IsDependenciesEnabled ctx}}
+	<div class="divider"></div>
+
+	<div class="ui depending">
+		{{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}}
+			<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.dependency.title"}}</strong></span>
+			<br>
+			<p>
+				{{if .Issue.IsPull}}
+					{{ctx.Locale.Tr "repo.issues.dependency.pr_no_dependencies"}}
+				{{else}}
+					{{ctx.Locale.Tr "repo.issues.dependency.issue_no_dependencies"}}
+				{{end}}
+			</p>
+		{{end}}
+
+		{{if or .BlockingDependencies .BlockingDependenciesNotPermitted}}
+			<span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{ctx.Locale.Tr "repo.issues.dependency.pr_close_blocks"}}{{else}}{{ctx.Locale.Tr "repo.issues.dependency.issue_close_blocks"}}{{end}}">
+				<strong>{{ctx.Locale.Tr "repo.issues.dependency.blocks_short"}}</strong>
+			</span>
+			<div class="ui divided list">
+				{{range .BlockingDependencies}}
+					<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
+						<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
+							<a class="muted issue-dependency-title gt-ellipsis" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
+								#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
+							</a>
+							<div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
+								{{.Repository.OwnerName}}/{{.Repository.Name}}
+							</div>
+						</div>
+						<div class="item-right tw-flex tw-items-center tw-m-1">
+							{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
+								<a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}">
+									{{svg "octicon-trash" 16}}
+								</a>
+							{{end}}
+						</div>
+					</div>
+				{{end}}
+				{{if .BlockingDependenciesNotPermitted}}
+					<div class="item tw-flex tw-items-center tw-justify-between gt-ellipsis">
+						<span>{{ctx.Locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span>
+					</div>
+				{{end}}
+			</div>
+		{{end}}
+
+		{{if or .BlockedByDependencies .BlockedByDependenciesNotPermitted}}
+			<span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{ctx.Locale.Tr "repo.issues.dependency.pr_closing_blockedby"}}{{else}}{{ctx.Locale.Tr "repo.issues.dependency.issue_closing_blockedby"}}{{end}}">
+				<strong>{{ctx.Locale.Tr "repo.issues.dependency.blocked_by_short"}}</strong>
+			</span>
+			<div class="ui divided list">
+				{{range .BlockedByDependencies}}
+					<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
+						<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
+							<a class="muted issue-dependency-title gt-ellipsis" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
+								#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
+							</a>
+							<div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
+								{{.Repository.OwnerName}}/{{.Repository.Name}}
+							</div>
+						</div>
+						<div class="item-right tw-flex tw-items-center tw-m-1">
+							{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
+								<a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}">
+									{{svg "octicon-trash" 16}}
+								</a>
+							{{end}}
+						</div>
+					</div>
+				{{end}}
+				{{if $.CanCreateIssueDependencies}}
+					{{range .BlockedByDependenciesNotPermitted}}
+						<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
+							<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
+								<div class="gt-ellipsis">
+									<span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span>
+									<span class="gt-ellipsis issue-dependency-title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
+										#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
+									</span>
+								</div>
+								<div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
+									{{.Repository.OwnerName}}/{{.Repository.Name}}
+								</div>
+							</div>
+							<div class="item-right tw-flex tw-items-center tw-m-1">
+								{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
+									<a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}">
+										{{svg "octicon-trash" 16}}
+									</a>
+								{{end}}
+							</div>
+						</div>
+					{{end}}
+				{{else if .BlockedByDependenciesNotPermitted}}
+					<div class="item tw-flex tw-items-center tw-justify-between gt-ellipsis">
+						<span>{{ctx.Locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span>
+					</div>
+				{{end}}
+			</div>
+		{{end}}
+
+		{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
+			<div>
+				<form method="post" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm">
+					{{$.CsrfTokenHtml}}
+					<div class="ui fluid action input">
+						<div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}">
+							<input name="newDependency" type="hidden">
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<input type="text" class="search">
+							<div class="default text">{{ctx.Locale.Tr "repo.issues.dependency.add"}}</div>
+						</div>
+						<button class="ui icon button">
+							{{svg "octicon-plus"}}
+						</button>
+					</div>
+				</form>
+			</div>
+		{{end}}
+	</div>
+
+	{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
+		<input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}">
+
+		<div class="ui g-modal-confirm modal remove-dependency">
+			<div class="header">
+				{{svg "octicon-trash"}}
+				{{ctx.Locale.Tr "repo.issues.dependency.remove_header"}}
+			</div>
+			<div class="content">
+				<form method="post" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm">
+					{{$.CsrfTokenHtml}}
+					<input type="hidden" value="" name="removeDependencyID" id="removeDependencyID">
+					<input type="hidden" value="" name="dependencyType" id="dependencyType">
+				</form>
+				<p>{{if .Issue.IsPull}}
+					{{ctx.Locale.Tr "repo.issues.dependency.pr_remove_text"}}
+				{{else}}
+					{{ctx.Locale.Tr "repo.issues.dependency.issue_remove_text"}}
+				{{end}}</p>
+			</div>
+			{{$ModalButtonCancelText := ctx.Locale.Tr "repo.issues.dependency.cancel"}}
+			{{$ModalButtonOkText := ctx.Locale.Tr "repo.issues.dependency.remove"}}
+			{{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}}
+		</div>
+	{{end}}
+{{end}}
diff --git a/repo/issue/sidebar/issue_management.tmpl b/repo/issue/sidebar/issue_management.tmpl
new file mode 100644
index 0000000..76edf16
--- /dev/null
+++ b/repo/issue/sidebar/issue_management.tmpl
@@ -0,0 +1,118 @@
+{{if and .IsRepoAdmin (not .Repository.IsArchived)}}
+	<div class="divider"></div>
+
+	{{if or .PinEnabled .Issue.IsPinned}}
+		<form class="tw-mt-1 form-fetch-action single-button-form" method="post" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.max_pinned"}}"{{end}}>
+			{{$.CsrfTokenHtml}}
+			<button class="fluid ui button {{if not $.NewPinAllowed}}disabled{{end}}">
+				{{if not .Issue.IsPinned}}
+					{{svg "octicon-pin"}}
+					{{ctx.Locale.Tr "pin"}}
+				{{else}}
+					{{svg "octicon-pin-slash"}}
+					{{ctx.Locale.Tr "unpin"}}
+				{{end}}
+			</button>
+		</form>
+	{{end}}
+
+	<button class="tw-mt-1 fluid ui show-modal button{{if .Issue.IsLocked}} red{{end}}" data-modal="#lock">
+		{{if .Issue.IsLocked}}
+			{{svg "octicon-key"}}
+			{{ctx.Locale.Tr "repo.issues.unlock"}}
+		{{else}}
+			{{svg "octicon-lock"}}
+			{{ctx.Locale.Tr "repo.issues.lock"}}
+		{{end}}
+	</button>
+	<div class="ui tiny modal" id="lock">
+		<div class="header">
+			{{if .Issue.IsLocked}}
+				{{ctx.Locale.Tr "repo.issues.unlock.title"}}
+			{{else}}
+				{{ctx.Locale.Tr "repo.issues.lock.title"}}
+			{{end}}
+		</div>
+		<div class="content">
+			<div class="ui warning message">
+				{{if .Issue.IsLocked}}
+					{{ctx.Locale.Tr "repo.issues.unlock.notice_1"}}<br>
+					{{ctx.Locale.Tr "repo.issues.unlock.notice_2"}}<br>
+				{{else}}
+					{{ctx.Locale.Tr "repo.issues.lock.notice_1"}}<br>
+					{{ctx.Locale.Tr "repo.issues.lock.notice_2"}}<br>
+					{{ctx.Locale.Tr "repo.issues.lock.notice_3"}}<br>
+				{{end}}
+			</div>
+
+			<form class="ui form form-fetch-action" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}"
+				method="post">
+				{{.CsrfTokenHtml}}
+
+				{{if not .Issue.IsLocked}}
+					<div class="field">
+						<strong> {{ctx.Locale.Tr "repo.issues.lock.reason"}} </strong>
+					</div>
+
+					<div class="field">
+						<div class="ui fluid dropdown selection">
+
+							<select name="reason">
+								<option value=""> </option>
+								{{range .LockReasons}}
+									<option value="{{.}}">{{.}}</option>
+								{{end}}
+							</select>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+
+							<div class="default text"> </div>
+
+							<div class="menu">
+								{{range .LockReasons}}
+									<div class="item" data-value="{{.}}">{{.}}</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+				{{end}}
+
+				<div class="text right actions">
+					<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+					<button class="ui red button">
+						{{if .Issue.IsLocked}}
+							{{ctx.Locale.Tr "repo.issues.unlock_confirm"}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.lock_confirm"}}
+						{{end}}
+					</button>
+				</div>
+			</form>
+		</div>
+	</div>
+	<button class="tw-mt-1 fluid ui show-modal button" data-modal="#sidebar-delete-issue">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.issues.delete"}}
+	</button>
+	<div class="ui g-modal-confirm modal" id="sidebar-delete-issue">
+		<div class="header">
+			{{if .Issue.IsPull}}
+				{{ctx.Locale.Tr "repo.pulls.delete.title"}}
+			{{else}}
+				{{ctx.Locale.Tr "repo.issues.delete.title"}}
+			{{end}}
+		</div>
+		<div class="content">
+			<p>
+				{{if .Issue.IsPull}}
+					{{ctx.Locale.Tr "repo.pulls.delete.text"}}
+				{{else}}
+					{{ctx.Locale.Tr "repo.issues.delete.text"}}
+				{{end}}
+			</p>
+		</div>
+		<form action="{{.Issue.Link}}/delete" method="post">
+			{{.CsrfTokenHtml}}
+			{{template "base/modal_actions_confirm" .}}
+		</form>
+	</div>
+{{end}}
diff --git a/repo/issue/sidebar/label_list.tmpl b/repo/issue/sidebar/label_list.tmpl
new file mode 100644
index 0000000..9b6195a
--- /dev/null
+++ b/repo/issue/sidebar/label_list.tmpl
@@ -0,0 +1,56 @@
+{{$pageMeta := .}}
+{{$data := .LabelsData}}
+<div class="issue-sidebar-combo" data-selection-mode="multiple" data-update-algo="diff"
+		{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/labels?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
+>
+	<input class="combo-value" name="label_ids" type="hidden" value="{{$data.SelectedLabelIDs}}">
+	<div class="ui dropdown {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
+		<a class="text muted">
+			<strong>{{ctx.Locale.Tr "repo.issues.new.labels"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}}
+		</a>
+		<div class="menu">
+			{{if not $data.AllLabels}}
+				<div class="item disabled">{{ctx.Locale.Tr "repo.issues.new.no_items"}}</div>
+			{{else}}
+				<div class="ui icon search input">
+					<i class="icon">{{svg "octicon-search" 16}}</i>
+					<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_labels"}}">
+				</div>
+				<div class="scrolling menu">
+					<a class="item clear-selection" href="#">{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}</a>
+					<div class="divider"></div>
+					{{$previousExclusiveScope := "_no_scope"}}
+					{{range $data.RepoLabels}}
+						{{$exclusiveScope := .ExclusiveScope}}
+						{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
+							<div class="divider" data-scope="{{.ExclusiveScope}}"></div>
+						{{end}}
+						{{$previousExclusiveScope = $exclusiveScope}}
+						{{template "repo/issue/sidebar/label_list_item" dict "Label" .}}
+					{{end}}
+					{{if and $data.RepoLabels $data.OrgLabels}}<div class="divider"></div>{{end}}
+					{{$previousExclusiveScope = "_no_scope"}}
+					{{range $data.OrgLabels}}
+						{{$exclusiveScope := .ExclusiveScope}}
+						{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
+							<div class="divider" data-scope="{{.ExclusiveScope}}"></div>
+						{{end}}
+						{{$previousExclusiveScope = $exclusiveScope}}
+						{{template "repo/issue/sidebar/label_list_item" dict "Label" .}}
+					{{end}}
+				</div>
+			{{end}}
+		</div>
+	</div>
+
+	<div class="ui list labels-list tw-my-2 tw-flex tw-gap-2">
+		<span class="item empty-list {{if $data.SelectedLabelIDs}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_label"}}</span>
+		{{range $data.AllLabels}}
+			{{if .IsChecked}}
+				<a class="item" href="{{$pageMeta.RepoLink}}/{{if $pageMeta.IsPullRequest}}pulls{{else}}issues{{end}}?labels={{.ID}}">
+					{{- ctx.RenderUtils.RenderLabel . -}}
+				</a>
+			{{end}}
+		{{end}}
+	</div>
+</div>
diff --git a/repo/issue/sidebar/label_list_item.tmpl b/repo/issue/sidebar/label_list_item.tmpl
new file mode 100644
index 0000000..5c6808d
--- /dev/null
+++ b/repo/issue/sidebar/label_list_item.tmpl
@@ -0,0 +1,11 @@
+{{$label := .Label}}
+<a class="item muted {{if $label.IsChecked}}checked{{else if $label.IsArchived}}tw-hidden{{end}}" href="#"
+	data-scope="{{$label.ExclusiveScope}}" data-value="{{$label.ID}}" {{if $label.IsArchived}}data-is-archived{{end}}
+>
+	<span class="item-check-mark">{{svg (Iif $label.ExclusiveScope "octicon-dot-fill" "octicon-check")}}</span>
+	{{ctx.RenderUtils.RenderLabel $label}}
+	<div class="item-secondary-info">
+		{{if $label.Description}}<div class="tw-pl-[20px]"><small>{{$label.Description | ctx.RenderUtils.RenderEmoji}}</small></div>{{end}}
+		<div class="archived-label-hint">{{template "repo/issue/labels/label_archived" $label}}</div>
+	</div>
+</a>
diff --git a/repo/issue/sidebar/milestone_list.tmpl b/repo/issue/sidebar/milestone_list.tmpl
new file mode 100644
index 0000000..6495a42
--- /dev/null
+++ b/repo/issue/sidebar/milestone_list.tmpl
@@ -0,0 +1,54 @@
+{{$pageMeta := .}}
+{{$data := .MilestonesData}}
+{{$issueMilestone := NIL}}{{if and $pageMeta.Issue $pageMeta.Issue.Milestone}}{{$issueMilestone = $pageMeta.Issue.Milestone}}{{end}}
+<div class="divider"></div>
+<div class="issue-sidebar-combo" data-selection-mode="single" data-update-algo="all"
+		{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/milestone?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
+>
+	<input class="combo-value" name="milestone_id" type="hidden" value="{{$data.SelectedMilestoneID}}">
+	<div class="ui dropdown {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}} ">
+		<a class="text muted">
+			<strong>{{ctx.Locale.Tr "repo.issues.new.milestone"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}}
+		</a>
+		<div class="menu">
+			{{if and (not $data.OpenMilestones) (not $data.ClosedMilestones)}}
+				<div class="item disabled">{{ctx.Locale.Tr "repo.issues.new.no_items"}}</div>
+			{{else}}
+				<div class="ui icon search input">
+					<i class="icon">{{svg "octicon-search"}}</i>
+					<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_milestones"}}">
+				</div>
+				<div class="scrolling menu">
+					<div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_milestone"}}</div>
+					<div class="divider"></div>
+					{{if $data.OpenMilestones}}
+						<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_open"}}</div>
+						{{range $data.OpenMilestones}}
+							<a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/milestone/{{.ID}}">
+								{{svg "octicon-milestone" 18}} {{.Name}}
+							</a>
+						{{end}}
+					{{end}}
+					{{if and $data.OpenMilestones $data.ClosedMilestones}}<div class="divider"></div>{{end}}
+					{{if $data.ClosedMilestones}}
+						<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_closed"}}</div>
+						{{range $data.ClosedMilestones}}
+							<a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/milestone/{{.ID}}">
+								{{svg "octicon-milestone" 18}} {{.Name}}
+							</a>
+						{{end}}
+					{{end}}
+				</div>
+			{{end}}
+		</div>
+	</div>
+
+	<div class="ui list muted-links flex-items-block">
+		<span class="item empty-list {{if $issueMilestone}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span>
+		{{if $issueMilestone}}
+			<a class="item" href="{{$pageMeta.RepoLink}}/milestone/{{$issueMilestone.ID}}">
+				{{svg "octicon-milestone" 18}} {{$issueMilestone.Name}}
+			</a>
+		{{end}}
+	</div>
+</div>
diff --git a/repo/issue/sidebar/participant_list.tmpl b/repo/issue/sidebar/participant_list.tmpl
new file mode 100644
index 0000000..11debf9
--- /dev/null
+++ b/repo/issue/sidebar/participant_list.tmpl
@@ -0,0 +1,11 @@
+{{if .Participants}}
+	<div class="divider"></div>
+	<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span>
+	<div class="ui list tw-flex tw-flex-wrap">
+		{{range .Participants}}
+			<a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}">
+				{{ctx.AvatarUtils.Avatar . 20 "tw-my-0.5 tw-mr-1"}}
+			</a>
+		{{end}}
+	</div>
+{{end}}
diff --git a/repo/issue/sidebar/project_list.tmpl b/repo/issue/sidebar/project_list.tmpl
new file mode 100644
index 0000000..4520d1f
--- /dev/null
+++ b/repo/issue/sidebar/project_list.tmpl
@@ -0,0 +1,51 @@
+{{$pageMeta := .}}
+{{$data := .ProjectsData}}
+{{$issueProject := NIL}}{{if and $pageMeta.Issue $pageMeta.Issue.Project}}{{$issueProject = $pageMeta.Issue.Project}}{{end}}
+<div class="divider"></div>
+<div class="issue-sidebar-combo" data-selection-mode="single" data-update-algo="all"
+		{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/projects?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
+>
+	<input class="combo-value" name="project_id" type="hidden" value="{{$data.SelectedProjectID}}">
+	<div class="ui dropdown {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
+		<a class="text muted">
+			<strong>{{ctx.Locale.Tr "repo.issues.new.projects"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}}
+		</a>
+		<div class="menu">
+			{{if or $data.OpenProjects $data.ClosedProjects}}
+			<div class="ui icon search input">
+				<i class="icon">{{svg "octicon-search" 16}}</i>
+				<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_projects"}}">
+			</div>
+			{{end}}
+			<div class="scrolling menu">
+				<div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}</div>
+				<div class="divider"></div>
+				{{if $data.OpenProjects}}
+					<div class="header">{{ctx.Locale.Tr "repo.issues.new.open_projects"}}</div>
+					{{range $data.OpenProjects}}
+						<a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
+							{{svg .IconName 18}} {{.Title}}
+						</a>
+					{{end}}
+				{{end}}
+				{{if and $data.OpenProjects $data.ClosedProjects}}<div class="divider"></div>{{end}}
+				{{if $data.ClosedProjects}}
+					<div class="header">{{ctx.Locale.Tr "repo.issues.new.closed_projects"}}</div>
+					{{range $data.ClosedProjects}}
+						<a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
+							{{svg .IconName 18}} {{.Title}}
+						</a>
+					{{end}}
+				{{end}}
+			</div>
+		</div>
+	</div>
+	<div class="ui list muted-links flex-items-block">
+		<span class="item empty-list {{if $issueProject}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span>
+		{{if $issueProject}}
+			<a class="item" href="{{$issueProject.Link ctx}}">
+				{{svg $issueProject.IconName 18}} {{$issueProject.Title}}
+			</a>
+		{{end}}
+	</div>
+</div>
diff --git a/repo/issue/sidebar/reference_link.tmpl b/repo/issue/sidebar/reference_link.tmpl
new file mode 100644
index 0000000..6b8f120
--- /dev/null
+++ b/repo/issue/sidebar/reference_link.tmpl
@@ -0,0 +1,8 @@
+<div class="divider"></div>
+<div class="ui equal width compact grid">
+	{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
+	<div class="row tw-items-center" data-tooltip-content="{{$issueReferenceLink}}">
+		<span class="text column truncate">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span>
+		<button class="ui two wide button column tw-p-2" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button>
+	</div>
+</div>
diff --git a/repo/issue/sidebar/reviewer_list.tmpl b/repo/issue/sidebar/reviewer_list.tmpl
new file mode 100644
index 0000000..b08af03
--- /dev/null
+++ b/repo/issue/sidebar/reviewer_list.tmpl
@@ -0,0 +1,132 @@
+{{$pageMeta := .}}
+{{$data := .ReviewersData}}
+{{$repoOwnerName := $pageMeta.Repository.OwnerName}}
+{{$hasCandidates := or $data.Reviewers $data.TeamReviewers}}
+<div class="issue-sidebar-combo" data-selection-mode="multiple" data-update-algo="diff"
+		{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/request_review?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
+>
+	<input type="hidden" class="combo-value" name="reviewer_ids">{{/* match CreateIssueForm */}}
+	<div class="ui dropdown {{if or (not $hasCandidates) (not $data.CanChooseReviewer)}}disabled{{end}}">
+		<a class="text muted">
+			<strong>{{ctx.Locale.Tr "repo.issues.review.reviewers"}}</strong> {{if $data.CanChooseReviewer}}{{svg "octicon-gear"}}{{end}}
+		</a>
+		<div class="menu flex-items-menu">
+			{{if $hasCandidates}}
+				<div class="ui icon search input">
+					<i class="icon">{{svg "octicon-search"}}</i>
+					<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_reviewers"}}">
+				</div>
+			{{end}}
+			<div class="scrolling menu flex-items-menu">
+				{{range $data.Reviewers}}
+					{{if .User}}
+						<a class="item muted {{if .Requested}}checked{{end}}" href="{{.User.HomeLink}}" data-value="{{.ItemID}}" data-can-change="{{.CanChange}}"
+							{{if not .CanChange}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
+							<span class="item-check-mark">{{svg "octicon-check"}}</span>
+							{{ctx.AvatarUtils.Avatar .User 20}} {{template "repo/search_name" .User}}
+						</a>
+					{{end}}
+				{{end}}
+				{{if $data.TeamReviewers}}
+					{{if $data.Reviewers}}<div class="divider"></div>{{end}}
+					{{range $data.TeamReviewers}}
+						{{if .Team}}
+							<a class="item muted {{if .Requested}}checked{{end}}" href="#" data-value="{{.ItemID}}" data-can-change="{{.CanChange}}"
+								{{if not .CanChange}} data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
+								<span class="item-check-mark">{{svg "octicon-check"}}</span>
+								{{svg "octicon-people" 20}} {{$repoOwnerName}}/{{.Team.Name}}
+							</a>
+						{{end}}
+					{{end}}
+				{{end}}
+			</div>
+		</div>
+	</div>
+
+	<div class="ui relaxed list flex-items-block tw-my-4">
+		<span class="item empty-list {{if or $data.OriginalReviews $data.CurrentPullReviewers}}tw-hidden{{end}}">
+			{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}
+		</span>
+		{{range $data.CurrentPullReviewers}}
+			<div class="item">
+				<div class="flex-text-inline tw-flex-1">
+					{{if .User}}
+						<a class="muted flex-text-inline tw-gap-2" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20}} {{.User.GetDisplayName}}</a>
+					{{else if .Team}}
+						<span class="flex-text-inline tw-gap-2">{{svg "octicon-people" 20}} {{$repoOwnerName}}/{{.Team.Name}}</span>
+					{{end}}
+				</div>
+				<div class="flex-text-inline">
+					{{if .CanBeDismissed}}
+						<a href="#" class="ui muted icon show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dismiss_review"}}"
+							data-modal="#issue-sidebar-dismiss-review-modal" data-modal-reviewer-id="{{.Review.ID}}">
+							{{svg "octicon-x" 20}}
+						</a>
+					{{end}}
+					{{if .Review.Stale}}
+						<span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.is_stale"}}">{{svg "octicon-hourglass" 16}}</span>
+					{{end}}
+					{{if and .CanChange $data.CanChooseReviewer}}
+						{{if .Requested}}
+							<a href="#" class="ui muted icon link-action"
+								data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review"}}"
+								data-url="{{$pageMeta.RepoLink}}/issues/request_review?action=detach&issue_ids={{$pageMeta.Issue.ID}}&id={{.ItemID}}">
+								{{svg "octicon-trash"}}
+							</a>
+						{{else}}
+							<a href="#" class="ui muted icon link-action"
+								data-tooltip-content="{{ctx.Locale.Tr "repo.issues.re_request_review"}}"
+								data-url="{{$pageMeta.RepoLink}}/issues/request_review?action=attach&issue_ids={{$pageMeta.Issue.ID}}&id={{.ItemID}}">
+								{{svg "octicon-sync"}}
+							</a>
+						{{end}}
+					{{end}}
+					<span {{if .Review.TooltipContent}}data-tooltip-content="{{ctx.Locale.Tr .Review.TooltipContent}}"{{end}}>
+						{{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}}
+					</span>
+				</div>
+			</div>
+		{{end}}
+		{{range $data.OriginalReviews}}
+			<div class="item">
+				<div class="flex-text-inline tw-flex-1">
+					{{$originalURLHostname := $pageMeta.Repository.GetOriginalURLHostname}}
+					{{$originalURL := $pageMeta.Repository.OriginalURL}}
+					<a class="muted flex-text-inline tw-gap-2" href="{{$originalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $originalURLHostname}}">
+						{{svg (MigrationIcon $originalURLHostname) 20}} {{.OriginalAuthor}}
+					</a>
+				</div>
+				<div class="flex-text-inline">
+					<span {{if .TooltipContent}}data-tooltip-content="{{ctx.Locale.Tr .TooltipContent}}"{{end}}>
+						{{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}}
+					</span>
+				</div>
+			</div>
+		{{end}}
+	</div>
+
+	{{if $data.CurrentPullReviewers}}
+	<div class="ui small modal" id="issue-sidebar-dismiss-review-modal">
+		<div class="header">
+			{{ctx.Locale.Tr "repo.issues.dismiss_review"}}
+		</div>
+		<div class="content">
+			<div class="ui warning message">
+				{{ctx.Locale.Tr "repo.issues.dismiss_review_warning"}}
+			</div>
+			<form class="ui form" action="{{$pageMeta.RepoLink}}/issues/dismiss_review" method="post">
+				{{ctx.RootData.CsrfTokenHtml}}
+				<input type="hidden" class="reviewer-id" name="review_id">
+				<div class="field">
+					<label for="issue-sidebar-dismiss-review-message">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</label>
+					<input id="issue-sidebar-dismiss-review-message" name="message">
+				</div>
+				<div class="text right actions">
+					<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+					<button class="ui red button" type="submit">{{ctx.Locale.Tr "ok"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+	{{end}}
+</div>
diff --git a/repo/issue/sidebar/stopwatch_timetracker.tmpl b/repo/issue/sidebar/stopwatch_timetracker.tmpl
new file mode 100644
index 0000000..f107dc5
--- /dev/null
+++ b/repo/issue/sidebar/stopwatch_timetracker.tmpl
@@ -0,0 +1,93 @@
+{{if .Repository.IsTimetrackerEnabled ctx}}
+	{{if and .CanUseTimetracker (not .Repository.IsArchived)}}
+		<div class="divider"></div>
+		<div>
+			<div class="ui dropdown jump">
+				<a class="text muted">
+					<strong>{{ctx.Locale.Tr "repo.issues.tracker"}}</strong> {{svg "octicon-gear"}}
+					{{if $.IsStopwatchRunning}}{{svg "octicon-stopwatch"}}{{end}}
+				</a>
+				<div class="menu">
+					<a class="item issue-set-time-estimate show-modal" data-modal="#issue-time-set-estimate-modal">
+						{{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.time_estimate_set"}}
+					</a>
+					<div class="divider"></div>
+					{{if $.IsStopwatchRunning}}
+					<a class="item issue-stop-time link-action" data-url="{{.Issue.Link}}/times/stopwatch/toggle">
+						{{svg "octicon-stopwatch"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_stop"}}
+					</a>
+					<a class="item issue-cancel-time link-action" data-url="{{.Issue.Link}}/times/stopwatch/cancel">
+						{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_discard"}}
+					</a>
+					{{else}}
+					<a class="item issue-start-time link-action" data-url="{{.Issue.Link}}/times/stopwatch/toggle">
+						{{svg "octicon-stopwatch"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_start"}}
+					</a>
+					<a class="item issue-add-time show-modal" data-modal="#issue-time-manually-add-modal">
+						{{svg "octicon-plus"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_manually_add"}}
+					</a>
+					{{end}}
+				</div>
+			</div>
+
+			{{if and (not $.IsStopwatchRunning) .HasUserStopwatch}}
+				<div class="ui warning message">{{ctx.Locale.Tr "repo.issues.tracking_already_started" .OtherStopwatchURL}}</div>
+			{{end}}
+
+			{{if .Issue.TimeEstimate}}
+				<div class="tw-my-2">{{ctx.Locale.Tr "repo.issues.time_estimate_display" (TimeEstimateString .Issue.TimeEstimate)}}</div>
+			{{end}}
+
+			{{/* set time estimate modal */}}
+			<div class="ui mini modal" id="issue-time-set-estimate-modal">
+				<div class="header">{{ctx.Locale.Tr "repo.issues.time_estimate_set"}}</div>
+				<form method="post" class="ui form form-fetch-action" action="{{.Issue.Link}}/time_estimate">
+					<div class="content">
+						{{$.CsrfTokenHtml}}
+						<input name="time_estimate" placeholder="1h 2m" value="{{TimeEstimateString .Issue.TimeEstimate}}">
+						<div class="actions">
+							<button class="ui cancel button">{{ctx.Locale.Tr "cancel"}}</button>
+							<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
+						</div>
+					</div>
+				</form>
+			</div>
+
+			{{/* manually add time modal */}}
+			<div class="ui mini modal" id="issue-time-manually-add-modal">
+				<div class="header">{{ctx.Locale.Tr "repo.issues.add_time_manually"}}</div>
+				<form method="post" class="ui form form-fetch-action" action="{{.Issue.Link}}/times/add">
+					<div class="content flex-text-block">
+						{{$.CsrfTokenHtml}}
+						<input placeholder='{{ctx.Locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours">:
+						<input placeholder='{{ctx.Locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes">
+					</div>
+					<div class="actions">
+						<button class="ui cancel button">{{ctx.Locale.Tr "cancel"}}</button>
+						<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.timetracker_timer_manually_add"}}</button>
+					</div>
+				</form>
+			</div>
+		</div>
+	{{end}}
+	{{if .WorkingUsers}}
+		<div class="ui comments tw-mt-2">
+			{{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time)}}
+			<div>
+				{{range $user, $trackedtime := .WorkingUsers}}
+					<div class="comment tw-mt-2">
+						<a class="avatar">
+							{{ctx.AvatarUtils.Avatar $user}}
+						</a>
+						<div class="content">
+							{{template "shared/user/authorlink" $user}}
+							<div class="text">
+								{{$trackedtime|Sec2Time}}
+							</div>
+						</div>
+					</div>
+				{{end}}
+			</div>
+		</div>
+	{{end}}
+{{end}}
diff --git a/repo/issue/sidebar/watch_notification.tmpl b/repo/issue/sidebar/watch_notification.tmpl
new file mode 100644
index 0000000..aafee87
--- /dev/null
+++ b/repo/issue/sidebar/watch_notification.tmpl
@@ -0,0 +1,9 @@
+{{if and $.IssueWatch (not .Repository.IsArchived)}}
+	<div class="divider"></div>
+	<div class="ui watching">
+		<span class="text"><strong>{{ctx.Locale.Tr "notification.notifications"}}</strong></span>
+		<div class="tw-mt-2">
+			{{template "repo/issue/view_content/watching" .}}
+		</div>
+	</div>
+{{end}}
diff --git a/repo/issue/sidebar/wip_switch.tmpl b/repo/issue/sidebar/wip_switch.tmpl
new file mode 100644
index 0000000..06a3be0
--- /dev/null
+++ b/repo/issue/sidebar/wip_switch.tmpl
@@ -0,0 +1,7 @@
+{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}}
+	<div class="toggle-wip tw-mt-2" data-title="{{.Issue.Title}}" data-wip-prefix="{{index .PullRequestWorkInProgressPrefixes 0}}" data-update-url="{{.Issue.Link}}/title">
+		<a class="muted">
+			{{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0)}}
+		</a>
+	</div>
+{{end}}
diff --git a/repo/issue/view.tmpl b/repo/issue/view.tmpl
new file mode 100644
index 0000000..1ef9e73
--- /dev/null
+++ b/repo/issue/view.tmpl
@@ -0,0 +1,12 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository view issue pull">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "repo/issue/view_title" .}}
+		{{if .Issue.IsPull}}
+			{{template "repo/pulls/tab_menu" .}}
+		{{end}}
+		{{template "repo/issue/view_content" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/issue/view_content.tmpl b/repo/issue/view_content.tmpl
new file mode 100644
index 0000000..69b5a11
--- /dev/null
+++ b/repo/issue/view_content.tmpl
@@ -0,0 +1,184 @@
+<div class="issue-content">
+	{{$createdStr:= DateUtils.TimeSince .Issue.CreatedUnix}}
+	<div class="issue-content-left comment-list prevent-before-timeline">
+		<div class="ui timeline">
+			<div id="{{.Issue.HashTag}}" class="timeline-item comment first">
+				{{if .Issue.OriginalAuthor}}
+				<span class="timeline-avatar">
+					{{ctx.AvatarUtils.Avatar nil 40}}
+				</span>
+				{{else}}
+				<a class="timeline-avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
+					{{ctx.AvatarUtils.Avatar .Issue.Poster 40}}
+				</a>
+				{{end}}
+				<div class="content comment-container">
+					<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
+						<div class="comment-header-left tw-flex tw-items-center">
+							{{if .Issue.OriginalAuthor}}
+								<span class="text black tw-font-semibold">
+									{{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
+									{{.Issue.OriginalAuthor}}
+								</span>
+								<span class="text grey muted-links">
+									{{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
+								</span>
+								<span class="text migrate">
+									{{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname}}){{end}}
+								</span>
+							{{else}}
+								<a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
+									{{ctx.AvatarUtils.Avatar .Issue.Poster 24}}
+								</a>
+								<span class="text grey muted-links">
+									{{template "shared/user/authorlink" .Issue.Poster}}
+									{{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
+								</span>
+							{{end}}
+						</div>
+						<div class="comment-header-right actions tw-flex tw-items-center">
+							{{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}}
+							{{if not $.Repository.IsArchived}}
+								{{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
+							{{end}}
+							{{template "repo/issue/view_content/context_menu" dict "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}}
+						</div>
+					</div>
+					<div class="ui attached segment comment-body" role="article">
+						<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission $.IsIssuePoster}}data-can-edit="true"{{end}}>
+							{{if .Issue.RenderedContent}}
+								{{.Issue.RenderedContent}}
+							{{else}}
+								<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
+							{{end}}
+						</div>
+						<div id="issue-{{.Issue.ID}}-raw" class="raw-content tw-hidden">{{.Issue.Content}}</div>
+						<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-content-version="{{.Issue.ContentVersion}}" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
+						{{if .Issue.Attachments}}
+							{{template "repo/issue/view_content/attachments" dict "Attachments" .Issue.Attachments "RenderedContent" .Issue.RenderedContent}}
+						{{end}}
+					</div>
+					{{$reactions := .Issue.Reactions.GroupByType}}
+					{{if $reactions}}
+						{{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
+					{{end}}
+				</div>
+			</div>
+
+			{{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 .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived)}}
+				<div class="timeline-item comment form">
+					<a class="timeline-avatar" href="{{.SignedUser.HomeLink}}">
+						{{ctx.AvatarUtils.Avatar .SignedUser 40}}
+					</a>
+					<div class="content">
+						<div class="ui segment">
+							<form class="ui form form-fetch-action" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
+								{{template "repo/issue/comment_tab" .}}
+								{{.CsrfTokenHtml}}
+								<div class="field footer">
+									<div class="text right">
+										{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
+											{{if .Issue.IsClosed}}
+												<button id="status-button" class="ui primary basic button" data-status="{{ctx.Locale.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.reopen_comment_issue"}}" name="status" value="reopen">
+													{{ctx.Locale.Tr "repo.issues.reopen_issue"}}
+												</button>
+											{{else}}
+												{{$closeTranslationKey := "repo.issues.close"}}
+												{{if .Issue.IsPull}}
+													{{$closeTranslationKey = "repo.pulls.close"}}
+												{{end}}
+												<button id="status-button" class="ui red basic button" data-status="{{ctx.Locale.Tr $closeTranslationKey}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.close_comment_issue"}}" name="status" value="close">
+													{{ctx.Locale.Tr $closeTranslationKey}}
+												</button>
+											{{end}}
+										{{end}}
+										<button id="comment-button" class="ui primary button">
+											{{ctx.Locale.Tr "repo.issues.create_comment"}}
+										</button>
+									</div>
+								</div>
+							</form>
+						</div>
+					</div>
+				</div>
+				{{else if .Repository.IsArchived}}
+					<div class="ui warning message tw-text-center">
+						{{if .Issue.IsPull}}
+							{{ctx.Locale.Tr "repo.archive.pull.nocomment"}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.archive.issue.nocomment"}}
+						{{end}}
+					</div>
+				{{end}}
+			{{else}} {{/* not .IsSigned */}}
+				{{if .Repository.IsArchived}}
+					<div class="ui warning message tw-text-center">
+						{{if .Issue.IsPull}}
+							{{ctx.Locale.Tr "repo.archive.pull.nocomment"}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.archive.issue.nocomment"}}
+						{{end}}
+					</div>
+				{{else}}
+					<div class="ui warning message">
+						{{ctx.Locale.Tr "repo.issues.sign_in_require_desc" .SignInLink}}
+					</div>
+				{{end}}
+			{{end}}{{/* end if: .IsSigned */}}
+		</div>
+	</div>
+
+	{{template "repo/issue/view_content/sidebar" .}}
+</div>
+
+<template id="issue-comment-editor-template">
+	<div class="ui form comment">
+		<div class="field">
+			{{template "shared/combomarkdowneditor" (dict
+				"CustomInit" true
+				"MarkdownPreviewInRepo" $.Repository
+				"MarkdownPreviewMode" "comment"
+				"TextareaName" "content"
+				"DropzoneParentContainer" ".ui.form"
+			)}}
+		</div>
+
+		{{if .IsAttachmentEnabled}}
+			<div class="field">
+				{{template "repo/upload" .}}
+			</div>
+		{{end}}
+
+		<div class="field">
+			<div class="text right edit">
+				<button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
+				<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
+			</div>
+		</div>
+	</div>
+</template>
+
+{{template "repo/issue/view_content/reference_issue_dialog" .}}
+{{template "shared/user/block_user_dialog" .}}
+
+<div class="tw-hidden" id="no-content">
+	<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
+</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.branch.delete" .HeadTarget}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.branch.delete_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
diff --git a/repo/issue/view_content/add_reaction.tmpl b/repo/issue/view_content/add_reaction.tmpl
new file mode 100644
index 0000000..6baded8
--- /dev/null
+++ b/repo/issue/view_content/add_reaction.tmpl
@@ -0,0 +1,10 @@
+{{if ctx.RootData.IsSigned}}
+<div class="item action ui dropdown jump pointing top right select-reaction" data-action-url="{{.ActionURL}}">
+	<a class="muted">{{svg "octicon-smiley"}}</a>
+	<div class="menu">
+		{{range $value := AllowedReactions}}
+		<a class="item emoji comment-reaction-button" data-tooltip-content="{{$value}}" aria-label="{{$value}}" data-reaction-content="{{$value}}">{{ReactionToEmoji $value}}</a>
+		{{end}}
+	</div>
+</div>
+{{end}}
diff --git a/repo/issue/view_content/attachments.tmpl b/repo/issue/view_content/attachments.tmpl
new file mode 100644
index 0000000..2155f78
--- /dev/null
+++ b/repo/issue/view_content/attachments.tmpl
@@ -0,0 +1,42 @@
+<div class="dropzone-attachments">
+	{{if .Attachments}}
+		<div class="divider"></div>
+	{{end}}
+	{{$hasThumbnails := false}}
+	{{- range .Attachments -}}
+		<div class="tw-flex">
+			<div class="tw-flex-1 tw-p-2">
+				<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title="{{ctx.Locale.Tr "repo.issues.attachment.open_tab" .Name}}">
+					{{if FilenameIsImage .Name}}
+						{{if not (StringUtils.Contains (StringUtils.ToString $.RenderedContent) .UUID)}}
+							{{$hasThumbnails = true}}
+						{{end}}
+						{{svg "octicon-file"}}
+					{{else}}
+						{{svg "octicon-desktop-download"}}
+					{{end}}
+					<span><strong>{{.Name}}</strong></span>
+				</a>
+			</div>
+			<div class="tw-p-2 tw-flex tw-items-center">
+				<span class="ui text grey">{{.Size | FileSize}}</span>
+			</div>
+		</div>
+	{{end -}}
+
+	{{if $hasThumbnails}}
+		<div class="divider"></div>
+		<div class="ui small thumbnails">
+			{{- range .Attachments -}}
+				{{if FilenameIsImage .Name}}
+					{{if not (StringUtils.Contains (StringUtils.ToString $.RenderedContent) .UUID)}}
+					<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
+						<img alt="{{.Name}}" src="{{.DownloadURL}}" title="{{ctx.Locale.Tr "repo.issues.attachment.open_tab" .Name}}">
+					</a>
+					{{end}}
+				{{end}}
+			{{end -}}
+		</div>
+	{{end}}
+
+</div>
diff --git a/repo/issue/view_content/comments.tmpl b/repo/issue/view_content/comments.tmpl
new file mode 100644
index 0000000..2e1a67e
--- /dev/null
+++ b/repo/issue/view_content/comments.tmpl
@@ -0,0 +1,710 @@
+{{template "base/alert"}}
+{{range .Issue.Comments}}
+	{{if call $.ShouldShowCommentType .Type}}
+		{{$createdStr:= DateUtils.TimeSince .CreatedUnix}}
+
+		<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF,
+		5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 8 = MILESTONE_CHANGE,
+		9 = ASSIGNEES_CHANGE, 10 = TITLE_CHANGE, 11 = DELETE_BRANCH, 12 = START_TRACKING,
+		13 = STOP_TRACKING, 14 = ADD_TIME_MANUAL, 16 = ADDED_DEADLINE, 17 = MODIFIED_DEADLINE,
+		18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE,
+		22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED,
+		26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST, 28 = MERGE_PULL_REQUEST,
+		29 = PULL_PUSH_EVENT, 30 = PROJECT_CHANGED, 31 = PROJECT_BOARD_CHANGED
+		32 = DISMISSED_REVIEW, 33 = COMMENT_TYPE_CHANGE_ISSUE_REF, 34 = PR_SCHEDULE_TO_AUTO_MERGE,
+		35 = CANCEL_SCHEDULED_AUTO_MERGE_PR, 36 = PIN_ISSUE, 37 = UNPIN_ISSUE,
+		38 = COMMENT_TYPE_CHANGE_TIME_ESTIMATE -->
+		{{if eq .Type 0}}
+			<div class="timeline-item comment" id="{{.HashTag}}">
+			{{if .OriginalAuthor}}
+				<span class="timeline-avatar">
+					{{ctx.AvatarUtils.Avatar nil 40}}
+				</span>
+			{{else}}
+				<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
+					{{ctx.AvatarUtils.Avatar .Poster 40}}
+				</a>
+			{{end}}
+				<div class="content comment-container">
+					<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
+						<div class="comment-header-left tw-flex tw-items-center">
+							{{if .OriginalAuthor}}
+								<span class="text black tw-font-semibold tw-mr-1">
+									{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
+									{{.OriginalAuthor}}
+								</span>
+								<span class="text grey muted-links">
+									{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} {{if $.Repository.OriginalURL}}
+								</span>
+								<span class="text migrate">
+									({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}}
+								</span>
+							{{else}}
+								{{if gt .Poster.ID 0}}
+									<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
+										{{ctx.AvatarUtils.Avatar .Poster 24}}
+									</a>
+								{{end}}
+								<span class="text grey muted-links">
+									{{template "shared/user/authorlink" .Poster}}
+									{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}}
+								</span>
+							{{end}}
+						</div>
+						<div class="comment-header-right actions tw-flex tw-items-center">
+							{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
+							{{if not $.Repository.IsArchived}}
+								{{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
+							{{end}}
+							{{template "repo/issue/view_content/context_menu" dict "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
+						</div>
+					</div>
+					<div class="ui attached segment comment-body" role="article">
+						<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
+							{{if .RenderedContent}}
+								{{.RenderedContent}}
+							{{else}}
+								<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
+							{{end}}
+						</div>
+						<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
+						<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-content-version="{{.ContentVersion}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
+						{{if .Attachments}}
+							{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
+						{{end}}
+					</div>
+					{{$reactions := .Reactions.GroupByType}}
+					{{if $reactions}}
+						{{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
+					{{end}}
+				</div>
+			</div>
+		{{else if eq .Type 1}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge tw-bg-green tw-text-white">{{svg "octicon-dot-fill"}}</span>
+				{{if not .OriginalAuthor}}
+					{{template "shared/user/avatarlink" dict "user" .Poster}}
+				{{end}}
+				<span class="text grey muted-links">
+					{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
+					{{if .Issue.IsPull}}
+						{{ctx.Locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.issues.reopened_at" .EventTag $createdStr}}
+					{{end}}
+				</span>
+			</div>
+		{{else if eq .Type 2}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge tw-bg-red tw-text-white">{{svg "octicon-circle-slash"}}</span>
+				{{if not .OriginalAuthor}}
+					{{template "shared/user/avatarlink" dict "user" .Poster}}
+				{{end}}
+				<span class="text grey muted-links">
+					{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
+					{{if .Issue.IsPull}}
+						{{ctx.Locale.Tr "repo.pulls.closed_at" .EventTag $createdStr}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.issues.closed_at" .EventTag $createdStr}}
+					{{end}}
+				</span>
+			</div>
+		{{else if eq .Type 28}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge tw-bg-purple tw-text-white">{{svg "octicon-git-merge"}}</span>
+				{{if not .OriginalAuthor}}
+					{{template "shared/user/avatarlink" dict "user" .Poster}}
+				{{end}}
+				<span class="text grey muted-links">
+					{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
+					{{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}}
+					{{if eq $.Issue.PullRequest.Status 3}}
+						{{ctx.Locale.Tr "repo.issues.comment_manually_pull_merged_at" (HTMLFormat `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` $link (ShortSha $.Issue.PullRequest.MergedCommitID)) (HTMLFormat "<b>%[1]s</b>" $.BaseTarget) $createdStr}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.issues.comment_pull_merged_at" (HTMLFormat `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` $link (ShortSha $.Issue.PullRequest.MergedCommitID)) (HTMLFormat "<b>%[1]s</b>" $.BaseTarget) $createdStr}}
+					{{end}}
+				</span>
+			</div>
+		{{else if eq .Type 3 5 6}}
+			{{$refFrom:= ""}}
+			{{if ne .RefRepoID .Issue.RepoID}}
+				{{$refFrom = ctx.Locale.Tr "repo.issues.ref_from" .RefRepo.FullName}}
+			{{end}}
+			{{$refTr := "repo.issues.ref_issue_from"}}
+			{{if .Issue.IsPull}}
+				{{$refTr = "repo.issues.ref_pull_from"}}
+			{{else if eq .RefAction 1}}
+				{{$refTr = "repo.issues.ref_closing_from"}}
+			{{else if eq .RefAction 2}}
+				{{$refTr = "repo.issues.ref_reopening_from"}}
+			{{end}}
+			{{$createdStr:= DateUtils.TimeSince .CreatedUnix}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-bookmark"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				{{if eq .RefAction 3}}<del>{{end}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{ctx.Locale.Tr $refTr .EventTag $createdStr (.RefCommentLink ctx) $refFrom}}
+				</span>
+				{{if eq .RefAction 3}}</del>{{end}}
+
+				<div class="detail flex-text-block">
+					<span class="text grey muted-links"><a href="{{.RefIssueLink ctx}}"><b>{{.RefIssueTitle ctx}}</b> {{.RefIssueIdent ctx}}</a></span>
+				</div>
+			</div>
+		{{else if eq .Type 4}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-bookmark"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr}}
+				</span>
+				<div class="detail flex-text-block">
+					{{svg "octicon-git-commit"}}
+					<span class="text grey muted-links">{{.Content | SanitizeHTML}}</span>
+				</div>
+			</div>
+		{{else if eq .Type 7}}
+			{{if or .AddedLabels .RemovedLabels}}
+				<div class="timeline-item event" id="{{.HashTag}}">
+					<span class="badge">{{svg "octicon-tag"}}</span>
+					{{template "shared/user/avatarlink" dict "user" .Poster}}
+					<span class="text grey muted-links">
+						{{template "shared/user/authorlink" .Poster}}
+						{{if and .AddedLabels (not .RemovedLabels)}}
+							{{ctx.Locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (ctx.RenderUtils.RenderLabels .AddedLabels $.RepoLink .Issue) $createdStr}}
+						{{else if and (not .AddedLabels) .RemovedLabels}}
+							{{ctx.Locale.TrN (len .RemovedLabels) "repo.issues.remove_label" "repo.issues.remove_labels" (ctx.RenderUtils.RenderLabels .RemovedLabels $.RepoLink .Issue) $createdStr}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.add_remove_labels" (ctx.RenderUtils.RenderLabels .AddedLabels $.RepoLink .Issue) (ctx.RenderUtils.RenderLabels .RemovedLabels $.RepoLink .Issue) $createdStr}}
+						{{end}}
+					</span>
+				</div>
+			{{end}}
+		{{else if eq .Type 8}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-milestone"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.change_milestone_at" .OldMilestone.Name .Milestone.Name $createdStr}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" .OldMilestone.Name $createdStr}}{{end}}{{else if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.add_milestone_at" .Milestone.Name $createdStr}}{{end}}
+				</span>
+			</div>
+		{{else if and (eq .Type 9) (gt .AssigneeID 0)}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-person"}}</span>
+				{{if .RemovedAssignee}}
+					{{template "shared/user/avatarlink" dict "user" .Assignee}}
+					<span class="text grey muted-links">
+						{{template "shared/user/authorlink" .Assignee}}
+						{{if eq .Poster.ID .Assignee.ID}}
+							{{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.remove_assignee_at" .Poster.GetDisplayName $createdStr}}
+						{{end}}
+					</span>
+				{{else}}
+					{{template "shared/user/avatarlink" dict "user" .Assignee}}
+					<span class="text grey muted-links">
+						{{template "shared/user/authorlink" .Assignee}}
+						{{if eq .Poster.ID .AssigneeID}}
+							{{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.add_assignee_at" .Poster.GetDisplayName $createdStr}}
+						{{end}}
+					</span>
+				{{end}}
+			</div>
+		{{else if eq .Type 10}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-pencil"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{ctx.Locale.Tr "repo.issues.change_title_at" (.OldTitle|ctx.RenderUtils.RenderEmoji) (.NewTitle|ctx.RenderUtils.RenderEmoji) $createdStr}}
+				</span>
+			</div>
+		{{else if eq .Type 11}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-git-branch"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{$oldRef := HTMLFormat `<span class="tw-line-through">%s</span>` .OldRef}}
+					{{ctx.Locale.Tr "repo.issues.delete_branch_at" $oldRef $createdStr}}
+				</span>
+			</div>
+		{{else if eq .Type 12}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-clock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{ctx.Locale.Tr "repo.issues.start_tracking_history" $createdStr}}
+				</span>
+			</div>
+		{{else if eq .Type 13}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-clock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{$timeStr := .RenderedContent}} {{/* compatibility with time comments made before v1.21 */}}
+					{{if not $timeStr}}{{$timeStr = .Content|Sec2Time}}{{end}}
+					{{ctx.Locale.Tr "repo.issues.stop_tracking_history" $timeStr $createdStr}}
+				</span>
+				{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
+			</div>
+		{{else if eq .Type 14}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-clock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{$timeStr := .RenderedContent}} {{/* compatibility with time comments made before v1.21 */}}
+					{{if not $timeStr}}{{$timeStr = .Content|Sec2Time}}{{end}}
+					{{ctx.Locale.Tr "repo.issues.add_time_history" $timeStr $createdStr}}
+				</span>
+				{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
+			</div>
+		{{else if eq .Type 15}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-clock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{ctx.Locale.Tr "repo.issues.cancel_tracking_history" $createdStr}}
+				</span>
+			</div>
+		{{else if eq .Type 16}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-clock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{$dueDate := DateUtils.AbsoluteLong (.Content|DateUtils.ParseLegacy)}}
+					{{ctx.Locale.Tr "repo.issues.due_date_added" $dueDate $createdStr}}
+				</span>
+			</div>
+		{{else if eq .Type 17}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-clock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{$parsedDeadline := StringUtils.Split .Content "|"}}
+					{{if eq (len $parsedDeadline) 2}}
+						{{$to := DateUtils.AbsoluteLong ((index $parsedDeadline 0)|DateUtils.ParseLegacy)}}
+						{{$from := DateUtils.AbsoluteLong ((index $parsedDeadline 1)|DateUtils.ParseLegacy)}}
+						{{ctx.Locale.Tr "repo.issues.due_date_modified" $to $from $createdStr}}
+					{{end}}
+				</span>
+			</div>
+		{{else if eq .Type 18}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-clock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{$dueDate := DateUtils.AbsoluteLong (.Content|DateUtils.ParseLegacy)}}
+					{{ctx.Locale.Tr "repo.issues.due_date_remove" $dueDate $createdStr}}
+				</span>
+			</div>
+		{{else if eq .Type 19}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-package-dependents"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{ctx.Locale.Tr "repo.issues.dependency.added_dependency" $createdStr}}
+				</span>
+				{{if .DependentIssue}}
+					<div class="detail flex-text-block">
+						{{svg "octicon-plus"}}
+						<span class="text grey muted-links">
+							<a href="{{.DependentIssue.Link}}">
+								{{if eq .DependentIssue.RepoID .Issue.RepoID}}
+									#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
+								{{else}}
+									{{.DependentIssue.Repo.FullName}}#{{.DependentIssue.Index}} - {{.DependentIssue.Title}}
+								{{end}}
+							</a>
+						</span>
+					</div>
+				{{end}}
+			</div>
+		{{else if eq .Type 20}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-package-dependents"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{ctx.Locale.Tr "repo.issues.dependency.removed_dependency" $createdStr}}
+				</span>
+				{{if .DependentIssue}}
+					<div class="detail flex-text-block">
+						{{svg "octicon-trash"}}
+						<span class="text grey muted-links">
+							<a href="{{.DependentIssue.Link}}">
+								{{if eq .DependentIssue.RepoID .Issue.RepoID}}
+									#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
+								{{else}}
+									{{.DependentIssue.Repo.FullName}}#{{.DependentIssue.Index}} - {{.DependentIssue.Title}}
+								{{end}}
+							</a>
+						</span>
+					</div>
+				{{end}}
+			</div>
+		{{else if eq .Type 22}}
+			<div class="timeline-item-group" id="{{.HashTag}}">
+				<div class="timeline-item event">
+					{{$reviewType := -1}}
+					{{if .Review}}{{$reviewType = .Review.Type}}{{end}}
+					{{if not .OriginalAuthor}}
+					{{/* Some timeline avatars need a offset to correctly align with their speech bubble.
+						The condition depends on whether the comment has contents/attachments,
+						review's comment is also controlled/rendered by issue comment's Content field */}}
+					<a class="timeline-avatar{{if or .Content .Attachments}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
+						{{ctx.AvatarUtils.Avatar .Poster 40}}
+					</a>
+					{{end}}
+					<span class="badge tw-text-white{{if eq $reviewType 1}}{{if .Review.Official}} tw-bg-green {{else}} tw-bg-grey{{end}}{{else if eq $reviewType 3}} tw-bg-red{{end}}">
+						{{if .Review}}{{svg (printf "octicon-%s" .Review.Type.Icon)}}{{end}}
+					</span>
+					<span class="text grey muted-links">
+						{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
+						{{if eq $reviewType 1}}
+							{{ctx.Locale.Tr "repo.issues.review.approve" $createdStr}}
+						{{else if eq $reviewType 2}}
+							{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}}
+						{{else if eq $reviewType 3}}
+							{{ctx.Locale.Tr "repo.issues.review.reject" $createdStr}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}}
+						{{end}}
+						{{if and .Review .Review.Dismissed}}
+							<div class="ui small label">{{ctx.Locale.Tr "repo.issues.review.dismissed_label"}}</div>
+						{{end}}
+					</span>
+				</div>
+				{{if or .Content .Attachments}}
+				<div class="timeline-item comment">
+					<div class="content comment-container">
+						<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between">
+							<div class="comment-header-left tw-flex tw-items-center">
+								{{if gt .Poster.ID 0}}
+									<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
+										{{ctx.AvatarUtils.Avatar .Poster 24}}
+									</a>
+								{{end}}
+								<span class="text grey muted-links">
+									{{if .OriginalAuthor}}
+										<span class="text black tw-font-semibold">
+											{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
+											{{.OriginalAuthor}}
+										</span>
+										<span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
+										<span class="text migrate">({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}}</span>
+									{{else}}
+										{{template "shared/user/authorlink" .Poster}}
+									{{end}}
+
+									{{ctx.Locale.Tr "repo.issues.review.left_comment"}}
+								</span>
+							</div>
+							<div class="comment-header-right actions tw-flex tw-items-center">
+								{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
+								{{if not $.Repository.IsArchived}}
+									{{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
+									{{template "repo/issue/view_content/context_menu" dict "item" . "delete" false "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
+								{{end}}
+							</div>
+						</div>
+						<div class="ui attached segment comment-body">
+							<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
+								{{if .RenderedContent}}
+									{{.RenderedContent}}
+								{{else}}
+									<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
+								{{end}}
+							</div>
+							<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
+							<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-content-version="{{.ContentVersion}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
+							{{if .Attachments}}
+								{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
+							{{end}}
+						</div>
+						{{$reactions := .Reactions.GroupByType}}
+						{{if $reactions}}
+							{{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
+						{{end}}
+					</div>
+				</div>
+				{{end}}
+
+				{{if and .Review .Review.CodeComments}}
+				<div class="timeline-item event">
+					{{range $filename, $lines := .Review.CodeComments}}
+						{{range $line, $comms := $lines}}
+							{{template "repo/issue/view_content/conversation" dict "." $ "comments" $comms}}
+						{{end}}
+					{{end}}
+				</div>
+				{{end}}
+			</div>
+		{{else if eq .Type 23}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-lock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				{{if .Content}}
+					<span class="text grey muted-links">
+						{{template "shared/user/authorlink" .Poster}}
+						{{ctx.Locale.Tr "repo.issues.lock_with_reason" .Content $createdStr}}
+					</span>
+				{{else}}
+					<span class="text grey muted-links">
+						{{template "shared/user/authorlink" .Poster}}
+						{{ctx.Locale.Tr "repo.issues.lock_no_reason" $createdStr}}
+					</span>
+				{{end}}
+			</div>
+		{{else if eq .Type 24}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-key"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{ctx.Locale.Tr "repo.issues.unlock_comment" $createdStr}}
+				</span>
+			</div>
+		{{else if eq .Type 25}}
+			<div class="timeline-item event">
+				<span class="badge">{{svg "octicon-git-branch"}}</span>
+				{{if not .OriginalAuthor}}
+					{{template "shared/user/avatarlink" dict "user" .Poster}}
+				{{end}}
+				<span class="text grey muted-links">
+					{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
+					{{ctx.Locale.Tr "repo.pulls.change_target_branch_at" .OldRef .NewRef $createdStr}}
+				</span>
+			</div>
+		{{else if eq .Type 26}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-clock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+
+					{{ctx.Locale.Tr "repo.issues.del_time_history" $createdStr}}
+				</span>
+				<div class="detail flex-text-block">
+					{{svg "octicon-clock"}}
+					{{if .RenderedContent}}
+						{{/* compatibility with time comments made before v1.21 */}}
+						<span class="text grey muted-links">{{.RenderedContent}}</span>
+					{{else}}
+						<span class="text grey muted-links">- {{.Content|Sec2Time}}</span>
+					{{end}}
+				</div>
+			</div>
+		{{else if eq .Type 27}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-eye"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{if (gt .AssigneeID 0)}}
+						{{if .RemovedAssignee}}
+							{{if eq .PosterID .AssigneeID}}
+								{{ctx.Locale.Tr "repo.issues.review.remove_review_request_self" $createdStr}}
+							{{else}}
+								{{ctx.Locale.Tr "repo.issues.review.remove_review_request" .Assignee.GetDisplayName $createdStr}}
+							{{end}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.review.add_review_request" .Assignee.GetDisplayName $createdStr}}
+						{{end}}
+					{{else}}
+						<!-- If the assigned team is deleted, just displaying "Ghost Team" in the comment -->
+						{{$teamName := "Ghost Team"}}
+						{{if .AssigneeTeam}}
+							{{$teamName = .AssigneeTeam.Name}}
+						{{end}}
+						{{if .RemovedAssignee}}
+							{{ctx.Locale.Tr "repo.issues.review.remove_review_request" $teamName $createdStr}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.review.add_review_request" $teamName $createdStr}}
+						{{end}}
+					{{end}}
+				</span>
+			</div>
+		{{else if and (eq .Type 29) (or (gt .CommitsNum 0) .IsForcePush)}}
+			<!-- If PR is closed, the comments whose type is CommentTypePullRequestPush(29) after latestCloseCommentID won't be rendered. //-->
+			{{if and .Issue.IsClosed (gt .ID $.LatestCloseCommentID)}}
+				{{continue}}
+			{{end}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-repo-push"}}</span>
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{if .IsForcePush}}
+						{{ctx.Locale.Tr "repo.issues.force_push_codes" $.Issue.PullRequest.HeadBranch (ShortSha .OldCommit) ($.Issue.Repo.CommitLink .OldCommit) (ShortSha .NewCommit) ($.Issue.Repo.CommitLink .NewCommit) $createdStr}}
+					{{else}}
+						{{ctx.Locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr}}
+					{{end}}
+				</span>
+				{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
+				<span class="tw-float-right comparebox">
+					<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
+				</span>
+				{{end}}
+			</div>
+			{{if not .IsForcePush}}
+				{{template "repo/commits_list_small" dict "comment" . "root" $}}
+			{{end}}
+		{{else if eq .Type 30}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-project"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{$oldProjectDisplayHtml := "Unknown Project"}}
+					{{if .OldProject}}
+						{{$tooltip := ctx.Locale.Tr "projects.deleted.display_name"}}
+						{{if not .OldProject.IsGhost}}
+							{{$tooltip = ctx.Locale.Tr (printf "projects.type-%d.display_name" .OldProject.Type)}}
+						{{end}}
+						{{$oldProjectDisplayHtml = HTMLFormat `<span data-tooltip-content="%s">%s</span>` $tooltip .OldProject.Title}}
+					{{end}}
+					{{$newProjectDisplayHtml := "Unknown Project"}}
+					{{if .Project}}
+						{{$tooltip := ctx.Locale.Tr "projects.deleted.display_name"}}
+						{{if not .Project.IsGhost}}
+							{{$tooltip = ctx.Locale.Tr (printf "projects.type-%d.display_name" .Project.Type)}}
+						{{end}}
+						{{$newProjectDisplayHtml = HTMLFormat `<span data-tooltip-content="%s">%s</span>` $tooltip .Project.Title}}
+					{{end}}
+					{{if and (gt .OldProjectID 0) (gt .ProjectID 0)}}
+						{{ctx.Locale.Tr "repo.issues.change_project_at" $oldProjectDisplayHtml $newProjectDisplayHtml $createdStr}}
+					{{else if gt .OldProjectID 0}}
+						{{ctx.Locale.Tr "repo.issues.remove_project_at" $oldProjectDisplayHtml $createdStr}}
+					{{else if gt .ProjectID 0}}
+						{{ctx.Locale.Tr "repo.issues.add_project_at" $newProjectDisplayHtml $createdStr}}
+					{{end}}
+				</span>
+			</div>
+		{{else if eq .Type 31}}
+			{{if not $.UnitProjectsGlobalDisabled}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-project"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{$newProjectDisplay := .CommentMetaData.ProjectTitle}}
+					{{if .Project}}
+						{{$trKey := printf "projects.type-%d.display_name" .Project.Type}}
+						{{$newProjectDisplay = HTMLFormat `%s <a href="%s"><span data-tooltip-content="%s">%s</span></a>` (svg .Project.IconName) (.Project.Link ctx) (ctx.Locale.Tr $trKey) .Project.Title}}
+					{{end}}
+					{{ctx.Locale.Tr "repo.issues.move_to_column_of_project" .CommentMetaData.ProjectColumnTitle $newProjectDisplay $createdStr}}
+				</span>
+			</div>
+			{{end}}
+		{{else if eq .Type 32}}
+			<div class="timeline-item-group">
+				<div class="timeline-item event" id="{{.HashTag}}">
+					<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
+						<img src="{{.Poster.AvatarLink ctx}}" width="40" height="40">
+					</a>
+					<span class="badge grey">{{svg "octicon-x" 16}}</span>
+					<span class="text grey muted-links">
+						{{template "shared/user/authorlink" .Poster}}
+						{{$reviewerName := ""}}
+						{{if .Review}}
+							{{if eq .Review.OriginalAuthor ""}}
+								{{$reviewerName = .Review.Reviewer.Name}}
+							{{else}}
+								{{$reviewerName = .Review.OriginalAuthor}}
+							{{end}}
+						{{end}}
+						{{ctx.Locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr}}
+					</span>
+				</div>
+				{{if .Content}}
+					<div class="timeline-item comment">
+						<div class="content">
+							<div class="ui top attached header comment-header-left tw-flex tw-items-center arrow-top">
+								{{if gt .Poster.ID 0}}
+									<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
+										{{ctx.AvatarUtils.Avatar .Poster 24}}
+									</a>
+								{{end}}
+								<span class="text grey muted-links">
+									{{ctx.Locale.Tr "action.review_dismissed_reason"}}
+								</span>
+							</div>
+							<div class="ui attached segment">
+								<div class="render-content markup">
+									{{if .RenderedContent}}
+										{{.RenderedContent}}
+									{{else}}
+										<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
+									{{end}}
+								</div>
+							</div>
+						</div>
+					</div>
+				{{end}}
+			</div>
+		{{else if eq .Type 33}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-git-branch"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{if and .OldRef .NewRef}}
+						{{ctx.Locale.Tr "repo.issues.change_ref_at" .OldRef .NewRef $createdStr}}
+					{{else if .OldRef}}
+						{{ctx.Locale.Tr "repo.issues.remove_ref_at" .OldRef $createdStr}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.issues.add_ref_at" .NewRef $createdStr}}
+					{{end}}
+				</span>
+			</div>
+		{{else if or (eq .Type 34) (eq .Type 35)}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-git-merge" 16}}</span>
+				<span class="text grey muted-links">
+					{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
+					{{if eq .Type 34}}{{ctx.Locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr}}
+					{{else}}{{ctx.Locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr}}{{end}}
+				</span>
+			</div>
+		{{else if or (eq .Type 36) (eq .Type 37)}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-pin" 16}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{if eq .Type 36}}{{ctx.Locale.Tr "repo.issues.pin_comment" $createdStr}}
+					{{else}}{{ctx.Locale.Tr "repo.issues.unpin_comment" $createdStr}}{{end}}
+				</span>
+			</div>
+		{{else if eq .Type 38}}
+			<div class="timeline-item event" id="{{.HashTag}}">
+				<span class="badge">{{svg "octicon-clock"}}</span>
+				{{template "shared/user/avatarlink" dict "user" .Poster}}
+				<span class="text grey muted-links">
+					{{template "shared/user/authorlink" .Poster}}
+					{{$timeStr := .Content|TimeEstimateString}}
+					{{if $timeStr}}
+						{{ctx.Locale.Tr "repo.issues.change_time_estimate_at" $timeStr $createdStr}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.issues.remove_time_estimate_at" $createdStr}}
+					{{end}}
+				</span>
+			</div>
+		{{end}}
+	{{end}}
+{{end}}
diff --git a/repo/issue/view_content/comments_authorlink.tmpl b/repo/issue/view_content/comments_authorlink.tmpl
new file mode 100644
index 0000000..f652a0b
--- /dev/null
+++ b/repo/issue/view_content/comments_authorlink.tmpl
@@ -0,0 +1,11 @@
+{{if .comment.OriginalAuthor}}
+	<span class="text black">
+		{{svg (MigrationIcon .ctxData.Repository.GetOriginalURLHostname)}}
+		{{.comment.OriginalAuthor}}
+	</span>
+	{{if .ctxData.Repository.OriginalURL}}
+		<span class="migrate">({{ctx.Locale.Tr "repo.migrated_from" .ctxData.Repository.OriginalURL .ctxData.Repository.GetOriginalURLHostname}})</span>
+	{{end}}
+{{else}}
+	{{template "shared/user/authorlink" .comment.Poster}}
+{{end}}
diff --git a/repo/issue/view_content/comments_delete_time.tmpl b/repo/issue/view_content/comments_delete_time.tmpl
new file mode 100644
index 0000000..5534a30
--- /dev/null
+++ b/repo/issue/view_content/comments_delete_time.tmpl
@@ -0,0 +1,14 @@
+{{if and .comment.Time (.ctxData.Repository.IsTimetrackerEnabled ctx)}} {{/* compatibility with time comments made before v1.14 */}}
+	{{if (not .comment.Time.Deleted)}}
+		{{if (or .ctxData.IsAdmin (and .ctxData.IsSigned (eq .ctxData.SignedUserID .comment.PosterID)))}}
+			<span class="tw-float-right">
+				<button class="ui icon button compact mini link-action" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.del_time"}}"
+								data-url="{{.ctxData.RepoLink}}/issues/{{.ctxData.Issue.Index}}/times/{{.comment.TimeID}}/delete?id={{.comment.Time.ID}}"
+								data-modal-confirm="{{ctx.Locale.Tr "repo.issues.del_time"}}"
+				>
+					{{svg "octicon-trash"}}
+				</button>
+			</span>
+		{{end}}
+	{{end}}
+{{end}}
diff --git a/repo/issue/view_content/context_menu.tmpl b/repo/issue/view_content/context_menu.tmpl
new file mode 100644
index 0000000..749a2fa
--- /dev/null
+++ b/repo/issue/view_content/context_menu.tmpl
@@ -0,0 +1,44 @@
+<div class="item action ui dropdown jump pointing top right context-dropdown">
+	<a class="context-menu muted">
+		{{svg "octicon-kebab-horizontal"}}
+	</a>
+	<div class="menu">
+		{{$referenceUrl := ""}}
+		{{if .issue}}
+			{{$referenceUrl = printf "%s#%s" ctx.RootData.Issue.Link .item.HashTag}}
+		{{else}}
+			{{$referenceUrl = printf "%s/files#%s" ctx.RootData.Issue.Link .item.HashTag}}
+		{{end}}
+		<div class="item context js-aria-clickable" data-clipboard-text-type="url" data-clipboard-text="{{$referenceUrl}}">{{ctx.Locale.Tr "repo.issues.context.copy_link"}}</div>
+		{{if ctx.RootData.IsSigned}}
+			{{$needDivider := false}}
+			{{if not ctx.RootData.Repository.IsArchived}}
+				{{$needDivider = true}}
+				<div class="item context js-aria-clickable quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.HashTag}}-raw">{{ctx.Locale.Tr "repo.issues.context.quote_reply"}}</div>
+				{{if not ctx.Consts.RepoUnitTypeIssues.UnitGlobalDisabled}}
+					<div class="item context js-aria-clickable reference-issue" data-target="{{.item.HashTag}}-raw" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-poster-username="{{.item.Poster.Name}}" data-reference="{{$referenceUrl}}">{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}</div>
+				{{end}}
+				{{if or ctx.RootData.Permission.IsAdmin .IsCommentPoster ctx.RootData.HasIssuesOrPullsWritePermission}}
+					<div class="divider"></div>
+					<div class="item context js-aria-clickable edit-content">{{ctx.Locale.Tr "repo.issues.context.edit"}}</div>
+					{{if .delete}}
+						<div class="item context js-aria-clickable delete-comment" data-comment-id={{.item.HashTag}} data-url="{{ctx.RootData.RepoLink}}/comments/{{.item.ID}}/delete" data-locale="{{ctx.Locale.Tr "repo.issues.delete_comment_confirm"}}">{{ctx.Locale.Tr "repo.issues.context.delete"}}</div>
+					{{end}}
+				{{end}}
+			{{end}}
+			{{$canUserBlock := call ctx.RootData.CanBlockUser ctx.RootData.SignedUser .item.Poster}}
+			{{$canOrgBlock := and ctx.RootData.Repository.Owner.IsOrganization (call ctx.RootData.CanBlockUser ctx.RootData.Repository.Owner .item.Poster)}}
+			{{if or $canOrgBlock $canUserBlock}}
+				{{if $needDivider}}
+					<div class="divider"></div>
+				{{end}}
+				{{if $canUserBlock}}
+				<div class="item context js-aria-clickable show-modal" data-modal="#block-user-modal" data-modal-modal-blockee="{{.item.Poster.Name}}" data-modal-modal-blockee-name="{{.item.Poster.GetDisplayName}}" data-modal-modal-form.action="{{AppSubUrl}}/user/settings/blocked_users">{{ctx.Locale.Tr "user.block.block.user"}}</div>
+				{{end}}
+				{{if $canOrgBlock}}
+				<div class="item context js-aria-clickable show-modal" data-modal="#block-user-modal" data-modal-modal-blockee="{{.item.Poster.Name}}" data-modal-modal-blockee-name="{{.item.Poster.GetDisplayName}}" data-modal-modal-form.action="{{ctx.RootData.Repository.Owner.OrganisationLink}}/settings/blocked_users">{{ctx.Locale.Tr "user.block.block.org"}}</div>
+				{{end}}
+			{{end}}
+		{{end}}
+	</div>
+</div>
diff --git a/repo/issue/view_content/conversation.tmpl b/repo/issue/view_content/conversation.tmpl
new file mode 100644
index 0000000..1480329
--- /dev/null
+++ b/repo/issue/view_content/conversation.tmpl
@@ -0,0 +1,143 @@
+{{if len .comments}}
+	{{$comment := index .comments 0}}
+	{{$invalid := $comment.Invalidated}}
+	{{$resolved := $comment.IsResolved}}
+	{{$resolveDoer := $comment.ResolveDoer}}
+	{{$hasReview := and $comment.Review}}
+	{{$isReviewPending := and $hasReview (eq $comment.Review.Type 0)}}
+	<div class="ui segments conversation-holder">
+		<div class="ui segment collapsible-comment-box tw-py-2 tw-flex tw-items-center tw-justify-between">
+			<div class="tw-flex tw-items-center">
+				<a href="{{$comment.CodeCommentLink ctx}}" class="file-comment tw-ml-2 tw-break-anywhere">{{$comment.TreePath}}</a>
+				{{if $invalid}}
+					<span class="ui label basic small tw-ml-2" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
+						{{ctx.Locale.Tr "repo.issues.review.outdated"}}
+					</span>
+				{{end}}
+			</div>
+			<div>
+				{{if or $invalid $resolved}}
+					<button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if not $resolved}}tw-hidden {{end}}ui compact labeled button show-outdated tw-flex tw-items-center">
+						{{svg "octicon-unfold" 16 "tw-mr-2"}}
+						{{if $resolved}}
+							{{ctx.Locale.Tr "repo.issues.review.show_resolved"}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.review.show_outdated"}}
+						{{end}}
+					</button>
+					<button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if $resolved}}tw-hidden {{end}}ui compact labeled button hide-outdated tw-flex tw-items-center">
+						{{svg "octicon-fold" 16 "tw-mr-2"}}
+						{{if $resolved}}
+							{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.issues.review.hide_outdated"}}
+						{{end}}
+					</button>
+				{{end}}
+			</div>
+		</div>
+		{{$diff := (CommentMustAsDiff ctx $comment)}}
+		{{if $diff}}
+			{{$file := (index $diff.Files 0)}}
+			<div id="code-preview-{{$comment.ID}}" class="ui table segment{{if $resolved}} tw-hidden{{end}}">
+				<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}">
+					<div class="file-body file-code code-view code-diff code-diff-unified unicode-escaped">
+						<table>
+							<tbody>
+								{{template "repo/diff/section_unified" dict "file" $file "root" $}}
+							</tbody>
+						</table>
+					</div>
+				</div>
+			</div>
+		{{end}}
+		<div id="code-comments-{{$comment.ID}}" class="comment-code-cloud ui segment{{if $resolved}} tw-hidden{{end}}">
+			<div class="ui comments tw-mb-0">
+				{{range .comments}}
+					{{$createdSubStr:= DateUtils.TimeSince .CreatedUnix}}
+					<div class="comment code-comment" id="{{.HashTag}}">
+						<div class="content comment-container">
+							<div class="header comment-header">
+								<div class="comment-header-left tw-flex tw-items-center">
+									{{if not .OriginalAuthor}}
+										<a class="avatar">
+											{{ctx.AvatarUtils.Avatar .Poster 20}}
+										</a>
+									{{end}}
+									<span class="text grey muted-links">
+										{{if .OriginalAuthor}}
+											<span class="text black">
+												{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
+												{{.OriginalAuthor}}
+											</span>
+											{{if $.Repository.OriginalURL}}
+											<span class="migrate">({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}})</span>
+											{{end}}
+										{{else}}
+											{{template "shared/user/authorlink" .Poster}}
+										{{end}}
+										{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdSubStr}}
+									</span>
+								</div>
+								<div class="comment-header-right actions tw-flex tw-items-center">
+									{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
+									{{if not $.Repository.IsArchived}}
+										{{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
+										{{template "repo/issue/view_content/context_menu" dict "item" . "delete" true "issue" true "diff" true "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
+									{{end}}
+								</div>
+							</div>
+							<div class="text comment-content">
+								<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
+								{{if .RenderedContent}}
+									{{.RenderedContent}}
+								{{else}}
+									<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
+								{{end}}
+								</div>
+								<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
+								<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-content-version="{{.ContentVersion}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
+								{{if .Attachments}}
+									{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
+								{{end}}
+							</div>
+							{{$reactions := .Reactions.GroupByType}}
+							{{if $reactions}}
+								{{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
+							{{end}}
+						</div>
+					</div>
+				{{end}}
+			</div>
+			<div class="code-comment-buttons tw-flex tw-items-center tw-flex-wrap tw-mt-2 tw-mb-1 tw-mx-2">
+				<div class="tw-flex-1">
+					{{if $resolved}}
+						<div class="ui grey text">
+							{{svg "octicon-check" 16 "tw-mr-1"}}
+							<b>{{$resolveDoer.Name}}</b> {{ctx.Locale.Tr "repo.issues.review.resolved_by"}}
+						</div>
+					{{end}}
+				</div>
+				<div class="code-comment-buttons-buttons">
+					{{if and $.CanMarkConversation $hasReview (not $isReviewPending)}}
+						<button class="ui tiny basic button resolve-conversation" data-origin="timeline" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{$comment.ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation">
+							{{if $resolved}}
+								{{ctx.Locale.Tr "repo.issues.review.un_resolve_conversation"}}
+							{{else}}
+								{{ctx.Locale.Tr "repo.issues.review.resolve_conversation"}}
+							{{end}}
+						</button>
+					{{end}}
+					{{if and $.SignedUserID (not $.Repository.IsArchived)}}
+						<button class="comment-form-reply ui primary tiny labeled icon button tw-ml-1 tw-mr-0">
+							{{svg "octicon-reply" 16 "reply icon tw-mr-1"}}{{ctx.Locale.Tr "repo.diff.comment.reply"}}
+						</button>
+					{{end}}
+				</div>
+			</div>
+			{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" $comment.ReviewID "root" $ "comment" $comment}}
+		</div>
+	</div>
+{{else}}
+	{{template "repo/diff/conversation_outdated"}}
+{{end}}
diff --git a/repo/issue/view_content/pull.tmpl b/repo/issue/view_content/pull.tmpl
new file mode 100644
index 0000000..d117bfb
--- /dev/null
+++ b/repo/issue/view_content/pull.tmpl
@@ -0,0 +1,398 @@
+{{if and .Issue.PullRequest.HasMerged (not .IsPullBranchDeletable)}}
+{{/* Then the merge box will not be displayed because this page already contains enough information */}}
+{{else}}
+<div class="timeline-item comment merge box">
+	<div class="timeline-avatar text {{if .Issue.PullRequest.HasMerged}}purple
+	{{- else if .Issue.IsClosed}}grey
+	{{- else if .IsPullWorkInProgress}}grey
+	{{- else if .IsFilesConflicted}}grey
+	{{- else if .IsPullRequestBroken}}red
+	{{- else if .IsBlockedByApprovals}}red
+	{{- else if .IsBlockedByRejection}}red
+	{{- else if .IsBlockedByOfficialReviewRequests}}red
+	{{- else if .IsBlockedByOutdatedBranch}}red
+	{{- else if .IsBlockedByChangedProtectedFiles}}red
+	{{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
+	{{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow
+	{{- else if and .AllowMerge .RequireSigned (not .WillSign)}}red
+	{{- else if .Issue.PullRequest.IsChecking}}yellow
+	{{- else if .Issue.PullRequest.IsEmpty}}grey
+	{{- else if .Issue.PullRequest.CanAutoMerge}}green
+	{{- else}}red{{end}}">{{svg "octicon-git-merge" 40}}</div>
+	<div class="content">
+		{{if .LatestCommitStatus}}
+		<div class="ui attached segment fitted">
+		{{template "repo/pulls/status" (dict
+			"CommitStatus" .LatestCommitStatus
+			"CommitStatuses" .LatestCommitStatuses
+			"MissingRequiredChecks" .MissingRequiredChecks
+			"ShowHideChecks" true
+			"is_context_required" .is_context_required
+		)}}
+		</div>
+		{{end}}
+		{{$showGeneralMergeForm := false}}
+		<div class="ui attached segment merge-section {{if not $.LatestCommitStatus}}no-header{{end}} flex-items-block">
+			{{if .Issue.PullRequest.HasMerged}}
+				{{if .IsPullBranchDeletable}}
+					<div class="item item-section text tw-flex-1">
+						<div class="item-section-left">
+							<h3 class="tw-mb-2">
+								{{ctx.Locale.Tr "repo.pulls.merged_success"}}
+							</h3>
+							<div class="merge-section-info">
+								{{ctx.Locale.Tr "repo.pulls.merged_info_text" (HTMLFormat "<code>%s</code>" .HeadTarget)}}
+							</div>
+						</div>
+						<div class="item-section-right">
+							<button class="delete-button ui button" data-url="{{.DeleteBranchLink}}">{{ctx.Locale.Tr "repo.branch.delete_html"}}</button>
+						</div>
+					</div>
+				{{end}}
+			{{else if .Issue.IsClosed}}
+				<div class="item item-section text tw-flex-1">
+					<div class="item-section-left">
+						<h3 class="tw-mb-2">{{ctx.Locale.Tr "repo.pulls.closed"}}</h3>
+						<div class="merge-section-info">
+							{{if .IsPullRequestBroken}}
+								{{ctx.Locale.Tr "repo.pulls.cant_reopen_deleted_branch"}}
+							{{else}}
+								{{ctx.Locale.Tr "repo.pulls.reopen_to_merge"}}
+							{{end}}
+						</div>
+					</div>
+					{{if and .IsPullBranchDeletable (not .IsPullRequestBroken)}}
+						<div class="item-section-right">
+							<button class="delete-button ui button" data-url="{{.DeleteBranchLink}}">{{ctx.Locale.Tr "repo.branch.delete_html"}}</button>
+						</div>
+					{{end}}
+				</div>
+			{{else if .IsPullFilesConflicted}}
+				<div class="item">
+					{{svg "octicon-x"}}
+					{{ctx.Locale.Tr "repo.pulls.files_conflicted"}}
+				</div>
+				<ul>
+					{{range .ConflictedFiles}}
+					<li>{{.}}</li>
+					{{end}}
+				</ul>
+			{{else if .IsPullRequestBroken}}
+				<div class="item">
+					{{svg "octicon-x"}}
+					{{ctx.Locale.Tr "repo.pulls.data_broken"}}
+				</div>
+			{{else if .IsPullWorkInProgress}}
+				<div class="item toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{.WorkInProgressPrefix}}" data-update-url="{{.Issue.Link}}/title">
+					<div class="item-section-left flex-text-inline tw-flex-1">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.cannot_merge_work_in_progress"}}
+					</div>
+					{{if or .HasIssuesOrPullsWritePermission .IsIssuePoster}}
+						<button class="ui compact button">
+							{{ctx.Locale.Tr "repo.pulls.remove_prefix" .WorkInProgressPrefix}}
+						</button>
+					{{end}}
+				</div>
+				{{template "repo/issue/view_content/update_branch_by_merge" $}}
+			{{else if .Issue.PullRequest.IsChecking}}
+				<div class="item">
+					{{svg "octicon-sync"}}
+					{{ctx.Locale.Tr "repo.pulls.is_checking"}}
+				</div>
+			{{else if .Issue.PullRequest.IsAncestor}}
+				<div class="item">
+					{{svg "octicon-alert"}}
+					{{ctx.Locale.Tr "repo.pulls.is_ancestor"}}
+				</div>
+			{{else if or .Issue.PullRequest.CanAutoMerge .Issue.PullRequest.IsEmpty}}
+				{{if .IsBlockedByApprovals}}
+					<div class="item">
+						{{svg "octicon-x"}}
+						{{if .RequireApprovalsWhitelist}}
+							{{ctx.Locale.Tr "repo.pulls.blocked_by_approvals_whitelisted" .GrantedApprovals .ProtectedBranch.RequiredApprovals}}
+						{{else}}
+							{{ctx.Locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}}
+						{{end}}
+					</div>
+				{{else if .IsBlockedByRejection}}
+					<div class="item">
+						{{svg "octicon-x"}}
+					{{ctx.Locale.Tr "repo.pulls.blocked_by_rejection"}}
+					</div>
+				{{else if .IsBlockedByOfficialReviewRequests}}
+					<div class="item">
+						{{svg "octicon-x"}}
+					{{ctx.Locale.Tr "repo.pulls.blocked_by_official_review_requests"}}
+					</div>
+				{{else if .IsBlockedByOutdatedBranch}}
+					<div class="item">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.blocked_by_outdated_branch"}}
+					</div>
+				{{else if .IsBlockedByChangedProtectedFiles}}
+					<div class="item">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n"}}
+					</div>
+					<ul>
+						{{range .ChangedProtectedFiles}}
+						<li>{{.}}</li>
+						{{end}}
+					</ul>
+				{{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}}
+					<div class="item">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.required_status_check_failed"}}
+					</div>
+				{{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
+					<div class="item">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.required_status_check_missing"}}
+					</div>
+				{{else if and .AllowMerge .RequireSigned (not .WillSign)}}
+					<div class="item">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.require_signed_wont_sign"}}
+					</div>
+					<div class="item">
+						{{svg "octicon-unlock"}}
+						{{ctx.Locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
+					</div>
+				{{end}}
+
+				{{$notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOfficialReviewRequests .IsBlockedByOutdatedBranch .IsBlockedByChangedProtectedFiles (and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess))}}
+
+				{{/* admin can merge without checks, writer can merge when checks succeed */}}
+				{{$canMergeNow := and (or (and (not $.ProtectedBranch.BlockAdminMergeOverride) $.IsRepoAdmin) (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}}
+				{{/* admin and writer both can make an auto merge schedule */}}
+
+				{{if $canMergeNow}}
+					{{if $notAllOverridableChecksOk}}
+						<div class="item">
+							{{svg "octicon-dot-fill"}}
+							{{ctx.Locale.Tr "repo.pulls.required_status_check_administrator"}}
+						</div>
+					{{else}}
+						<div class="item">
+							{{svg "octicon-check"}}
+							{{ctx.Locale.Tr "repo.pulls.can_auto_merge_desc"}}
+						</div>
+					{{end}}
+					{{if .WillSign}}
+						<div class="item">
+							{{svg "octicon-lock" 16 "text green"}}
+							{{ctx.Locale.Tr "repo.signing.will_sign" .SigningKey}}
+						</div>
+					{{else if .IsSigned}}
+						<div class="item">
+							{{svg "octicon-unlock"}}
+							{{ctx.Locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
+						</div>
+					{{end}}
+				{{end}}
+				{{template "repo/issue/view_content/update_branch_by_merge" $}}
+				{{if .Issue.PullRequest.IsEmpty}}
+					<div class="divider"></div>
+
+					<div class="item">
+						{{svg "octicon-alert"}}
+						{{ctx.Locale.Tr "repo.pulls.is_empty"}}
+					</div>
+				{{end}}
+
+				{{if .AllowMerge}} {{/* user is allowed to merge */}}
+					{{$prUnit := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypePullRequests}}
+					{{if or $prUnit.PullRequestsConfig.AllowMerge $prUnit.PullRequestsConfig.AllowRebase $prUnit.PullRequestsConfig.AllowRebaseMerge $prUnit.PullRequestsConfig.AllowSquash $prUnit.PullRequestsConfig.AllowFastForwardOnly}}
+						{{$hasPendingPullRequestMergeTip := ""}}
+						{{if .HasPendingPullRequestMerge}}
+							{{$createdPRMergeStr := DateUtils.TimeSince .PendingPullRequestMerge.CreatedUnix}}
+							{{$hasPendingPullRequestMergeTip = ctx.Locale.Tr "repo.pulls.auto_merge_has_pending_schedule" .PendingPullRequestMerge.Doer.Name $createdPRMergeStr}}
+						{{end}}
+						<div class="divider"></div>
+						<script type="module">
+							const defaultMergeTitle = {{.DefaultMergeMessage}};
+							const defaultSquashMergeTitle = {{.DefaultSquashMergeMessage}};
+							const defaultMergeMessage = {{.DefaultMergeBody}};
+							const defaultSquashMergeMessage = {{.DefaultSquashMergeBody}};
+							const mergeForm = {
+								'baseLink': {{.Link}},
+								'textCancel': {{ctx.Locale.Tr "cancel"}},
+								'textDeleteBranch': {{ctx.Locale.Tr "repo.branch.delete" .HeadTarget}},
+								'textAutoMergeButtonWhenSucceed': {{ctx.Locale.Tr "repo.pulls.auto_merge_button_when_succeed"}},
+								'textAutoMergeWhenSucceed': {{ctx.Locale.Tr "repo.pulls.auto_merge_when_succeed"}},
+								'textAutoMergeCancelSchedule': {{ctx.Locale.Tr "repo.pulls.auto_merge_cancel_schedule"}},
+								'textClearMergeMessage': {{ctx.Locale.Tr "repo.pulls.clear_merge_message"}},
+								'textClearMergeMessageHint': {{ctx.Locale.Tr "repo.pulls.clear_merge_message_hint"}},
+								'textMergeCommitId': {{ctx.Locale.Tr "repo.pulls.merge_commit_id"}},
+
+								'canMergeNow': {{$canMergeNow}},
+								'allOverridableChecksOk': {{not $notAllOverridableChecksOk}},
+								'emptyCommit': {{.Issue.PullRequest.IsEmpty}},
+								'pullHeadCommitID': {{.PullHeadCommitID}},
+								'isPullBranchDeletable': {{.IsPullBranchDeletable}},
+								'defaultMergeStyle': {{.MergeStyle}},
+								'defaultDeleteBranchAfterMerge': {{$prUnit.PullRequestsConfig.DefaultDeleteBranchAfterMerge}},
+								'mergeMessageFieldPlaceHolder': {{ctx.Locale.Tr "repo.editor.commit_message_desc"}},
+								'defaultMergeMessage': defaultMergeMessage,
+
+								'hasPendingPullRequestMerge': {{.HasPendingPullRequestMerge}},
+								'hasPendingPullRequestMergeTip': {{$hasPendingPullRequestMergeTip}},
+							};
+
+							const generalHideAutoMerge = mergeForm.canMergeNow && mergeForm.allOverridableChecksOk; // if this pr can be merged now, then hide the auto merge
+							mergeForm['mergeStyles'] = [
+								{
+									'name': 'merge',
+									'allowed': {{$prUnit.PullRequestsConfig.AllowMerge}},
+									'textDoMerge': {{ctx.Locale.Tr "repo.pulls.merge_pull_request"}},
+									'mergeTitleFieldText': defaultMergeTitle,
+									'mergeMessageFieldText': defaultMergeMessage,
+									'hideAutoMerge': generalHideAutoMerge,
+								},
+								{
+									'name': 'rebase',
+									'allowed': {{$prUnit.PullRequestsConfig.AllowRebase}},
+									'textDoMerge': {{ctx.Locale.Tr "repo.pulls.rebase_merge_pull_request"}},
+									'hideMergeMessageTexts': true,
+									'hideAutoMerge': generalHideAutoMerge,
+								},
+								{
+									'name': 'rebase-merge',
+									'allowed': {{$prUnit.PullRequestsConfig.AllowRebaseMerge}},
+									'textDoMerge': {{ctx.Locale.Tr "repo.pulls.rebase_merge_commit_pull_request"}},
+									'mergeTitleFieldText': defaultMergeTitle,
+									'mergeMessageFieldText': defaultMergeMessage,
+									'hideAutoMerge': generalHideAutoMerge,
+								},
+								{
+									'name': 'squash',
+									'allowed': {{$prUnit.PullRequestsConfig.AllowSquash}},
+									'textDoMerge': {{ctx.Locale.Tr "repo.pulls.squash_merge_pull_request"}},
+									'mergeTitleFieldText': defaultSquashMergeTitle,
+									'mergeMessageFieldText': {{.GetCommitMessages}} + defaultSquashMergeMessage,
+									'hideAutoMerge': generalHideAutoMerge,
+								},
+								{
+									'name': 'fast-forward-only',
+									'allowed': {{and $prUnit.PullRequestsConfig.AllowFastForwardOnly (eq .Issue.PullRequest.CommitsBehind 0)}},
+									'textDoMerge': {{ctx.Locale.Tr "repo.pulls.fast_forward_only_merge_pull_request"}},
+									'hideMergeMessageTexts': true,
+									'hideAutoMerge': generalHideAutoMerge,
+								},
+								{
+									'name': 'manually-merged',
+									'allowed': {{$prUnit.PullRequestsConfig.AllowManualMerge}},
+									'textDoMerge': {{ctx.Locale.Tr "repo.pulls.merge_manually"}},
+									'hideMergeMessageTexts': true,
+									'hideAutoMerge': true,
+								}
+							];
+							window.config.pageData.pullRequestMergeForm = mergeForm;
+						</script>
+
+						{{$showGeneralMergeForm = true}}
+						<div id="pull-request-merge-form"></div>
+					{{else}}
+						{{/* no merge style was set in repo setting: not or ($prUnit.PullRequestsConfig.AllowMerge ...) */}}
+						<div class="divider"></div>
+						<div class="item text red">
+							{{svg "octicon-x"}}
+							{{ctx.Locale.Tr "repo.pulls.no_merge_desc"}}
+						</div>
+						<div class="item">
+							{{svg "octicon-info"}}
+							{{ctx.Locale.Tr "repo.pulls.no_merge_helper"}}
+						</div>
+					{{end}} {{/* end if the repo was set to use any merge style */}}
+				{{else}}
+					{{/* user is not allowed to merge */}}
+					<div class="divider"></div>
+					<div class="item">
+						{{svg "octicon-info"}}
+						{{ctx.Locale.Tr "repo.pulls.no_merge_access"}}
+					</div>
+				{{end}} {{/* end if user is allowed to merge or not */}}
+			{{else}}
+				{{/* Merge conflict without specific file. Suggest manual merge, only if all reviews and status checks OK. */}}
+				{{if .IsBlockedByApprovals}}
+					<div class="item text red">
+						{{svg "octicon-x"}}
+					{{ctx.Locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}}
+					</div>
+				{{else if .IsBlockedByRejection}}
+					<div class="item text red">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.blocked_by_rejection"}}
+					</div>
+				{{else if .IsBlockedByOfficialReviewRequests}}
+					<div class="item text red">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.blocked_by_official_review_requests"}}
+					</div>
+				{{else if .IsBlockedByOutdatedBranch}}
+					<div class="item text red">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.blocked_by_outdated_branch"}}
+					</div>
+				{{else if .IsBlockedByChangedProtectedFiles}}
+					<div class="item text red">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n"}}
+					</div>
+					<ul>
+						{{range .ChangedProtectedFiles}}
+						<li>{{.}}</li>
+						{{end}}
+					</ul>
+				{{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
+					<div class="item text red">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.required_status_check_failed"}}
+					</div>
+				{{else if and .RequireSigned (not .WillSign)}}
+					<div class="item text red">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.require_signed_wont_sign"}}
+					</div>
+				{{else}}
+					<div class="item text red">
+						{{svg "octicon-x"}}
+						{{ctx.Locale.Tr "repo.pulls.cannot_auto_merge_desc"}}
+					</div>
+					<div class="item">
+						{{svg "octicon-info"}}
+						{{ctx.Locale.Tr "repo.pulls.cannot_auto_merge_helper"}}
+					</div>
+				{{end}}
+			{{end}}{{/* end if: pull request status */}}
+
+			{{/*
+			Manually Merged is not a well-known feature, it is used to mark a non-mergeable PR (already merged, conflicted) as merged
+			To test it:
+			* Enable "Manually Merged" feature in the Repository Settings
+			* Create a pull request, either:
+			* - Merge the pull request branch locally and push the merged commit to Gitea
+			* - Make some conflicts between the base branch and the pull request branch
+			* Then the Manually Merged form will be shown in the merge form
+			*/}}
+			{{if and $.StillCanManualMerge (not $showGeneralMergeForm)}}
+				<div class="divider"></div>
+				<form class="ui form form-fetch-action" action="{{.Link}}/merge" method="post">{{/* another similar form is in PullRequestMergeForm.vue*/}}
+					{{.CsrfTokenHtml}}
+					<div class="field">
+						<input type="text" name="merge_commit_id" placeholder="{{ctx.Locale.Tr "repo.pulls.merge_commit_id"}}">
+					</div>
+					<button class="ui red button" type="submit" name="do" value="manually-merged">
+						{{ctx.Locale.Tr "repo.pulls.merge_manually"}}
+					</button>
+				</form>
+			{{end}}
+
+			{{if and .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}}
+				{{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions}}
+			{{end}}
+		</div>
+	</div>
+</div>
+{{end}}
diff --git a/repo/issue/view_content/pull_merge_instruction.tmpl b/repo/issue/view_content/pull_merge_instruction.tmpl
new file mode 100644
index 0000000..9a3e2cb
--- /dev/null
+++ b/repo/issue/view_content/pull_merge_instruction.tmpl
@@ -0,0 +1,55 @@
+<div class="divider"></div>
+<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} </div>
+<div class="instruct-content tw-mt-2 tw-hidden">
+	<div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}</div>
+	{{$localBranch := .PullRequest.HeadBranch}}
+	{{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}
+		{{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}}
+	{{end}}
+	<div class="ui secondary segment">
+		{{if eq .PullRequest.Flow 0}}
+		<div>git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}<origin-url data-url="{{.PullRequest.HeadRepo.Link}}"></origin-url>{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div>
+		{{else}}
+		<div>git fetch -u origin {{.PullRequest.GetGitRefName}}:{{$localBranch}}</div>
+		{{end}}
+		<div>git checkout {{$localBranch}}</div>
+	</div>
+	{{if .ShowMergeInstructions}}
+	<div>
+		<h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}</h3>
+		{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}}
+		{{if not .AutodetectManualMerge}}
+			<div>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}</div>
+		{{end}}
+	</div>
+	<div class="ui secondary segment">
+		<div data-pull-merge-style="merge">
+			<div>git checkout {{.PullRequest.BaseBranch}}</div>
+			<div>git merge --no-ff {{$localBranch}}</div>
+		</div>
+		<div class="tw-hidden" data-pull-merge-style="rebase">
+			<div>git checkout {{.PullRequest.BaseBranch}}</div>
+			<div>git merge --ff-only {{$localBranch}}</div>
+		</div>
+		<div class="tw-hidden" data-pull-merge-style="rebase-merge">
+			<div>git checkout {{$localBranch}}</div>
+			<div>git rebase {{.PullRequest.BaseBranch}}</div>
+			<div>git checkout {{.PullRequest.BaseBranch}}</div>
+			<div>git merge --no-ff {{$localBranch}}</div>
+		</div>
+		<div class="tw-hidden" data-pull-merge-style="squash">
+			<div>git checkout {{.PullRequest.BaseBranch}}</div>
+			<div>git merge --squash {{$localBranch}}</div>
+		</div>
+		<div class="tw-hidden" data-pull-merge-style="fast-forward-only">
+			<div>git checkout {{.PullRequest.BaseBranch}}</div>
+			<div>git merge --ff-only {{$localBranch}}</div>
+		</div>
+		<div class="tw-hidden" data-pull-merge-style="manually-merged">
+			<div>git checkout {{.PullRequest.BaseBranch}}</div>
+			<div>git merge {{$localBranch}}</div>
+		</div>
+		<div>git push origin {{.PullRequest.BaseBranch}}</div>
+	</div>
+	{{end}}
+</div>
diff --git a/repo/issue/view_content/reactions.tmpl b/repo/issue/view_content/reactions.tmpl
new file mode 100644
index 0000000..0011efe
--- /dev/null
+++ b/repo/issue/view_content/reactions.tmpl
@@ -0,0 +1,17 @@
+<div class="bottom-reactions" data-action-url="{{$.ActionURL}}">
+{{range $key, $value := .Reactions}}
+	{{$hasReacted := $value.HasUser ctx.RootData.SignedUserID}}
+	<a role="button" class="ui label basic{{if $hasReacted}} primary{{end}}{{if not ctx.RootData.IsSigned}} disabled{{end}} comment-reaction-button"
+		data-tooltip-content
+		title="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
+		aria-label="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
+		data-tooltip-placement="bottom-start"
+		data-reaction-content="{{$key}}" data-has-reacted="{{$hasReacted}}">
+		<span class="reaction">{{ReactionToEmoji $key}}</span>
+		<span class="reaction-count">{{len $value}}</span>
+	</a>
+{{end}}
+{{if AllowedReactions}}
+	{{template "repo/issue/view_content/add_reaction" dict "ActionURL" .ActionURL}}
+{{end}}
+</div>
diff --git a/repo/issue/view_content/reference_issue_dialog.tmpl b/repo/issue/view_content/reference_issue_dialog.tmpl
new file mode 100644
index 0000000..d6c9081
--- /dev/null
+++ b/repo/issue/view_content/reference_issue_dialog.tmpl
@@ -0,0 +1,28 @@
+<div class="ui small modal" id="reference-issue-modal">
+	<div class="header">
+		{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}
+	</div>
+	<div class="content">
+		<form class="ui form form-fetch-action" action="{{.Repository.Link}}/issues/new" method="post">
+			{{.CsrfTokenHtml}}
+			<div class="field">
+				<label><strong>{{ctx.Locale.Tr "repository"}}</strong></label>
+				<div class="ui search selection dropdown issue_reference_repository_search ellipsis-items-nowrap">
+					<div class="default text gt-ellipsis">{{.Repository.FullName}}</div>
+					<div class="menu"></div>
+				</div>
+			</div>
+			<div class="field">
+				<label><strong>{{ctx.Locale.Tr "repo.milestones.title"}}</strong></label>
+				<input name="title" value="" autofocus required maxlength="255" autocomplete="off">
+			</div>
+			<div class="field">
+				<label><strong>{{ctx.Locale.Tr "repo.issues.reference_issue.body"}}</strong></label>
+				<textarea name="content"></textarea>
+			</div>
+			<div class="text right">
+				<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.create"}}</button>
+			</div>
+		</form>
+	</div>
+</div>
diff --git a/repo/issue/view_content/show_role.tmpl b/repo/issue/view_content/show_role.tmpl
new file mode 100644
index 0000000..40c8b67
--- /dev/null
+++ b/repo/issue/view_content/show_role.tmpl
@@ -0,0 +1,10 @@
+{{if and .ShowRole.IsPoster (not .IgnorePoster)}}
+	<div class="ui basic label role-label" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.author_helper"}}">
+		{{ctx.Locale.Tr "repo.issues.author"}}
+	</div>
+{{end}}
+{{if .ShowRole.RoleInRepo}}
+	<div class="ui basic label role-label" data-tooltip-content="{{.ShowRole.RoleInRepo.LocaleHelper ctx.Locale}}">
+		{{.ShowRole.RoleInRepo.LocaleString ctx.Locale}}
+	</div>
+{{end}}
diff --git a/repo/issue/view_content/sidebar.tmpl b/repo/issue/view_content/sidebar.tmpl
new file mode 100644
index 0000000..987a882
--- /dev/null
+++ b/repo/issue/view_content/sidebar.tmpl
@@ -0,0 +1,26 @@
+<div class="issue-content-right ui segment">
+	{{template "repo/issue/branch_selector_field" $}}{{/* TODO: RemoveIssueRef: template "repo/issue/branch_selector_field" $*/}}
+
+	{{if .Issue.IsPull}}
+		{{template "repo/issue/sidebar/reviewer_list" $.IssuePageMetaData}}
+		{{template "repo/issue/sidebar/wip_switch" $}}
+		<div class="divider"></div>
+	{{end}}
+
+	{{template "repo/issue/sidebar/label_list" $.IssuePageMetaData}}
+
+	{{template "repo/issue/sidebar/milestone_list" $.IssuePageMetaData}}
+	{{if .IsProjectsEnabled}}
+		{{template "repo/issue/sidebar/project_list" $.IssuePageMetaData}}
+	{{end}}
+	{{template "repo/issue/sidebar/assignee_list" $.IssuePageMetaData}}
+
+	{{template "repo/issue/sidebar/participant_list" $}}
+	{{template "repo/issue/sidebar/watch_notification" $}}
+	{{template "repo/issue/sidebar/stopwatch_timetracker" $}}
+	{{template "repo/issue/sidebar/due_date" $}}
+	{{template "repo/issue/sidebar/issue_dependencies" $}}
+	{{template "repo/issue/sidebar/reference_link" $}}
+	{{template "repo/issue/sidebar/issue_management" $}}
+	{{template "repo/issue/sidebar/allow_maintainer_edit" $}}
+</div>
diff --git a/repo/issue/view_content/update_branch_by_merge.tmpl b/repo/issue/view_content/update_branch_by_merge.tmpl
new file mode 100644
index 0000000..adce052
--- /dev/null
+++ b/repo/issue/view_content/update_branch_by_merge.tmpl
@@ -0,0 +1,37 @@
+{{if and (gt $.Issue.PullRequest.CommitsBehind 0) (not $.Issue.IsClosed) (not $.Issue.PullRequest.IsChecking) (not $.IsPullFilesConflicted) (not $.IsPullRequestBroken)}}
+	<div class="divider"></div>
+	<div class="item item-section">
+		<div class="item-section-left flex-text-inline">
+			{{svg "octicon-alert"}}
+			{{ctx.Locale.Tr "repo.pulls.outdated_with_base_branch"}}
+		</div>
+		<div class="item-section-right">
+			{{if and $.UpdateAllowed $.UpdateByRebaseAllowed}}
+				<div class="tw-inline-block">
+					<div class="ui buttons update-button">
+						<button class="ui button" data-do="{{$.Link}}/update" data-redirect="{{$.Link}}">
+							<span class="button-text">
+								{{ctx.Locale.Tr "repo.pulls.update_branch"}}
+							</span>
+						</button>
+						<div class="ui dropdown icon button">
+							{{svg "octicon-triangle-down"}}
+							<div class="menu">
+								<a class="item active selected" data-do="{{$.Link}}/update">{{ctx.Locale.Tr "repo.pulls.update_branch"}}</a>
+								<a class="item" data-do="{{$.Link}}/update?style=rebase">{{ctx.Locale.Tr "repo.pulls.update_branch_rebase"}}</a>
+							</div>
+						</div>
+					</div>
+				</div>
+			{{end}}
+			{{if and $.UpdateAllowed (not $.UpdateByRebaseAllowed)}}
+				<form action="{{$.Link}}/update" method="post" class="ui update-branch-form">
+					{{$.CsrfTokenHtml}}
+					<button class="ui compact button">
+						<span class="ui text">{{ctx.Locale.Tr "repo.pulls.update_branch"}}</span>
+					</button>
+				</form>
+			{{end}}
+		</div>
+	</div>
+{{end}}
diff --git a/repo/issue/view_content/watching.tmpl b/repo/issue/view_content/watching.tmpl
new file mode 100644
index 0000000..05936d0
--- /dev/null
+++ b/repo/issue/view_content/watching.tmpl
@@ -0,0 +1,12 @@
+<form hx-boost="true" hx-sync="this:replace" hx-target="this" method="post" action="{{.Issue.Link}}/watch">
+	<input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}">
+	<button class="fluid ui button">
+		{{if $.IssueWatch.IsWatching}}
+			{{svg "octicon-mute" 16 "tw-mr-2"}}
+			{{ctx.Locale.Tr "repo.issues.unsubscribe"}}
+		{{else}}
+			{{svg "octicon-unmute" 16 "tw-mr-2"}}
+			{{ctx.Locale.Tr "repo.issues.subscribe"}}
+		{{end}}
+	</button>
+</form>
diff --git a/repo/issue/view_title.tmpl b/repo/issue/view_title.tmpl
new file mode 100644
index 0000000..7bb00ff
--- /dev/null
+++ b/repo/issue/view_title.tmpl
@@ -0,0 +1,139 @@
+{{if .Flash}}
+	<div class="sixteen wide column tw-mb-2">
+		{{template "base/alert" .}}
+	</div>
+{{end}}
+<div class="tw-hidden" id="issue-page-info"
+	data-issue-index="{{$.Issue.Index}}"
+	data-issue-dependency-search-type="{{$.IssueDependencySearchType}}"
+	data-issue-repo-link="{{$.RepoLink}}"
+	data-issue-repo-id="{{$.Repository.ID}}"
+></div>
+<div class="issue-title-header">
+	{{$canEditIssueTitle := and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
+	<div class="issue-title" id="issue-title-display">
+		<h1 class="tw-break-anywhere">
+			{{ctx.RenderUtils.RenderIssueTitle .Issue.Title ($.Repository.ComposeMetas ctx)}}
+			<span class="index">#{{.Issue.Index}}</span>
+		</h1>
+		<div class="issue-title-buttons">
+			{{if $canEditIssueTitle}}
+			<button id="issue-title-edit-show" class="ui small basic button">{{ctx.Locale.Tr "repo.issues.edit"}}</button>
+			{{end}}
+			{{if not .Issue.IsPull}}
+			<a role="button" class="ui small primary button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
+			{{end}}
+		</div>
+	</div>
+	{{if $canEditIssueTitle}}
+	<div class="ui form issue-title tw-hidden" id="issue-title-editor">
+		<div class="ui input tw-flex-1">
+			<input value="{{.Issue.Title}}" data-old-title="{{.Issue.Title}}" maxlength="255" autocomplete="off">
+		</div>
+		<div class="issue-title-buttons">
+			<button class="ui small basic cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
+			<button class="ui small primary button" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title">
+				{{ctx.Locale.Tr "repo.issues.save"}}
+			</button>
+		</div>
+	</div>
+	{{end}}
+	<div class="issue-title-meta">
+		{{if .HasMerged}}
+			<div class="ui purple label issue-state-label">{{svg "octicon-git-merge" 16 "tw-mr-1"}} {{if eq .Issue.PullRequest.Status 3}}{{ctx.Locale.Tr "repo.pulls.manually_merged"}}{{else}}{{ctx.Locale.Tr "repo.pulls.merged"}}{{end}}</div>
+		{{else if .Issue.IsClosed}}
+			<div class="ui red label issue-state-label">{{svg (Iif .Issue.IsPull "octicon-git-pull-request-closed" "octicon-issue-closed")}} {{ctx.Locale.Tr "repo.issues.closed_title"}}</div>
+		{{else if .Issue.IsPull}}
+			{{if .IsPullWorkInProgress}}
+				<div class="ui grey label issue-state-label">{{svg "octicon-git-pull-request-draft"}} {{ctx.Locale.Tr "repo.issues.draft_title"}}</div>
+			{{else}}
+				<div class="ui green label issue-state-label">{{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "repo.issues.open_title"}}</div>
+			{{end}}
+		{{else}}
+			<div class="ui green label issue-state-label">{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues.open_title"}}</div>
+		{{end}}
+		<div class="tw-ml-2 tw-flex-1 tw-break-anywhere">
+			{{if .Issue.IsPull}}
+				{{$headHref := .HeadTarget}}
+				{{if .HeadBranchLink}}
+					{{$headHref = HTMLFormat `<a href="%s">%s</a> <button class="btn interact-fg" data-tooltip-content="%s" data-clipboard-text="%s">%s</button>` .HeadBranchLink $headHref (ctx.Locale.Tr "copy_branch") .HeadTarget (svg "octicon-copy" 14)}}
+				{{else}}
+					{{if .Issue.PullRequest.IsAgitFlow}}
+						{{$headHref = HTMLFormat `%s <a href="%s" target="_blank"><span class="ui label basic tiny" data-tooltip-content="%s">AGit</span></a>` $headHref "https://docs.gitea.com/usage/agit" (ctx.Locale.Tr "repo.pull.agit_documentation")}}
+					{{else}}
+						{{$headHref = HTMLFormat `<span class="tw-line-through" data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr "form.target_branch_not_exist") $headHref}}
+					{{end}}
+				{{end}}
+				{{$baseHref := .BaseTarget}}
+				{{if .BaseBranchLink}}
+					{{if .BaseBranchNotExist}}
+						{{$baseHref = HTMLFormat `<span class="tw-line-through" data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr "form.target_branch_not_exist") $baseHref}}
+					{{else}}
+						{{$baseHref = HTMLFormat `<a href="%s">%s</a>` .BaseBranchLink $baseHref}}
+					{{end}}
+				{{end}}
+				{{if .Issue.PullRequest.HasMerged}}
+					{{$mergedStr:= DateUtils.TimeSince .Issue.PullRequest.MergedUnix}}
+					{{if .Issue.OriginalAuthor}}
+						{{.Issue.OriginalAuthor}}
+						<span class="pull-desc">{{ctx.Locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr}}</span>
+					{{else}}
+						<a {{if gt .Issue.PullRequest.Merger.ID 0}}href="{{.Issue.PullRequest.Merger.HomeLink}}"{{end}}>{{.Issue.PullRequest.Merger.GetDisplayName}}</a>
+						<span class="pull-desc">{{ctx.Locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr}}</span>
+					{{end}}
+				{{else}}
+					{{if .Issue.OriginalAuthor}}
+						<span id="pull-desc-display" class="pull-desc">{{.Issue.OriginalAuthor}} {{ctx.Locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref}}</span>
+					{{else}}
+						<span id="pull-desc-display" class="pull-desc">
+							<a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a>
+							{{ctx.Locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref}}
+						</span>
+					{{end}}
+					<span id="pull-desc-editor" class="tw-hidden flex-text-block" data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch">
+						<div class="ui floating filter dropdown">
+							<div class="ui basic small button tw-mr-0">
+								<span class="text">{{ctx.Locale.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span>
+							</div>
+						</div>
+						{{svg "octicon-arrow-right"}}
+						<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}">
+							<div class="ui basic small button">
+								<span class="text" id="pull-target-branch" data-basename="{{$.BaseName}}" data-branch="{{$.BaseBranch}}">{{ctx.Locale.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span>
+								{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							</div>
+							<div class="menu">
+								<div class="ui icon search input">
+									<i class="icon">{{svg "octicon-filter" 16}}</i>
+									<input name="search" placeholder="{{ctx.Locale.Tr "repo.pulls.filter_branch"}}...">
+								</div>
+								<div class="scrolling menu" id="branch-select">
+									{{range .Branches}}
+										{{$sameBase := ne $.BaseName $.HeadUserName}}
+										{{$differentBranch := ne . $.HeadBranch}}
+										{{if or $sameBase $differentBranch}}
+											<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}:{{.}}</div>
+										{{end}}
+									{{end}}
+								</div>
+							</div>
+						</div>
+					</span>
+				{{end}}
+			{{else}}
+				{{$createdStr:= DateUtils.TimeSince .Issue.CreatedUnix}}
+				<span class="time-desc">
+					{{if .Issue.OriginalAuthor}}
+						{{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr .Issue.OriginalAuthor}}
+					{{else if gt .Issue.Poster.ID 0}}
+						{{ctx.Locale.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink .Issue.Poster.GetDisplayName}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.GetDisplayName}}
+					{{end}}
+					·
+					{{ctx.Locale.TrN .Issue.NumComments "repo.issues.num_comments_1" "repo.issues.num_comments" .Issue.NumComments}}
+				</span>
+			{{end}}
+		</div>
+	</div>
+</div>
diff --git a/repo/latest_commit.tmpl b/repo/latest_commit.tmpl
new file mode 100644
index 0000000..b815c7a
--- /dev/null
+++ b/repo/latest_commit.tmpl
@@ -0,0 +1,31 @@
+{{if not .LatestCommit}}
+	…
+{{else}}
+	{{if .LatestCommitUser}}
+		{{ctx.AvatarUtils.Avatar .LatestCommitUser 24}}
+		{{if and .LatestCommitUser.FullName DefaultShowFullName}}
+			<a class="muted author-wrapper" title="{{.LatestCommitUser.FullName}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
+		{{else}}
+			<a class="muted author-wrapper" title="{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
+		{{end}}
+	{{else}}
+		{{if .LatestCommit.Author}}
+			{{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24}}
+			<span class="author-wrapper" title="{{.LatestCommit.Author.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></span>
+		{{end}}
+	{{end}}
+	<a rel="nofollow" class="ui sha label {{if .LatestCommit.Signature}} isSigned {{if .LatestCommitVerification.Verified}} isVerified{{if eq .LatestCommitVerification.TrustStatus "trusted"}}{{else if eq .LatestCommitVerification.TrustStatus "untrusted"}}Untrusted{{else}}Unmatched{{end}}{{else if .LatestCommitVerification.Warning}} isWarning{{end}}{{end}}" href="{{.RepoLink}}/commit/{{PathEscape .LatestCommit.ID.String}}">
+		<span class="shortsha">{{ShortSha .LatestCommit.ID.String}}</span>
+		{{if .LatestCommit.Signature}}
+			{{template "repo/shabox_badge" dict "root" $ "verification" .LatestCommitVerification}}
+		{{end}}
+	</a>
+	{{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses}}
+	{{$commitLink:= printf "%s/commit/%s" .RepoLink (PathEscape .LatestCommit.ID.String)}}
+	<span class="grey commit-summary" title="{{.LatestCommit.Summary}}"><span class="message-wrapper">{{ctx.RenderUtils.RenderCommitMessageLinkSubject .LatestCommit.Message $commitLink ($.Repository.ComposeMetas ctx)}}</span>
+		{{if IsMultilineCommitMessage .LatestCommit.Message}}
+			<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
+			<pre class="commit-body tw-hidden">{{ctx.RenderUtils.RenderCommitBody .LatestCommit.Message ($.Repository.ComposeMetas ctx)}}</pre>
+		{{end}}
+	</span>
+{{end}}
diff --git a/repo/migrate/codebase.tmpl b/repo/migrate/codebase.tmpl
new file mode 100644
index 0000000..c8059b7
--- /dev/null
+++ b/repo/migrate/codebase.tmpl
@@ -0,0 +1,116 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
+					<input id="service_type" type="hidden" name="service" value="{{.service}}">
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
+						<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
+						<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
+						<span class="help">
+						{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+						</span>
+					</div>
+
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
+						<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
+					</div>
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
+						<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
+					</div>
+
+					{{template "repo/migrate/options" .}}
+
+					<div id="migrate_items">
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
+							<div class="ui checkbox">
+								<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_milestones"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_labels"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_issues"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_merge_requests"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div class="divider"></div>
+
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu" title="{{.SignedUser.Name}}">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
+									{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+									<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}
+										<span class="truncated-item-name">{{.ShortName 40}}</span>
+									</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.migrate_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/codecommit.tmpl b/repo/migrate/codecommit.tmpl
new file mode 100644
index 0000000..d1cebd0
--- /dev/null
+++ b/repo/migrate/codecommit.tmpl
@@ -0,0 +1,117 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
+					<input id="service_type" type="hidden" name="service" value="{{.service}}">
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
+						<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
+						<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
+						<span class="help">
+						{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+						</span>
+					</div>
+
+					<div class="inline required field {{if .Err_Auth}}error{{end}}">
+						<label for="aws_access_key_id">{{ctx.Locale.Tr "repo.migrate.codecommit.aws_access_key_id"}}</label>
+						<input id="aws_access_key_id" name="aws_access_key_id" value="{{.aws_access_key_id}}" required>
+					</div>
+					<div class="inline required field {{if .Err_Auth}}error{{end}}">
+						<label for="aws_secret_access_key">{{ctx.Locale.Tr "repo.migrate.codecommit.aws_secret_access_key"}}</label>
+						<input id="aws_secret_access_key" name="aws_secret_access_key" type="password" value="{{.aws_secret_access_key}}" required>
+					</div>
+					<div class="inline required field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_username">{{ctx.Locale.Tr "repo.migrate.codecommit.https_git_credentials_username"}}</label>
+						<input id="auth_username" name="auth_username" value="{{.auth_username}}" required>
+					</div>
+					<div class="inline required field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_password">{{ctx.Locale.Tr "repo.migrate.codecommit.https_git_credentials_password"}}</label>
+						<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}" required>
+					</div>
+
+					{{if not .DisableNewPullMirrors}}
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.migrate_options"}}</label>
+						<div class="ui checkbox">
+							<input id="mirror" name="mirror" type="checkbox" {{if .mirror}} checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.migrate_options_mirror_helper"}}</label>
+						</div>
+					</div>
+					{{end}}
+
+					<div id="migrate_items">
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
+							<div class="ui checkbox">
+								<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div class="divider"></div>
+
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu" title="{{.SignedUser.Name}}">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
+									{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+									<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}
+										<span class="truncated-item-name">{{.ShortName 40}}</span>
+									</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.migrate_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/git.tmpl b/repo/migrate/git.tmpl
new file mode 100644
index 0000000..9c5f0d7
--- /dev/null
+++ b/repo/migrate/git.tmpl
@@ -0,0 +1,90 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
+					<input id="service_type" type="hidden" name="service" value="{{.service}}">
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
+						<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
+						<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
+						<span class="help">
+						{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+						</span>
+					</div>
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
+						<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
+					</div>
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
+						<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
+					</div>
+
+					{{template "repo/migrate/options" .}}
+
+					<div class="divider"></div>
+
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu" title="{{.SignedUser.Name}}">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
+									{{ctx.AvatarUtils.Avatar .SignedUser}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+									<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+										{{ctx.AvatarUtils.Avatar .}}
+										<span class="truncated-item-name">{{.ShortName 40}}</span>
+									</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.migrate_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/gitbucket.tmpl b/repo/migrate/gitbucket.tmpl
new file mode 100644
index 0000000..b667fa8
--- /dev/null
+++ b/repo/migrate/gitbucket.tmpl
@@ -0,0 +1,132 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
+					<input id="service_type" type="hidden" name="service" value="{{.service}}">
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
+						<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
+						<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
+						<span class="help">
+						{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+						</span>
+					</div>
+
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
+						<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
+					</div>
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
+						<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
+					</div>
+
+					{{template "repo/migrate/options" .}}
+
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
+						<div class="ui checkbox">
+							<input name="wiki" type="checkbox" {{if .wiki}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.migrate_items_wiki"}}</label>
+						</div>
+					</div>
+
+					<div id="migrate_items">
+						<span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_labels"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_issues"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="releases" type="checkbox" {{if .releases}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_releases"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_milestones"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div class="divider"></div>
+
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu" title="{{.SignedUser.Name}}">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
+									{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+									<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}
+										<span class="truncated-item-name">{{.ShortName 40}}</span>
+									</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.migrate_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/gitea.tmpl b/repo/migrate/gitea.tmpl
new file mode 100644
index 0000000..3b8f377
--- /dev/null
+++ b/repo/migrate/gitea.tmpl
@@ -0,0 +1,128 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
+					<input id="service_type" type="hidden" name="service" value="{{.service}}">
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
+						<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
+						<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
+						<span class="help">
+							{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+						</span>
+					</div>
+
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
+						<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}} data-need-clear="true" {{end}}>
+						<a target="_blank" href="https://docs.gitea.com/development/api-usage">{{svg "octicon-question"}}</a>
+					</div>
+
+					{{template "repo/migrate/options" .}}
+
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
+						<div class="ui checkbox">
+							<input name="wiki" type="checkbox" {{if .wiki}} checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.migrate_items_wiki"}}</label>
+						</div>
+					</div>
+
+					<div id="migrate_items">
+						<span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="labels" type="checkbox" {{if .labels}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_labels"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="issues" type="checkbox" {{if .issues}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_issues"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="pull_requests" type="checkbox" {{if .pull_requests}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="releases" type="checkbox" {{if .releases}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_releases"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="milestones" type="checkbox" {{if .milestones}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_milestones"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div class="divider"></div>
+
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu" title="{{.SignedUser.Name}}">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
+									{{ctx.AvatarUtils.Avatar .SignedUser}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+								<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+									{{ctx.AvatarUtils.Avatar .}}
+									<span class="truncated-item-name">{{.ShortName 40}}</span>
+								</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.migrate_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/github.tmpl b/repo/migrate/github.tmpl
new file mode 100644
index 0000000..3535edd
--- /dev/null
+++ b/repo/migrate/github.tmpl
@@ -0,0 +1,130 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
+					<input id="service_type" type="hidden" name="service" value="{{.service}}">
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
+						<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
+						<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
+						<span class="help">
+						{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}
+						</span>
+					</div>
+
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
+						<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}}data-need-clear="true"{{end}}>
+						<a target="_blank" href="https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token">{{svg "octicon-question"}}</a>
+						<span class="help">
+						{{ctx.Locale.Tr "repo.migrate.github_token_desc"}}
+						</span>
+					</div>
+
+					{{template "repo/migrate/options" .}}
+
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
+						<div class="ui checkbox">
+							<input name="wiki" type="checkbox" {{if .wiki}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.migrate_items_wiki"}}</label>
+						</div>
+					</div>
+					<div id="migrate_items">
+						<span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_labels"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_issues"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="releases" type="checkbox" {{if .releases}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_releases"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_milestones"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div class="divider"></div>
+
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu" title="{{.SignedUser.Name}}">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
+									{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+									<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}
+										<span class="truncated-item-name">{{.ShortName 40}}</span>
+									</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.migrate_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/gitlab.tmpl b/repo/migrate/gitlab.tmpl
new file mode 100644
index 0000000..f705fb3
--- /dev/null
+++ b/repo/migrate/gitlab.tmpl
@@ -0,0 +1,127 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
+					<input id="service_type" type="hidden" name="service" value="{{.service}}">
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
+						<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
+						<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
+						<span class="help">
+						{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+						</span>
+					</div>
+
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
+						<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}}data-need-clear="true"{{end}}>
+						<a target="_blank" href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html">{{svg "octicon-question"}}</a>
+					</div>
+
+					{{template "repo/migrate/options" .}}
+
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
+						<div class="ui checkbox">
+							<input name="wiki" type="checkbox" {{if .wiki}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.migrate_items_wiki"}}</label>
+						</div>
+					</div>
+					<div id="migrate_items">
+						<span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_labels"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_issues"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_merge_requests"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="releases" type="checkbox" {{if .releases}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_releases"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_milestones"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div class="divider"></div>
+
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu" title="{{.SignedUser.Name}}">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
+									{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+									<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}
+										<span class="truncated-item-name">{{.ShortName 40}}</span>
+									</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.migrate_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/gogs.tmpl b/repo/migrate/gogs.tmpl
new file mode 100644
index 0000000..eca83b1
--- /dev/null
+++ b/repo/migrate/gogs.tmpl
@@ -0,0 +1,130 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
+					<input id="service_type" type="hidden" name="service" value="{{.service}}">
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
+						<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
+						<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
+						<span class="help">
+							{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+						</span>
+					</div>
+
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
+						<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}} data-need-clear="true" {{end}}>
+						<!-- <a target="_blank" href="https://docs.gitea.com/development/api-usage">{{svg "octicon-question"}}</a> -->
+					</div>
+
+					{{template "repo/migrate/options" .}}
+
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
+						<div class="ui checkbox">
+							<input name="wiki" type="checkbox" {{if .wiki}} checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.migrate_items_wiki"}}</label>
+						</div>
+					</div>
+
+					<div id="migrate_items">
+						<span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="labels" type="checkbox" {{if .labels}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_labels"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="issues" type="checkbox" {{if .issues}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_issues"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="milestones" type="checkbox" {{if .milestones}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_milestones"}}</label>
+							</div>
+						</div>
+						<!-- Gogs do not support it
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="pull_requests" type="checkbox" {{if .pull_requests}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_merge_requests"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="releases" type="checkbox" {{if .releases}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_releases"}}</label>
+							</div>
+						</div>
+						-->
+					</div>
+
+					<div class="divider"></div>
+
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu" title="{{.SignedUser.Name}}">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
+									{{ctx.AvatarUtils.Avatar .SignedUser}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+								<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+									{{ctx.AvatarUtils.Avatar .}}
+									<span class="truncated-item-name">{{.ShortName 40}}</span>
+								</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}} checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.migrate_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/helper.tmpl b/repo/migrate/helper.tmpl
new file mode 100644
index 0000000..e69de29
diff --git a/repo/migrate/migrate.tmpl b/repo/migrate/migrate.tmpl
new file mode 100644
index 0000000..c5c697e
--- /dev/null
+++ b/repo/migrate/migrate.tmpl
@@ -0,0 +1,32 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			{{template "repo/migrate/helper" .}}
+			<div class="ui cards migrate-entries">
+				{{range .Services}}
+					<a class="ui card migrate-entry tw-flex tw-items-center" href="{{AppSubUrl}}/repo/migrate?service_type={{.}}&org={{$.Org}}&mirror={{$.Mirror}}">
+						{{if eq .Name "github"}}
+							{{svg "octicon-mark-github" 184 "tw-p-4"}}
+						{{else if eq .Name "gitlab"}}
+							{{svg "gitea-gitlab" 184 "tw-p-4"}}
+						{{else if eq .Name "gitbucket"}}
+							{{svg "gitea-gitbucket" 184 "tw-p-4"}}
+						{{else}}
+							{{svg (printf "gitea-%s" .Name) 184}}
+						{{end}}
+						<div class="content">
+							<div class="header tw-text-center">
+								{{.Title}}
+							</div>
+							<div class="description tw-text-center">
+								{{ctx.Locale.Tr (printf "repo.migrate.%s.description" .Name)}}
+							</div>
+						</div>
+					</a>
+				{{end}}
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/migrating.tmpl b/repo/migrate/migrating.tmpl
new file mode 100644
index 0000000..bc07b48
--- /dev/null
+++ b/repo/migrate/migrating.tmpl
@@ -0,0 +1,101 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<div class="ui grid">
+			<div class="sixteen wide column content">
+				{{template "base/alert" .}}
+				<div class="home">
+					<div class="ui stackable middle very relaxed page grid">
+						<div id="repo_migrating" class="sixteen wide center aligned centered column" data-migrating-repo-link="{{.Link}}">
+							<div>
+								<img src="{{AssetUrlPrefix}}/img/loading.png">
+							</div>
+						</div>
+						<div id="repo_migrating_failed_image" class="sixteen wide center aligned centered column tw-hidden">
+							<div>
+								<img src="{{AssetUrlPrefix}}/img/failed.png">
+							</div>
+						</div>
+					</div>
+					<div class="ui stackable middle very relaxed page grid">
+						<div class="sixteen wide center aligned centered column">
+							<div id="repo_migrating_progress">
+								<p>{{ctx.Locale.Tr "repo.migrate.migrating" .CloneAddr}}</p>
+								<p id="repo_migrating_progress_message"></p>
+							</div>
+							<div id="repo_migrating_failed" class="tw-hidden">
+								{{if .CloneAddr}}
+									<p>{{ctx.Locale.Tr "repo.migrate.migrating_failed" .CloneAddr}}</p>
+								{{else}}
+									<p>{{ctx.Locale.Tr "repo.migrate.migrating_failed_no_addr"}}</p>
+								{{end}}
+								<p id="repo_migrating_failed_error"></p>
+							</div>
+							{{if .Permission.IsAdmin}}
+								<div class="divider"></div>
+								<div class="item">
+									{{if .Failed}}
+										<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{ctx.Locale.Tr "repo.settings.delete"}}</button>
+									{{else}}
+										<button class="ui basic show-modal button" data-modal="#cancel-repo-modal">{{ctx.Locale.Tr "cancel"}}</button>
+									{{end}}
+									<button id="repo_migrating_retry" data-migrating-task-retry-url="{{.Link}}/settings/migrate/retry" class="ui basic button tw-hidden">{{ctx.Locale.Tr "retry"}}</button>
+								</div>
+							{{end}}
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+
+<div class="ui small modal" id="delete-repo-modal">
+	<div class="header">
+		{{ctx.Locale.Tr "repo.settings.delete"}}
+	</div>
+	<div class="content">
+		<div class="ui warning message">
+			{{ctx.Locale.Tr "repo.settings.delete_notices_1"}}<br>
+			{{ctx.Locale.Tr "repo.settings.delete_notices_2" .Repository.FullName}}
+			{{if .Repository.NumForks}}<br>
+			{{ctx.Locale.Tr "repo.settings.delete_notices_fork_1"}}
+			{{end}}
+		</div>
+		<form class="ui form" action="{{.Link}}/settings" method="post">
+			{{.CsrfTokenHtml}}
+			<input type="hidden" name="action" value="delete">
+			<div class="field">
+				<label>
+					{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
+					<span class="text red">{{.Repository.Name}}</span>
+				</label>
+			</div>
+			<div class="required field">
+				<label for="repo_name_to_delete">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+				<input id="repo_name_to_delete" name="repo_name" required>
+			</div>
+
+			<div class="text right actions">
+				<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+				<button class="ui red button">{{ctx.Locale.Tr "repo.settings.confirm_delete"}}</button>
+			</div>
+		</form>
+	</div>
+</div>
+
+<div class="ui g-modal-confirm modal" id="cancel-repo-modal">
+	<div class="header">
+		{{ctx.Locale.Tr "repo.migrate.cancel_migrating_title"}}
+	</div>
+	<form action="{{.Link}}/settings/migrate/cancel" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="content">
+			{{ctx.Locale.Tr "repo.migrate.cancel_migrating_confirm"}}
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</form>
+</div>
+
+{{template "base/footer" .}}
diff --git a/repo/migrate/onedev.tmpl b/repo/migrate/onedev.tmpl
new file mode 100644
index 0000000..e1aad96
--- /dev/null
+++ b/repo/migrate/onedev.tmpl
@@ -0,0 +1,116 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
+					<input id="service_type" type="hidden" name="service" value="{{.service}}">
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
+						<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
+						<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
+						<span class="help">
+						{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+						</span>
+					</div>
+
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
+						<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
+					</div>
+					<div class="inline field {{if .Err_Auth}}error{{end}}">
+						<label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
+						<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
+					</div>
+
+					{{template "repo/migrate/options" .}}
+
+					<div id="migrate_items">
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
+							<div class="ui checkbox">
+								<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_milestones"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_labels"}}</label>
+							</div>
+						</div>
+						<div class="inline field">
+							<label></label>
+							<div class="ui checkbox">
+								<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_issues"}}</label>
+							</div>
+							<div class="ui checkbox">
+								<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests"}}</label>
+							</div>
+						</div>
+					</div>
+
+					<div class="divider"></div>
+
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu" title="{{.SignedUser.Name}}">
+								<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
+									{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
+									<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+								</div>
+								{{range .Orgs}}
+									<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}
+										<span class="truncated-item-name">{{.ShortName 40}}</span>
+									</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui checkbox">
+							{{if .IsForcedPrivate}}
+								<input name="private" type="checkbox" checked disabled>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
+							{{else}}
+								<input name="private" type="checkbox" {{if .private}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+							{{end}}
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "repo.migrate_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/migrate/options.tmpl b/repo/migrate/options.tmpl
new file mode 100644
index 0000000..8a46e57
--- /dev/null
+++ b/repo/migrate/options.tmpl
@@ -0,0 +1,26 @@
+{{if not .DisableNewPullMirrors}}
+<div class="inline field">
+	<label>{{ctx.Locale.Tr "repo.migrate_options"}}</label>
+	<div class="ui checkbox">
+		<input id="mirror" name="mirror" type="checkbox" {{if .mirror}} checked{{end}}>
+		<label>{{ctx.Locale.Tr "repo.migrate_options_mirror_helper"}}</label>
+	</div>
+</div>
+{{end}}
+{{if .LFSActive}}
+<div class="inline field">
+	<label></label>
+	<div class="ui checkbox">
+		<input id="lfs" name="lfs" type="checkbox" {{if .lfs}} checked{{end}}>
+		<label>{{ctx.Locale.Tr "repo.migrate_options_lfs"}}</label>
+	</div>
+	<span id="lfs_settings" class="tw-hidden">(<a id="lfs_settings_show" href="#">{{ctx.Locale.Tr "repo.settings.advanced_settings"}}</a>)</span>
+</div>
+<div id="lfs_endpoint" class="tw-hidden">
+	<span class="help">{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description.local"}}{{end}}</span>
+	<div class="inline field {{if .Err_LFSEndpoint}}error{{end}}">
+		<label>{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.label"}}</label>
+		<input name="lfs_endpoint" value="{{.lfs_endpoint}}" placeholder="{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.placeholder"}}">
+	</div>
+</div>
+{{end}}
diff --git a/repo/navbar.tmpl b/repo/navbar.tmpl
new file mode 100644
index 0000000..d6e9b1b
--- /dev/null
+++ b/repo/navbar.tmpl
@@ -0,0 +1,18 @@
+{{$canReadCode := $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
+
+<div class="ui fluid vertical menu">
+	<a class="{{if .PageIsPulse}}active {{end}}item" href="{{.RepoLink}}/activity">
+		{{ctx.Locale.Tr "repo.activity.navbar.pulse"}}
+	</a>
+	{{if $canReadCode}}
+		<a class="{{if .PageIsContributors}}active {{end}}item" href="{{.RepoLink}}/activity/contributors">
+			{{ctx.Locale.Tr "repo.activity.navbar.contributors"}}
+		</a>
+		<a class="{{if .PageIsCodeFrequency}}active{{end}} item" href="{{.RepoLink}}/activity/code-frequency">
+			{{ctx.Locale.Tr "repo.activity.navbar.code_frequency"}}
+		</a>
+		<a class="{{if .PageIsRecentCommits}}active{{end}} item" href="{{.RepoLink}}/activity/recent-commits">
+			{{ctx.Locale.Tr "repo.activity.navbar.recent_commits"}}
+		</a>
+	{{end}}
+</div>
diff --git a/repo/packages.tmpl b/repo/packages.tmpl
new file mode 100644
index 0000000..14e32c1
--- /dev/null
+++ b/repo/packages.tmpl
@@ -0,0 +1,8 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository packages">
+	{{template "repo/header" .}}
+	<div class="ui container">
+	{{template "package/shared/list" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/projects/list.tmpl b/repo/projects/list.tmpl
new file mode 100644
index 0000000..9eae401
--- /dev/null
+++ b/repo/projects/list.tmpl
@@ -0,0 +1,8 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository projects milestones">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "projects/list" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/projects/new.tmpl b/repo/projects/new.tmpl
new file mode 100644
index 0000000..67abfe2
--- /dev/null
+++ b/repo/projects/new.tmpl
@@ -0,0 +1,8 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository projects edit-project new">
+	{{template "repo/header" .}}
+	<div class="ui container">
+	{{template "projects/new" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/projects/view.tmpl b/repo/projects/view.tmpl
new file mode 100644
index 0000000..7267a99
--- /dev/null
+++ b/repo/projects/view.tmpl
@@ -0,0 +1,16 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository projects view-project">
+	{{template "repo/header" .}}
+	<div class="ui container padded">
+		<div class="flex-text-block tw-justify-end tw-mb-4">
+			<a class="ui small button" href="{{.RepoLink}}/labels">{{ctx.Locale.Tr "repo.labels"}}</a>
+			<a class="ui small button" href="{{.RepoLink}}/milestones">{{ctx.Locale.Tr "repo.milestones"}}</a>
+			<a class="ui small primary button" href="{{.RepoLink}}/issues/new/choose?project={{.Project.ID}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
+		</div>
+	</div>
+	<div class="ui container fluid padded">
+		{{template "projects/view" .}}
+	</div>
+</div>
+
+{{template "base/footer" .}}
diff --git a/repo/pulls/commits.tmpl b/repo/pulls/commits.tmpl
new file mode 100644
index 0000000..bf6e812
--- /dev/null
+++ b/repo/pulls/commits.tmpl
@@ -0,0 +1,10 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository view issue pull commits">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "repo/issue/view_title" .}}
+		{{template "repo/pulls/tab_menu" .}}
+		{{template "repo/commits_table" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/pulls/files.tmpl b/repo/pulls/files.tmpl
new file mode 100644
index 0000000..e7baa48
--- /dev/null
+++ b/repo/pulls/files.tmpl
@@ -0,0 +1,10 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository view issue pull files diff">
+	{{template "repo/header" .}}
+	<div class="ui container fluid padded">
+		{{template "repo/issue/view_title" .}}
+		{{template "repo/pulls/tab_menu" .}}
+		{{template "repo/diff/box" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/pulls/fork.tmpl b/repo/pulls/fork.tmpl
new file mode 100644
index 0000000..7af535f
--- /dev/null
+++ b/repo/pulls/fork.tmpl
@@ -0,0 +1,88 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new fork">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "new_fork"}}
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="inline required field {{if .Err_Owner}}error{{end}}">
+						<label>{{ctx.Locale.Tr "repo.owner"}}</label>
+						<div class="ui selection owner dropdown">
+							<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
+							<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
+								{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
+								<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu">
+								{{if .CanForkToUser}}
+									<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}" title="{{.SignedUser.Name}}">
+										{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
+										<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+									</div>
+								{{end}}
+								{{range .Orgs}}
+									<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}
+										<span class="truncated-item-name">{{.ShortName 40}}</span>
+									</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.fork_from"}}</label>
+						<a href="{{.ForkRepo.Link}}" class="tw-inline-block">{{.ForkRepo.FullName}}</a>
+					</div>
+					<div class="inline required field {{if .Err_RepoName}}error{{end}}">
+						<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
+						<div class="ui disabled checkbox">
+							<input type="checkbox" disabled {{if .IsPrivate}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
+						</div>
+						<span class="help">{{ctx.Locale.Tr "repo.fork_visibility_helper"}}</span>
+					</div>
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.fork_branch"}}</label>
+						<div class="ui selection dropdown ellipsis-items-nowrap">
+							<input type="hidden" id="fork_single_branch" name="fork_single_branch" value="" required>
+							<div class="text" title="{{ctx.Locale.Tr "repo.all_branches"}}">
+								<span class="truncated-item-name">{{ctx.Locale.Tr "repo.all_branches"}}</span>
+							</div>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu">
+								<div class="item" data-value="" title="{{ctx.Locale.Tr "repo.all_branches"}}">
+									{{ctx.Locale.Tr "repo.all_branches"}}
+								</div>
+								{{range .Branches}}
+									<div class="item" data-value="{{.}}" title="{{.}}">{{.}}</div>
+								{{end}}
+							</div>
+						</div>
+					</div>
+					<div class="inline field {{if .Err_Description}}error{{end}}">
+						<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+						<textarea id="description" name="description">{{.description}}</textarea>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button{{if not .CanForkRepo}} disabled{{end}}">
+							{{ctx.Locale.Tr "repo.fork_repo"}}
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/pulls/status.tmpl b/repo/pulls/status.tmpl
new file mode 100644
index 0000000..e8636ba
--- /dev/null
+++ b/repo/pulls/status.tmpl
@@ -0,0 +1,59 @@
+{{/*
+Template Attributes:
+* CommitStatus: summary of all commit status state
+* CommitStatuses: all commit status elements
+* MissingRequiredChecks: commit check contexts that are required by branch protection but not present
+* ShowHideChecks: whether use a button to show/hide the checks
+* is_context_required: Used in pull request commit status check table
+*/}}
+
+{{if .CommitStatus}}
+<div class="commit-status-panel">
+	<div class="ui top attached header commit-status-header">
+		{{if or (eq .CommitStatus.State "pending") (.MissingRequiredChecks)}}
+			{{ctx.Locale.Tr "repo.pulls.status_checking"}}
+		{{else if eq .CommitStatus.State "success"}}
+			{{ctx.Locale.Tr "repo.pulls.status_checks_success"}}
+		{{else if eq .CommitStatus.State "warning"}}
+			{{ctx.Locale.Tr "repo.pulls.status_checks_warning"}}
+		{{else if eq .CommitStatus.State "failure"}}
+			{{ctx.Locale.Tr "repo.pulls.status_checks_failure"}}
+		{{else if eq .CommitStatus.State "error"}}
+			{{ctx.Locale.Tr "repo.pulls.status_checks_error"}}
+		{{else}}
+			{{ctx.Locale.Tr "repo.pulls.status_checking"}}
+		{{end}}
+
+		{{if .ShowHideChecks}}
+		<div class="ui right">
+			<button class="commit-status-hide-checks btn interact-fg"
+			data-show-all="{{ctx.Locale.Tr "repo.pulls.status_checks_show_all"}}"
+			data-hide-all="{{ctx.Locale.Tr "repo.pulls.status_checks_hide_all"}}">
+			{{ctx.Locale.Tr "repo.pulls.status_checks_hide_all"}}</button>
+		</div>
+		{{end}}
+	</div>
+
+	<div class="commit-status-list">
+		{{range .CommitStatuses}}
+			<div class="commit-status-item">
+				{{template "repo/commit_status" .}}
+				<div class="status-context gt-ellipsis">{{.Context}} <span class="text light-2">{{.Description}}</span></div>
+				<div class="ui status-details">
+					{{if $.is_context_required}}
+						{{if (call $.is_context_required .Context)}}<div class="ui label">{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
+					{{end}}
+					<span>{{if .TargetURL}}<a href="{{.TargetURL}}">{{ctx.Locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
+				</div>
+			</div>
+		{{end}}
+		{{range .MissingRequiredChecks}}
+			<div class="commit-status-item">
+				{{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}}
+				<div class="status-context gt-ellipsis">{{.}}</div>
+				<div class="ui label">{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}</div>
+			</div>
+		{{end}}
+	</div>
+</div>
+{{end}}
diff --git a/repo/pulls/tab_menu.tmpl b/repo/pulls/tab_menu.tmpl
new file mode 100644
index 0000000..8b192c4
--- /dev/null
+++ b/repo/pulls/tab_menu.tmpl
@@ -0,0 +1,28 @@
+<div class="ui pull tabs container">
+	<div class="ui top attached pull tabular menu">
+		<a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.Issue.Link}}">
+			{{svg "octicon-comment-discussion"}}
+			{{template "shared/misc/tabtitle" (ctx.Locale.Tr "repo.pulls.tab_conversation")}}
+			<span class="ui small label">{{.Issue.NumComments}}</span>
+		</a>
+		<a class="item {{if .PageIsPullCommits}}active{{end}}" {{if .NumCommits}}href="{{.Issue.Link}}/commits"{{end}}>
+			{{svg "octicon-git-commit"}}
+			{{template "shared/misc/tabtitle" (ctx.Locale.Tr "repo.pulls.tab_commits")}}
+			<span class="ui small label">{{if .NumCommits}}{{.NumCommits}}{{else}}-{{end}}</span>
+		</a>
+		<a class="item {{if .PageIsPullFiles}}active{{end}}" href="{{.Issue.Link}}/files">
+			{{svg "octicon-diff"}}
+			{{template "shared/misc/tabtitle" (ctx.Locale.Tr "repo.pulls.tab_files")}}
+			<span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span>
+		</a>
+		{{if or .Diff.TotalAddition .Diff.TotalDeletion}}
+		<span class="tw-ml-auto tw-pl-3 tw-whitespace-nowrap tw-pr-0 tw-font-bold tw-flex tw-items-center tw-gap-2">
+			<span><span class="text green">{{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}}</span> <span class="text red">{{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}</span></span>
+			<span class="diff-stats-bar">
+				<div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div>
+			</span>
+		</span>
+		{{end}}
+	</div>
+	<div class="ui tabs divider"></div>
+</div>
diff --git a/repo/pulse.tmpl b/repo/pulse.tmpl
new file mode 100644
index 0000000..5222633
--- /dev/null
+++ b/repo/pulse.tmpl
@@ -0,0 +1,231 @@
+<h2 class="ui header activity-header">
+	<span>{{DateUtils.AbsoluteLong .DateFrom}} - {{DateUtils.AbsoluteLong .DateUntil}}</span>
+	<!-- Period -->
+	<div class="ui floating dropdown jump filter">
+		<div class="ui basic compact button">
+			{{ctx.Locale.Tr "repo.activity.period.filter_label"}} <strong>{{.PeriodText}}</strong>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+		</div>
+		<div class="menu">
+			<a class="{{if eq .Period "daily"}}active {{end}}item" href="{{$.RepoLink}}/activity/daily">{{ctx.Locale.Tr "repo.activity.period.daily"}}</a>
+			<a class="{{if eq .Period "halfweekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/halfweekly">{{ctx.Locale.Tr "repo.activity.period.halfweekly"}}</a>
+			<a class="{{if eq .Period "weekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/weekly">{{ctx.Locale.Tr "repo.activity.period.weekly"}}</a>
+			<a class="{{if eq .Period "monthly"}}active {{end}}item" href="{{$.RepoLink}}/activity/monthly">{{ctx.Locale.Tr "repo.activity.period.monthly"}}</a>
+			<a class="{{if eq .Period "quarterly"}}active {{end}}item" href="{{$.RepoLink}}/activity/quarterly">{{ctx.Locale.Tr "repo.activity.period.quarterly"}}</a>
+			<a class="{{if eq .Period "semiyearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/semiyearly">{{ctx.Locale.Tr "repo.activity.period.semiyearly"}}</a>
+			<a class="{{if eq .Period "yearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/yearly">{{ctx.Locale.Tr "repo.activity.period.yearly"}}</a>
+		</div>
+	</div>
+</h2>
+
+{{if (or (.Permission.CanRead ctx.Consts.RepoUnitTypeIssues) (.Permission.CanRead ctx.Consts.RepoUnitTypePullRequests))}}
+<h4 class="ui top attached header">{{ctx.Locale.Tr "repo.activity.overview"}}</h4>
+<div class="ui attached segment two column grid">
+	{{if .Permission.CanRead ctx.Consts.RepoUnitTypePullRequests}}
+		<div class="column">
+			{{if gt .Activity.ActivePRCount 0}}
+			<div class="stats-table">
+				{{if gt .Activity.MergedPRPerc 0}}
+					<a href="#merged-pull-requests" class="table-cell tiny tw-bg-purple" style="width: {{.Activity.MergedPRPerc}}%"></a>
+				{{end}}
+				<a href="#proposed-pull-requests" class="table-cell tiny tw-bg-green"></a>
+			</div>
+			{{else}}
+			<div class="stats-table">
+				<a class="table-cell tiny tw-bg-grey"></a>
+			</div>
+			{{end}}
+			{{ctx.Locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount}}
+		</div>
+	{{end}}
+	{{if .Permission.CanRead ctx.Consts.RepoUnitTypeIssues}}
+		<div class="column">
+			{{if gt .Activity.ActiveIssueCount 0}}
+			<div class="stats-table">
+				{{if gt .Activity.ClosedIssuePerc 0}}
+					<a href="#closed-issues" class="table-cell tiny tw-bg-red" style="width: {{.Activity.ClosedIssuePerc}}%"></a>
+				{{end}}
+				<a href="#new-issues" class="table-cell tiny tw-bg-green"></a>
+			</div>
+			{{else}}
+			<div class="stats-table">
+				<a class="table-cell tiny background light grey"></a>
+			</div>
+			{{end}}
+			{{ctx.Locale.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount}}
+		</div>
+	{{end}}
+</div>
+<div class="ui attached segment horizontal segments">
+	{{if .Permission.CanRead ctx.Consts.RepoUnitTypePullRequests}}
+		<a href="#merged-pull-requests" class="ui attached segment text center">
+			<span class="text purple">{{svg "octicon-git-pull-request"}}</span> <strong>{{.Activity.MergedPRCount}}</strong><br>
+			{{ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n"}}
+		</a>
+		<a href="#proposed-pull-requests" class="ui attached segment text center">
+			<span class="text green">{{svg "octicon-git-branch"}}</span> <strong>{{.Activity.OpenedPRCount}}</strong><br>
+			{{ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n"}}
+		</a>
+	{{end}}
+	{{if .Permission.CanRead ctx.Consts.RepoUnitTypeIssues}}
+		<a href="#closed-issues" class="ui attached segment text center">
+			<span class="text red">{{svg "octicon-issue-closed"}}</span> <strong>{{.Activity.ClosedIssueCount}}</strong><br>
+			{{ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.closed_issues_count_1" "repo.activity.closed_issues_count_n"}}
+		</a>
+		<a href="#new-issues" class="ui attached segment text center">
+			<span class="text green">{{svg "octicon-issue-opened"}}</span> <strong>{{.Activity.OpenedIssueCount}}</strong><br>
+			{{ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n"}}
+		</a>
+	{{end}}
+</div>
+{{end}}
+
+{{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
+	{{if eq .Activity.Code.CommitCountInAllBranches 0}}
+		<div class="ui center aligned segment">
+		<h4 class="ui header">{{ctx.Locale.Tr "repo.activity.no_git_activity"}}</h4>
+		</div>
+	{{end}}
+	{{if gt .Activity.Code.CommitCountInAllBranches 0}}
+		<div class="ui attached segment horizontal segments">
+			<div class="ui attached segment text">
+				{{ctx.Locale.Tr "repo.activity.git_stats_exclude_merges"}}
+				<strong>{{ctx.Locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n" .Activity.Code.AuthorCount}}</strong>
+				{{ctx.Locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n"}}
+				<strong>{{ctx.Locale.TrN .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCount}}</strong>
+				{{ctx.Locale.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch}}
+				<strong>{{ctx.Locale.TrN .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCountInAllBranches}}</strong>
+				{{ctx.Locale.Tr "repo.activity.git_stats_push_to_all_branches"}}
+				{{ctx.Locale.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch}}
+				<strong>{{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}}</strong>
+				{{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}}
+				{{ctx.Locale.Tr "repo.activity.git_stats_additions"}}
+				<strong class="text green">{{ctx.Locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}}</strong>
+				{{ctx.Locale.Tr "repo.activity.git_stats_and_deletions"}}
+				<strong class="text red">{{ctx.Locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}</strong>.
+			</div>
+			<div class="ui attached segment">
+				<div id="repo-activity-top-authors-chart"></div>
+			</div>
+		</div>
+	{{end}}
+{{end}}
+
+{{if gt .Activity.PublishedReleaseCount 0}}
+	<h4 class="divider divider-text" id="published-releases">
+		{{svg "octicon-tag" 16 "tw-mr-2"}}
+		{{ctx.Locale.Tr "repo.activity.title.releases_published_by"
+			(ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount)
+			(ctx.Locale.TrN .Activity.PublishedReleaseAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.PublishedReleaseAuthorCount)
+		}}
+	</h4>
+	<div class="list">
+		{{range .Activity.PublishedReleases}}
+			<p class="desc">
+				<span class="ui green label">{{ctx.Locale.Tr "repo.activity.published_release_label"}}</span>
+				{{.TagName}}
+				{{if not .IsTag}}
+					<a class="title" href="{{$.RepoLink}}/src/{{.TagName | PathEscapeSegments}}">{{.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+				{{end}}
+				{{DateUtils.TimeSince .CreatedUnix}}
+			</p>
+		{{end}}
+	</div>
+{{end}}
+
+{{if gt .Activity.MergedPRCount 0}}
+	<h4 class="divider divider-text" id="merged-pull-requests">
+		{{svg "octicon-git-pull-request" 16 "tw-mr-2"}}
+		{{ctx.Locale.Tr "repo.activity.title.prs_merged_by"
+			(ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount)
+			(ctx.Locale.TrN .Activity.MergedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.MergedPRAuthorCount)
+		}}
+	</h4>
+	<div class="list">
+		{{range .Activity.MergedPRs}}
+			<p class="desc">
+				<span class="ui purple label">{{ctx.Locale.Tr "repo.activity.merged_prs_label"}}</span>
+				#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+				{{DateUtils.TimeSince .MergedUnix}}
+			</p>
+		{{end}}
+	</div>
+{{end}}
+
+{{if gt .Activity.OpenedPRCount 0}}
+	<h4 class="divider divider-text" id="proposed-pull-requests">
+		{{svg "octicon-git-branch" 16 "tw-mr-2"}}
+		{{ctx.Locale.Tr "repo.activity.title.prs_opened_by"
+			(ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount)
+			(ctx.Locale.TrN .Activity.OpenedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedPRAuthorCount)
+		}}
+	</h4>
+	<div class="list">
+		{{range .Activity.OpenedPRs}}
+			<p class="desc">
+				<span class="ui green label">{{ctx.Locale.Tr "repo.activity.opened_prs_label"}}</span>
+				#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+				{{DateUtils.TimeSince .Issue.CreatedUnix}}
+			</p>
+		{{end}}
+	</div>
+{{end}}
+
+{{if gt .Activity.ClosedIssueCount 0}}
+	<h4 class="divider divider-text" id="closed-issues">
+		{{svg "octicon-issue-closed" 16 "tw-mr-2"}}
+		{{ctx.Locale.Tr "repo.activity.title.issues_closed_from"
+			(ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount)
+			(ctx.Locale.TrN .Activity.ClosedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.ClosedIssueAuthorCount)
+		}}
+	</h4>
+	<div class="list">
+		{{range .Activity.ClosedIssues}}
+			<p class="desc">
+				<span class="ui red label">{{ctx.Locale.Tr "repo.activity.closed_issue_label"}}</span>
+				#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+				{{DateUtils.TimeSince .ClosedUnix}}
+			</p>
+		{{end}}
+	</div>
+{{end}}
+
+{{if gt .Activity.OpenedIssueCount 0}}
+	<h4 class="divider divider-text" id="new-issues">
+		{{svg "octicon-issue-opened" 16 "tw-mr-2"}}
+		{{ctx.Locale.Tr "repo.activity.title.issues_created_by"
+			(ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount)
+			(ctx.Locale.TrN .Activity.OpenedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedIssueAuthorCount)
+		}}
+	</h4>
+	<div class="list">
+		{{range .Activity.OpenedIssues}}
+			<p class="desc">
+				<span class="ui green label">{{ctx.Locale.Tr "repo.activity.new_issue_label"}}</span>
+				#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+				{{DateUtils.TimeSince .CreatedUnix}}
+			</p>
+		{{end}}
+	</div>
+{{end}}
+
+{{if gt .Activity.UnresolvedIssueCount 0}}
+	<h4 class="divider divider-text" id="unresolved-conversations" data-tooltip-content="{{ctx.Locale.Tr "repo.activity.unresolved_conv_desc"}}">
+		{{svg "octicon-comment-discussion" 16 "tw-mr-2"}}
+		{{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}}
+	</h4>
+	<div class="list">
+		{{range .Activity.UnresolvedIssues}}
+			<p class="desc">
+				<span class="ui green label">{{ctx.Locale.Tr "repo.activity.unresolved_conv_label"}}</span>
+				#{{.Index}}
+				{{if .IsPull}}
+				<a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+				{{else}}
+				<a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+				{{end}}
+				{{DateUtils.TimeSince .UpdatedUnix}}
+			</p>
+		{{end}}
+	</div>
+{{end}}
diff --git a/repo/recent_commits.tmpl b/repo/recent_commits.tmpl
new file mode 100644
index 0000000..cfa8fab
--- /dev/null
+++ b/repo/recent_commits.tmpl
@@ -0,0 +1,9 @@
+{{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
+	<div id="repo-recent-commits-chart"
+		data-locale-loading-title="{{ctx.Locale.Tr "graphs.component_loading" (ctx.Locale.Tr "graphs.recent_commits.what")}}"
+		data-locale-loading-title-failed="{{ctx.Locale.Tr "graphs.component_loading_failed" (ctx.Locale.Tr "graphs.recent_commits.what")}}"
+		data-locale-loading-info="{{ctx.Locale.Tr "graphs.component_loading_info"}}"
+		data-locale-component-failed-to-load="{{ctx.Locale.Tr "graphs.component_failed_to_load"}}"
+	>
+	</div>
+{{end}}
diff --git a/repo/release/label.tmpl b/repo/release/label.tmpl
new file mode 100644
index 0000000..eacb3e3
--- /dev/null
+++ b/repo/release/label.tmpl
@@ -0,0 +1,14 @@
+{{/*
+Template Attributes:
+* Release: the release
+* IsLatest: boolean indicating whether this is the latest release, optional
+*/}}
+{{if .IsLatest}}
+	<span class="ui green label">{{ctx.Locale.Tr "repo.release.latest"}}</span>
+{{else if .Release.IsDraft}}
+	<span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span>
+{{else if .Release.IsPrerelease}}
+	<span class="ui orange label">{{ctx.Locale.Tr "repo.release.prerelease"}}</span>
+{{else if (not .Release.IsTag)}}
+	<span class="ui green label">{{ctx.Locale.Tr "repo.release.stable"}}</span>
+{{end}}
diff --git a/repo/release/list.tmpl b/repo/release/list.tmpl
new file mode 100644
index 0000000..99934d2
--- /dev/null
+++ b/repo/release/list.tmpl
@@ -0,0 +1,121 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository releases">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		{{template "repo/release_tag_header" .}}
+		<ul id="release-list">
+			{{range $idx, $info := .Releases}}
+				{{$release := $info.Release}}
+				<li class="release-entry">
+					<div class="meta">
+						<a class="muted" href="{{if not (and $release.Sha1 ($.Permission.CanRead ctx.Consts.RepoUnitTypeCode))}}#{{else}}{{$.RepoLink}}/src/tag/{{$release.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "tw-mr-1"}}{{$release.TagName}}</a>
+						{{if and $release.Sha1 ($.Permission.CanRead ctx.Consts.RepoUnitTypeCode)}}
+							<a class="muted tw-font-mono" href="{{$.RepoLink}}/src/commit/{{$release.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "tw-mr-1"}}{{ShortSha $release.Sha1}}</a>
+							{{$compareTarget := ""}}
+							{{if $release.IsDraft}}
+									{{$compareTarget = $release.Target}}
+							{{else if $release.TagName}}
+									{{$compareTarget = $release.TagName}}
+							{{else}}
+								{{$compareTarget = $release.Sha1}}
+							{{end}}
+							{{template "repo/branch_dropdown" dict
+								"Repository" $.Repository
+								"ShowTabTags" true
+								"DropdownFixedText" (ctx.Locale.Tr "repo.release.compare")
+								"RefLinkTemplate" (print "{RepoLink}/compare/{RefShortName}..." (PathEscapeSegments $compareTarget))
+							}}
+						{{end}}
+					</div>
+					<div class="ui segment detail">
+						<div class="tw-flex tw-items-center tw-justify-between tw-flex-wrap tw-mb-2">
+							<h4 class="release-list-title tw-break-anywhere">
+								{{if $.PageIsSingleTag}}{{$release.Title}}{{else}}<a class="muted" href="{{$.RepoLink}}/releases/tag/{{$release.TagName | PathEscapeSegments}}">{{$release.Title}}</a>{{end}}
+								{{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "tw-flex"}}
+								{{template "repo/release/label" (dict "Release" $release)}}
+							</h4>
+							<div>
+								{{if and $.CanCreateRelease (not $.PageIsSingleTag)}}
+									<a class="muted" data-tooltip-content="{{ctx.Locale.Tr "repo.release.edit"}}" href="{{$.RepoLink}}/releases/edit/{{$release.TagName | PathEscapeSegments}}" rel="nofollow">
+										{{svg "octicon-pencil"}}
+									</a>
+								{{end}}
+							</div>
+						</div>
+						<p class="text grey">
+							<span class="author">
+							{{if $release.OriginalAuthor}}
+								{{svg (MigrationIcon $release.Repo.GetOriginalURLHostname) 20 "tw-mr-1"}}{{$release.OriginalAuthor}}
+							{{else if $release.Publisher}}
+								{{ctx.AvatarUtils.Avatar $release.Publisher 20 "tw-mr-1"}}
+								<a href="{{$release.Publisher.HomeLink}}">{{$release.Publisher.GetDisplayName}}</a>
+							{{else}}
+								Ghost
+							{{end}}
+							</span>
+							<span class="released">
+								{{ctx.Locale.Tr "repo.released_this"}}
+							</span>
+							{{if $release.CreatedUnix}}
+								<span class="time">{{DateUtils.TimeSince $release.CreatedUnix}}</span>
+							{{end}}
+							{{if and (not $release.IsDraft) ($.Permission.CanRead ctx.Consts.RepoUnitTypeCode)}}
+								| <span class="ahead"><a href="{{$.RepoLink}}/compare/{{$release.TagName | PathEscapeSegments}}...{{$release.TargetBehind | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.release.ahead.commits" $release.NumCommitsBehind}}</a> {{ctx.Locale.Tr "repo.release.ahead.target" $release.TargetBehind}}</span>
+							{{end}}
+						</p>
+						<div class="markup desc">
+							{{$release.RenderedNote}}
+						</div>
+						<div class="divider"></div>
+						<details class="download" {{if eq $idx 0}}open{{end}}>
+							<summary>
+								{{ctx.Locale.Tr "repo.release.downloads"}}
+							</summary>
+							<ul class="list">
+								{{if and (not $.DisableDownloadSourceArchives) (not $release.IsDraft) ($.Permission.CanRead ctx.Consts.RepoUnitTypeCode)}}
+									<li>
+										<a class="archive-link" href="{{$.RepoLink}}/archive/{{$release.TagName | PathEscapeSegments}}.zip" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "download-icon"}}{{ctx.Locale.Tr "repo.release.source_code"}} (ZIP)</strong></a>
+									</li>
+									<li>
+										<a class="archive-link" href="{{$.RepoLink}}/archive/{{$release.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "download-icon"}}{{ctx.Locale.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a>
+									</li>
+								{{end}}
+								{{range $release.Attachments}}
+									<li>
+										<a target="_blank" rel="nofollow" href="{{.DownloadURL}}" download>
+											<strong>{{svg "octicon-package" 16 "download-icon"}}{{.Name}}</strong>
+										</a>
+										<div>
+											<span class="text grey">{{.Size | FileSize}}</span>
+											<span data-tooltip-content="{{ctx.Locale.Tr "repo.release.download_count" (ctx.Locale.PrettyNumber .DownloadCount)}}">
+												{{svg "octicon-info"}}
+											</span>
+										</div>
+									</li>
+								{{end}}
+							</ul>
+						</details>
+					</div>
+				</li>
+			{{end}}
+		</ul>
+
+		{{template "base/paginate" .}}
+	</div>
+</div>
+
+{{if (and ($.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) .PageIsTagList)}}
+	<div class="ui g-modal-confirm delete modal">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "repo.release.delete_tag"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "repo.release.deletion_tag_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+{{end}}
+
+{{template "base/footer" .}}
diff --git a/repo/release/new.tmpl b/repo/release/new.tmpl
new file mode 100644
index 0000000..574b0d0
--- /dev/null
+++ b/repo/release/new.tmpl
@@ -0,0 +1,149 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository new release">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<h2 class="ui dividing header">
+			{{if .PageIsEditRelease}}
+				{{ctx.Locale.Tr "repo.release.edit_release"}}
+				<div class="sub header">{{ctx.Locale.Tr "repo.release.edit_subheader"}}</div>
+			{{else}}
+				{{ctx.Locale.Tr "repo.release.new_release"}}
+				<div class="sub header">{{ctx.Locale.Tr "repo.release.new_subheader"}}</div>
+			{{end}}
+		</h2>
+		{{template "base/alert" .}}
+		<form class="ui form" action="{{.Link}}" method="post">
+			{{.CsrfTokenHtml}}
+			<div class="ui seven wide target">
+				<div class="inline field {{if .Err_TagName}}error{{end}}">
+					{{if .PageIsEditRelease}}
+						<b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
+					{{else}}
+						<input id="tag-name" name="tag_name" value="{{.tag_name}}" aria-label="{{ctx.Locale.Tr "repo.release.tag_name"}}" placeholder="{{ctx.Locale.Tr "repo.release.tag_name"}}" autofocus required maxlength="255">
+						<input id="tag-name-editor" type="hidden" data-existing-tags="{{JsonUtils.EncodeToString .Tags}}" data-tag-helper="{{ctx.Locale.Tr "repo.release.tag_helper"}}" data-tag-helper-new="{{ctx.Locale.Tr "repo.release.tag_helper_new"}}" data-tag-helper-existing="{{ctx.Locale.Tr "repo.release.tag_helper_existing"}}">
+						<div id="tag-target-selector" class="tw-inline-block">
+							<span class="at">@</span>
+							<div class="ui selection dropdown">
+								<input type="hidden" name="tag_target" value="{{.tag_target}}">
+								{{svg "octicon-git-branch"}}
+								<div class="text">
+									{{ctx.Locale.Tr "repo.release.target"}} :
+									<strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong>
+								</div>
+								{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+								<div class="menu">
+									{{range .Branches}}
+										<div class="item" data-value="{{.}}">{{.}}</div>
+									{{end}}
+								</div>
+							</div>
+						</div>
+						<div>
+							<span id="tag-helper" class="help tw-mt-2 tw-pb-0">{{ctx.Locale.Tr "repo.release.tag_helper"}}</span>
+						</div>
+					{{end}}
+				</div>
+			</div>
+			<div class="eleven wide tw-pt-0">
+				<div class="field {{if .Err_Title}}error{{end}}">
+					<input name="title" aria-label="{{ctx.Locale.Tr "repo.release.title"}}" placeholder="{{ctx.Locale.Tr "repo.release.title"}}" value="{{.title}}" autofocus maxlength="255">
+				</div>
+				<div class="field">
+					{{template "shared/combomarkdowneditor" (dict
+						"MarkdownPreviewInRepo" $.Repository
+						"MarkdownPreviewMode" "comment"
+						"TextareaName" "content"
+						"TextareaContent" .content
+						"TextareaPlaceholder" (ctx.Locale.Tr "repo.release.message")
+						"DropzoneParentContainer" "form"
+					)}}
+				</div>
+				{{range .attachments}}
+					<div class="field flex-text-block" id="attachment-{{.ID}}">
+						<div class="flex-text-inline tw-flex-1">
+							<input name="attachment-edit-{{.UUID}}"  class="attachment_edit" required value="{{.Name}}">
+							<input name="attachment-del-{{.UUID}}" type="hidden" value="false">
+							<span class="ui text grey tw-whitespace-nowrap">{{.Size | FileSize}}</span>
+							<span data-tooltip-content="{{ctx.Locale.Tr "repo.release.download_count" (ctx.Locale.PrettyNumber .DownloadCount)}}">
+								{{svg "octicon-info"}}
+							</span>
+						</div>
+						<a class="ui mini compact red button remove-rel-attach" data-id="{{.ID}}" data-uuid="{{.UUID}}">
+							{{ctx.Locale.Tr "remove"}}
+						</a>
+					</div>
+				{{end}}
+				{{if .IsAttachmentEnabled}}
+					<div class="field">
+						{{template "repo/upload" .}}
+					</div>
+				{{end}}
+			</div>
+			<div class="divider"></div>
+			<div class="ui">
+				<div>
+					{{if not .PageIsEditRelease}}
+						<div class="tag-message field">
+							<div class="ui checkbox">
+								<input type="checkbox" name="add_tag_msg">
+								<label><strong>{{ctx.Locale.Tr "repo.release.add_tag_msg"}}</strong></label>
+							</div>
+						</div>
+					{{else}}
+						<input type="hidden" name="add_tag_msg" value="false">
+					{{end}}
+					<div class="prerelease field">
+						<div class="ui checkbox">
+							<input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}>
+							<label><strong>{{ctx.Locale.Tr "repo.release.prerelease_desc"}}</strong></label>
+						</div>
+					</div>
+					<span class="help">{{ctx.Locale.Tr "repo.release.prerelease_helper"}}</span>
+					<div class="divider tw-mt-0"></div>
+					<div class="tw-flex tw-justify-end">
+						{{if .PageIsEditRelease}}
+							<a class="ui small button" href="{{.RepoLink}}/releases">
+								{{ctx.Locale.Tr "repo.release.cancel"}}
+							</a>
+							<a class="ui small red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}">
+								{{ctx.Locale.Tr "repo.release.delete_release"}}
+							</a>
+							{{if .IsDraft}}
+								<button class="ui small button" type="submit" name="draft" value="{{ctx.Locale.Tr "repo.release.save_draft"}}">{{ctx.Locale.Tr "repo.release.save_draft"}}</button>
+								<button class="ui small primary button">
+									{{ctx.Locale.Tr "repo.release.publish"}}
+								</button>
+							{{else}}
+								<button class="ui small primary button">
+									{{ctx.Locale.Tr "repo.release.edit_release"}}
+								</button>
+							{{end}}
+						{{else}}
+							{{if not .tag_name}}
+								<button class="ui small button" name="tag_only" value="1">{{ctx.Locale.Tr "repo.release.add_tag"}}</button>
+							{{end}}
+							<button class="ui small button" name="draft" value="1">{{ctx.Locale.Tr "repo.release.save_draft"}}</button>
+							<button class="ui small primary button">
+								{{ctx.Locale.Tr "repo.release.publish"}}
+							</button>
+						{{end}}
+					</div>
+				</div>
+			</div>
+		</form>
+	</div>
+</div>
+
+{{if .PageIsEditRelease}}
+	<div class="ui g-modal-confirm delete modal">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "repo.release.deletion"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "repo.release.deletion_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+{{end}}
+{{template "base/footer" .}}
diff --git a/repo/release_tag_header.tmpl b/repo/release_tag_header.tmpl
new file mode 100644
index 0000000..f96c768
--- /dev/null
+++ b/repo/release_tag_header.tmpl
@@ -0,0 +1,29 @@
+{{$canReadReleases := $.Permission.CanRead ctx.Consts.RepoUnitTypeReleases}}
+{{$canReadCode := $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
+
+{{if $canReadReleases}}
+	<div class="tw-flex">
+		<div class="tw-flex-1 tw-flex tw-items-center">
+			<h2 class="ui compact small menu small-menu-items">
+				<a class="{{if and .PageIsReleaseList (not .PageIsSingleTag)}}active {{end}}item" href="{{.RepoLink}}/releases">{{ctx.Locale.PrettyNumber .NumReleases}} {{ctx.Locale.TrN .NumReleases "repo.release" "repo.releases"}}</a>
+				{{if $canReadCode}}
+					<a class="{{if or .PageIsTagList .PageIsSingleTag}}active {{end}}item" href="{{.RepoLink}}/tags">{{ctx.Locale.PrettyNumber .NumTags}} {{ctx.Locale.TrN .NumTags "repo.tag" "repo.tags"}}</a>
+				{{end}}
+			</h2>
+		</div>
+		{{if .EnableFeed}}
+			<a class="ui small button" href="{{.RepoLink}}/{{if .PageIsTagList}}tags{{else}}releases{{end}}.rss">
+				{{svg "octicon-rss" 16}} {{ctx.Locale.Tr "rss_feed"}}
+			</a>
+		{{end}}
+		{{if and (not .PageIsTagList) .CanCreateRelease}}
+			<a class="ui small primary button" href="{{$.RepoLink}}/releases/new{{if .PageIsSingleTag}}?tag={{.TagName}}{{end}}">
+				{{ctx.Locale.Tr "repo.release.new_release"}}
+			</a>
+		{{end}}
+	</div>
+	<div class="divider"></div>
+{{else if $canReadCode}}
+	{{/* if the "repo.releases" unit is disabled, only show the "commits / branches / tags" sub menu */}}
+	{{template "repo/sub_menu" .}}
+{{end}}
diff --git a/repo/search.tmpl b/repo/search.tmpl
new file mode 100644
index 0000000..3f5b22b
--- /dev/null
+++ b/repo/search.tmpl
@@ -0,0 +1,8 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository file list">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "shared/search/code/search" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/search_name.tmpl b/repo/search_name.tmpl
new file mode 100644
index 0000000..951f168
--- /dev/null
+++ b/repo/search_name.tmpl
@@ -0,0 +1 @@
+<span class="gt-ellipsis">{{.Name}}{{if DefaultShowFullName}}<span class="search-fullname"> {{.FullName}}</span>{{end}}</span>
diff --git a/repo/settings/actions.tmpl b/repo/settings/actions.tmpl
new file mode 100644
index 0000000..f38ab5b
--- /dev/null
+++ b/repo/settings/actions.tmpl
@@ -0,0 +1,11 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings actions")}}
+	<div class="repo-setting-content">
+		{{if eq .PageType "runners"}}
+			{{template "shared/actions/runner_list" .}}
+		{{else if eq .PageType "secrets"}}
+			{{template "shared/secrets/add_list" .}}
+		{{else if eq .PageType "variables"}}
+			{{template "shared/variables/variable_list" .}}
+		{{end}}
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/branches.tmpl b/repo/settings/branches.tmpl
new file mode 100644
index 0000000..57d9f2c
--- /dev/null
+++ b/repo/settings/branches.tmpl
@@ -0,0 +1,79 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit")}}
+	<div class="repo-setting-content">
+		{{if .Repository.IsArchived}}
+			<div class="ui warning message tw-text-center">
+				{{ctx.Locale.Tr "repo.settings.archive.branchsettings_unavailable"}}
+			</div>
+		{{else}}
+			<h4 class="ui top attached header">
+				{{ctx.Locale.Tr "repo.default_branch"}}
+			</h4>
+			<div class="ui attached segment">
+				<p>
+					{{ctx.Locale.Tr "repo.settings.default_branch_desc"}}
+				</p>
+				<form class="tw-flex" action="{{.Link}}" method="post">
+					{{.CsrfTokenHtml}}
+					<input type="hidden" name="action" value="default_branch">
+					<div class="ui dropdown selection search tw-flex-1 tw-mr-2 tw-max-w-96">
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<input type="hidden" name="branch" value="{{.Repository.DefaultBranch}}">
+						<div class="default text">{{.Repository.DefaultBranch}}</div>
+						<div class="menu">
+							{{range .Branches}}
+								<div class="item" data-value="{{.}}">{{.}}</div>
+							{{end}}
+						</div>
+					</div>
+					<button class="ui primary button"{{if .Repository.IsEmpty}} disabled{{end}}>{{ctx.Locale.Tr "repo.settings.branches.update_default_branch"}}</button>
+				</form>
+			</div>
+
+			<h4 class="ui top attached header">
+				{{ctx.Locale.Tr "repo.settings.protected_branch"}}
+				<div class="ui right">
+					<a class="ui primary tiny button" href="{{$.Repository.Link}}/settings/branches/edit">{{ctx.Locale.Tr "repo.settings.branches.add_new_rule"}}</a>
+				</div>
+			</h4>
+
+			<div class="ui attached segment">
+				<div class="flex-list" id="protected-branches-list" data-update-priority-url="{{$.Repository.Link}}/settings/branches/priority">
+					{{range .ProtectedBranches}}
+						<div class="flex-item tw-items-center item" data-id="{{.ID}}" >
+							<div class="drag-handle tw-cursor-grab">
+								{{svg "octicon-grabber" 16}}
+							</div>
+							<div class="flex-item-main">
+								<div class="flex-item-title">
+									<div class="ui basic primary label">{{.RuleName}}</div>
+								</div>
+							</div>
+							<div class="flex-item-trailing">
+								<a class="rm ui tiny button" href="{{$.Repository.Link}}/settings/branches/edit?rule_name={{.RuleName}}">{{ctx.Locale.Tr "repo.settings.edit_protected_branch"}}</a>
+								<button class="ui red tiny button delete-button" data-url="{{$.Repository.Link}}/settings/branches/{{.ID}}/delete" data-id="{{.ID}}">
+									{{ctx.Locale.Tr "repo.settings.protected_branch.delete_rule"}}
+								</button>
+							</div>
+						</div>
+					{{else}}
+						<div class="flex-item center aligned">
+							{{ctx.Locale.Tr "repo.settings.no_protected_branch"}}
+						</div>
+					{{end}}
+				</div>
+			</div>
+		{{end}}
+	</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.settings.protected_branch_deletion"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.settings.protected_branch_deletion_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/collaboration.tmpl b/repo/settings/collaboration.tmpl
new file mode 100644
index 0000000..9f90f0a
--- /dev/null
+++ b/repo/settings/collaboration.tmpl
@@ -0,0 +1,117 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings collaboration")}}
+	<div class="repo-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.collaboration"}}
+		</h4>
+		{{if .Collaborators}}
+		<div class="ui attached segment">
+			<div class="flex-list">
+				{{range .Collaborators}}
+					<div class="flex-item tw-items-center">
+						<div class="flex-item-leading">
+							<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a>
+						</div>
+						<div class="flex-item-main">
+							<div class="flex-item-title">
+								{{template "shared/user/name" .}}
+							</div>
+						</div>
+						<div class="flex-item-trailing">
+							<div class="flex-text-block">
+								{{svg "octicon-shield-lock"}}
+								<div class="ui dropdown custom access-mode" data-url="{{$.Link}}/access_mode" data-uid="{{.ID}}" data-last-value="{{.Collaboration.Mode}}">
+									<div class="text">{{if eq .Collaboration.Mode 1}}{{ctx.Locale.Tr "repo.settings.collaboration.read"}}{{else if eq .Collaboration.Mode 2}}{{ctx.Locale.Tr "repo.settings.collaboration.write"}}{{else if eq .Collaboration.Mode 3}}{{ctx.Locale.Tr "repo.settings.collaboration.admin"}}{{else}}{{ctx.Locale.Tr "repo.settings.collaboration.undefined"}}{{end}}</div>
+									{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+									<div class="menu">
+										<div class="item" data-value="3">{{ctx.Locale.Tr "repo.settings.collaboration.admin"}}</div>
+										<div class="item" data-value="2">{{ctx.Locale.Tr "repo.settings.collaboration.write"}}</div>
+										<div class="item" data-value="1">{{ctx.Locale.Tr "repo.settings.collaboration.read"}}</div>
+									</div>
+								</div>
+							</div>
+							<button class="ui red tiny button inline delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
+								{{ctx.Locale.Tr "repo.settings.delete_collaborator"}}
+							</button>
+						</div>
+					</div>
+				{{end}}
+			</div>
+		</div>
+		{{end}}
+		<div class="ui bottom attached segment">
+			<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<div id="search-user-box" class="ui search input tw-align-middle">
+					<input class="prompt" name="collaborator" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" autofocus required>
+				</div>
+				<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_collaborator"}}</button>
+			</form>
+		</div>
+
+		{{if .RepoOwnerIsOrganization}}
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.teams"}}
+		</h4>
+		{{$allowedToChangeTeams := (or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner))}}
+		{{if .Teams}}
+		<div class="ui attached segment">
+			<div class="flex-list">
+				{{range $t, $team := .Teams}}
+					<div class="flex-item">
+						<div class="flex-item-main">
+							<a class="flex-item-title text primary" href="{{AppSubUrl}}/org/{{$.OrgName|PathEscape}}/teams/{{.LowerName|PathEscape}}">
+								{{.Name}}
+							</a>
+							<div class="flex-item-body flex-text-block">
+								{{svg "octicon-shield-lock"}}
+								{{if eq .AccessMode 1}}{{ctx.Locale.Tr "repo.settings.collaboration.read"}}{{else if eq .AccessMode 2}}{{ctx.Locale.Tr "repo.settings.collaboration.write"}}{{else if eq .AccessMode 3}}{{ctx.Locale.Tr "repo.settings.collaboration.admin"}}{{else if eq .AccessMode 4}}{{ctx.Locale.Tr "repo.settings.collaboration.owner"}}{{else}}{{ctx.Locale.Tr "repo.settings.collaboration.undefined"}}{{end}}
+							</div>
+							{{if or (eq .AccessMode 1) (eq .AccessMode 2)}}
+								{{$first := true}}
+								<div class="flex-item-body" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.change_team_permission_tip"}}">
+									Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled ctx $unit.Type) ($team.UnitEnabled ctx $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{ctx.Locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}}
+								</div>
+							{{end}}
+						</div>
+						{{if $allowedToChangeTeams}}
+							<div class="flex-item-trailing" {{if .IncludesAllRepositories}} data-tooltip-content="{{ctx.Locale.Tr "repo.settings.delete_team_tip"}}"{{end}}>
+								<button class="ui red tiny button inline delete-button {{if .IncludesAllRepositories}}disabled{{end}}" data-url="{{$.Link}}/team/delete" data-id="{{.ID}}">
+										{{ctx.Locale.Tr "repo.settings.delete_collaborator"}}
+								</button>
+							</div>
+						{{end}}
+					</div>
+				{{end}}
+			</div>
+		</div>
+		{{end}}
+		<div class="ui bottom attached segment">
+			{{if $allowedToChangeTeams}}
+				<form class="ui form" id="repo-collab-team-form" action="{{.Link}}/team" method="post">
+					{{.CsrfTokenHtml}}
+					<div id="search-team-box" class="ui search input tw-align-middle" data-org-name="{{.OrgName}}">
+						<input class="prompt" name="team" placeholder="{{ctx.Locale.Tr "search.team_kind"}}" autocomplete="off" autofocus required>
+					</div>
+					<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_team"}}</button>
+				</form>
+			{{else}}
+				<div class="item">
+					{{ctx.Locale.Tr "repo.settings.change_team_access_not_allowed"}}
+				</div>
+			{{end}}
+		</div>
+		{{end}}
+	</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.settings.collaborator_deletion"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.settings.collaborator_deletion_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/deploy_keys.tmpl b/repo/settings/deploy_keys.tmpl
new file mode 100644
index 0000000..5eb2a47
--- /dev/null
+++ b/repo/settings/deploy_keys.tmpl
@@ -0,0 +1,86 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings")}}
+	<div class="repo-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.deploy_keys"}}
+			<div class="ui right">
+			{{if not .DisableSSH}}
+				<button class="ui primary tiny show-panel toggle button" data-panel="#add-deploy-key-panel">{{ctx.Locale.Tr "repo.settings.add_deploy_key"}}</button>
+			{{else}}
+				<button class="ui primary tiny button disabled">{{ctx.Locale.Tr "settings.ssh_disabled"}}</button>
+			{{end}}
+			</div>
+		</h4>
+		<div class="ui attached segment">
+			<div class="{{if not .HasError}}tw-hidden{{end}} tw-mb-4" id="add-deploy-key-panel">
+				<form class="ui form" action="{{.Link}}" method="post">
+					{{.CsrfTokenHtml}}
+					<div class="field">
+						{{ctx.Locale.Tr "repo.settings.deploy_key_desc"}}
+					</div>
+					<div class="field {{if .Err_Title}}error{{end}}">
+						<label for="ssh-key-title">{{ctx.Locale.Tr "repo.settings.title"}}</label>
+						<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
+					</div>
+					<div class="field {{if .Err_Content}}error{{end}}">
+						<label for="ssh-key-content">{{ctx.Locale.Tr "repo.settings.deploy_key_content"}}</label>
+						<textarea id="ssh-key-content" name="content" placeholder="{{ctx.Locale.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
+					</div>
+					<div class="field">
+						<div class="ui checkbox {{if .Err_IsWritable}}error{{end}}">
+							<input id="ssh-key-is-writable" name="is_writable" type="checkbox" value="1">
+							<label for="ssh-key-is-writable">
+								{{ctx.Locale.Tr "repo.settings.is_writable"}}
+							</label>
+							<small class="tw-pl-[26px]">{{ctx.Locale.Tr "repo.settings.is_writable_info"}}</small>
+						</div>
+					</div>
+					<button class="ui primary button">
+						{{ctx.Locale.Tr "repo.settings.add_deploy_key"}}
+					</button>
+					<button class="ui hide-panel button" data-panel="#add-deploy-key-panel">
+						{{ctx.Locale.Tr "cancel"}}
+					</button>
+				</form>
+			</div>
+			{{if .Deploykeys}}
+				<div class="flex-list">
+					{{range .Deploykeys}}
+						<div class="flex-item">
+							<div class="flex-item-leading">
+								<span class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{ctx.Locale.Tr "settings.key_state_desc"}}"{{end}}>{{svg "octicon-key" 32}}</span>
+							</div>
+							<div class="flex-item-main">
+								<div class="flex-item-title">{{.Name}}</div>
+								<div class="flex-item-body">
+									{{.Fingerprint}}
+								</div>
+								<div class="flex-item-body">
+									<i>{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} —  {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateUtils.AbsoluteShort .UpdatedUnix}}</span>{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}} - <span>{{ctx.Locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{ctx.Locale.Tr "settings.can_write_info"}} {{end}}</span></i>
+								</div>
+							</div>
+							<div class="flex-item-trailing">
+								<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
+									{{ctx.Locale.Tr "settings.delete_key"}}
+								</button>
+							</div>
+						</div>
+					{{end}}
+				</div>
+			{{else}}
+				{{ctx.Locale.Tr "repo.settings.no_deploy_keys"}}
+			{{end}}
+		</div>
+	</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.settings.deploy_key_deletion"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/githook_edit.tmpl b/repo/settings/githook_edit.tmpl
new file mode 100644
index 0000000..e20f51b
--- /dev/null
+++ b/repo/settings/githook_edit.tmpl
@@ -0,0 +1,27 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit githook")}}
+	<div class="repo-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.githooks"}}
+		</h4>
+		<div class="ui attached segment">
+			<p>{{ctx.Locale.Tr "repo.settings.githook_edit_desc"}}</p>
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				{{with .Hook}}
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.settings.githook_name"}}</label>
+						<span class="hook-filename">{{.Name}}</span>
+					</div>
+					<div class="field">
+						<label for="content">{{ctx.Locale.Tr "repo.settings.githook_content"}}</label>
+						<textarea id="content" name="content" class="tw-hidden">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
+						<div class="editor-loading is-loading"></div>
+					</div>
+					<div class="inline field">
+						<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_githook"}}</button>
+					</div>
+				{{end}}
+			</form>
+		</div>
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/githooks.tmpl b/repo/settings/githooks.tmpl
new file mode 100644
index 0000000..1a603f9
--- /dev/null
+++ b/repo/settings/githooks.tmpl
@@ -0,0 +1,23 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings githooks")}}
+	<div class="repo-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.githooks"}}
+		</h4>
+		<div class="ui attached segment">
+			<div class="ui list">
+				<div class="item">
+					{{ctx.Locale.Tr "repo.settings.githooks_desc"}}
+				</div>
+				{{range .Hooks}}
+					<div class="item truncated-item-container">
+						<span class="text {{if .IsActive}}green{{else}}grey{{end}} tw-mr-2">{{svg "octicon-dot-fill" 22}}</span>
+						<span class="text truncate tw-flex-1 tw-mr-2">{{.Name}}</span>
+						<a class="muted tw-float-right tw-p-2" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}">
+							{{svg "octicon-pencil"}}
+						</a>
+					</div>
+				{{end}}
+			</div>
+		</div>
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/layout_footer.tmpl b/repo/settings/layout_footer.tmpl
new file mode 100644
index 0000000..60cad3f
--- /dev/null
+++ b/repo/settings/layout_footer.tmpl
@@ -0,0 +1,11 @@
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+<div class="page-content">
+	<div class="repo-layout-right">
+		<div>
+		{{/* block: repo-setting-content */}}
+{{end}}
+
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/settings/layout_head.tmpl b/repo/settings/layout_head.tmpl
new file mode 100644
index 0000000..efec9bf
--- /dev/null
+++ b/repo/settings/layout_head.tmpl
@@ -0,0 +1,14 @@
+{{template "base/head" .ctxData}}
+<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}">
+	{{template "repo/header" .ctxData}}
+	<div class="ui container flex-container">
+		{{template "repo/settings/navbar" .ctxData}}
+		<div class="flex-container-main">
+			{{template "base/alert" .ctxData}}
+			{{/* block: repo-setting-content */}}
+
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+		</div>
+	</div>
+</div>
+{{end}}
diff --git a/repo/settings/lfs.tmpl b/repo/settings/lfs.tmpl
new file mode 100644
index 0000000..c1878d2
--- /dev/null
+++ b/repo/settings/lfs.tmpl
@@ -0,0 +1,53 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+	<div class="repo-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.lfs_filelist"}} ({{ctx.Locale.Tr "admin.total" .Total}})
+			<div class="ui right">
+				<a class="ui tiny button" href="{{.Link}}/locks">{{ctx.Locale.Tr "repo.settings.lfs_locks"}}</a>
+				<a class="ui primary tiny button" href="{{.Link}}/pointers">&nbsp;{{ctx.Locale.Tr "repo.settings.lfs_findpointerfiles"}}</a>
+			</div>
+		</h4>
+		<table id="lfs-files-table" class="ui attached segment single line table">
+			<tbody>
+				{{range .LFSFiles}}
+					<tr>
+						<td>
+							<a href="{{$.Link}}/show/{{.Oid}}" title="{{.Oid}}" class="ui brown button tw-font-mono">
+								{{ShortSha .Oid}}
+							</a>
+						</td>
+						<td>{{FileSize .Size}}</td>
+						<td>{{DateUtils.TimeSince .CreatedUnix}}</td>
+						<td class="right aligned">
+							<a class="ui primary button" href="{{$.Link}}/find?oid={{.Oid}}&size={{.Size}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
+							<button class="ui basic show-modal icon button red" data-modal="#delete-{{.Oid}}">
+								<span class="btn-octicon btn-octicon-danger" data-tooltip-content="{{ctx.Locale.Tr "repo.editor.delete_this_file"}}">{{svg "octicon-trash"}}</span>
+							</button>
+						</td>
+					</tr>
+				{{else}}
+					<tr>
+						<td colspan="4">{{ctx.Locale.Tr "repo.settings.lfs_no_lfs_files"}}</td>
+					</tr>
+				{{end}}
+			</tbody>
+		</table>
+		{{template "base/paginate" .}}
+		{{range .LFSFiles}}
+			<div class="ui g-modal-confirm modal" id="delete-{{.Oid}}">
+				<div class="header">
+					{{ctx.Locale.Tr "repo.settings.lfs_delete" .Oid}}
+				</div>
+				<div class="content">
+					<p>
+						{{ctx.Locale.Tr "repo.settings.lfs_delete_warning"}}
+					</p>
+					<form class="ui form" action="{{$.Link}}/delete/{{.Oid}}" method="post">
+						{{$.CsrfTokenHtml}}
+						{{template "base/modal_actions_confirm"}}
+					</form>
+				</div>
+			</div>
+		{{end}}
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/lfs_file.tmpl b/repo/settings/lfs_file.tmpl
new file mode 100644
index 0000000..f6fac05
--- /dev/null
+++ b/repo/settings/lfs_file.tmpl
@@ -0,0 +1,53 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+	<div class="user-main-content twelve wide column content repository file list">
+		<div class="tab-size-8 non-diff-file-content">
+			<h4 class="ui top attached header">
+				<a href="{{.LFSFilesLink}}">{{ctx.Locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.LFSFile.Oid}}</span>
+				<div class="ui right">
+					{{if .EscapeStatus.Escaped}}
+						<a class="ui tiny basic button unescape-button tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
+						<a class="ui tiny basic button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
+					{{end}}
+					<a class="ui primary tiny button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
+				</div>
+			</h4>
+			<div class="ui bottom attached table unstackable segment">
+				{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
+				<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsPlainText}} plain-text{{else if .IsTextFile}} code-view{{end}}">
+					{{if .IsFileTooLarge}}
+						{{template "shared/filetoolarge" dict "RawFileLink" .RawFileLink}}
+					{{else if not .FileSize}}
+						{{template "shared/fileisempty"}}
+					{{else if not .IsTextFile}}
+						<div class="view-raw">
+							{{if .IsImageFile}}
+								<img src="{{$.RawFileLink}}">
+							{{else if .IsVideoFile}}
+								<video controls src="{{$.RawFileLink}}">
+									<strong>{{ctx.Locale.Tr "repo.video_not_supported_in_browser"}}</strong>
+								</video>
+							{{else if .IsAudioFile}}
+								<audio controls src="{{$.RawFileLink}}">
+									<strong>{{ctx.Locale.Tr "repo.audio_not_supported_in_browser"}}</strong>
+								</audio>
+							{{else if .IsPDFFile}}
+								<div class="pdf-content is-loading" data-src="{{$.RawFileLink}}" data-fallback-button-text="{{ctx.Locale.Tr "diff.view_file"}}"></div>
+							{{else}}
+								<a href="{{$.RawFileLink}}" rel="nofollow" class="tw-p-4">{{ctx.Locale.Tr "repo.file_view_raw"}}</a>
+							{{end}}
+						</div>
+					{{else if .FileSize}}
+						<table>
+							<tbody>
+								<tr>
+									<td class="lines-num">{{.LineNums}}</td>
+									<td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol>{{.FileContent}}</ol></code></pre></td>
+								</tr>
+							</tbody>
+						</table>
+					{{end}}
+				</div>
+			</div>
+		</div>
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/lfs_file_find.tmpl b/repo/settings/lfs_file_find.tmpl
new file mode 100644
index 0000000..59f1bb1
--- /dev/null
+++ b/repo/settings/lfs_file_find.tmpl
@@ -0,0 +1,46 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+	<div class="user-main-content twelve wide column content repository file list">
+		<div class="tab-size-8 non-diff-file-content">
+			<h4 class="ui top attached header">
+				<a href="{{.LFSFilesLink}}">{{ctx.Locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.Oid}}</span>
+			</h4>
+			<table id="lfs-files-find-table" class="ui attached segment single line table">
+				<tbody>
+					{{range .Results}}
+						<tr>
+							<td>
+								{{svg "octicon-file"}}
+								<a href="{{$.RepoLink}}/src/commit/{{.SHA}}/{{PathEscapeSegments .Name}}" title="{{.Name}}">{{.Name}}</a>
+							</td>
+							<td class="message">
+								<span class="truncate">
+									<a href="{{$.RepoLink}}/commit/{{.SHA}}" title="{{.Summary}}">
+										{{.Summary | ctx.RenderUtils.RenderEmoji}}
+									</a>
+								</span>
+							</td>
+							<td>
+								<span class="text grey">{{svg "octicon-git-branch"}}{{.BranchName}}</span>
+							</td>
+							<td>
+								{{if .ParentHashes}}
+									{{ctx.Locale.Tr "repo.diff.parent"}}
+									{{range .ParentHashes}}
+										<a class="ui primary sha label" href="{{$.RepoLink}}/commit/{{.String}}">{{ShortSha .String}}</a>
+									{{end}}
+								{{end}}
+								{{ctx.Locale.Tr "repo.diff.commit"}}
+								<a class="ui primary sha label" href="{{$.RepoLink}}/commit/{{.SHA}}">{{ShortSha .SHA}}</a>
+							</td>
+							<td>{{DateUtils.TimeSince .When}}</td>
+						</tr>
+					{{else}}
+						<tr>
+							<td colspan="5">{{ctx.Locale.Tr "repo.settings.lfs_lfs_file_no_commits"}}</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/lfs_locks.tmpl b/repo/settings/lfs_locks.tmpl
new file mode 100644
index 0000000..64c6b3a
--- /dev/null
+++ b/repo/settings/lfs_locks.tmpl
@@ -0,0 +1,56 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+	<div class="user-main-content twelve wide column content repository file list">
+		<div class="tab-size-8 non-diff-file-content">
+			<h4 class="ui top attached header">
+				<a href="{{.LFSFilesLink}}">{{ctx.Locale.Tr "repo.settings.lfs"}}</a> / {{ctx.Locale.Tr "repo.settings.lfs_locks"}} ({{ctx.Locale.Tr "admin.total" .Total}})
+			</h4>
+			<div class="ui attached segment">
+				<form class="ui form ignore-dirty" method="post">
+					{{$.CsrfTokenHtml}}
+					<div class="ui fluid action input">
+						<input name="path" value="" placeholder="{{ctx.Locale.Tr "repo.settings.lfs_lock_path"}}" autofocus>
+						<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.lfs_lock"}}</button>
+					</div>
+				</form>
+			</div>
+			<table id="lfs-files-locks-table" class="ui attached segment single line table">
+				<tbody>
+					{{range $index, $lock := .LFSLocks}}
+						<tr>
+							<td>
+								{{if index $.Linkable $index}}
+									{{svg "octicon-file"}}
+								<a href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments $.Repository.DefaultBranch}}/{{PathEscapeSegments $lock.Path}}" title="{{$lock.Path}}">{{$lock.Path}}</a>
+								{{else}}
+									{{svg "octicon-diff"}}
+								<span data-tooltip-content="{{ctx.Locale.Tr "repo.settings.lfs_lock_file_no_exist"}}">{{$lock.Path}}</span>
+								{{end}}
+								{{if not (index $.Lockables $index)}}
+									<span data-tooltip-content="{{ctx.Locale.Tr "repo.settings.lfs_noattribute"}}">{{svg "octicon-alert"}}</span>
+								{{end}}
+							</td>
+							<td>
+								<a href="{{$lock.Owner.HomeLink}}">
+									{{ctx.AvatarUtils.Avatar $lock.Owner}}
+									{{$lock.Owner.DisplayName}}
+								</a>
+							</td>
+							<td>{{DateUtils.TimeSince .Created}}</td>
+							<td class="right aligned">
+								<form action="{{$.LFSFilesLink}}/locks/{{$lock.ID}}/unlock" method="post">
+									{{$.CsrfTokenHtml}}
+									<button class="ui primary button"><span class="btn-octicon">{{svg "octicon-lock"}}</span>{{ctx.Locale.Tr "repo.settings.lfs_force_unlock"}}</button>
+								</form>
+							</td>
+						</tr>
+					{{else}}
+						<tr>
+							<td colspan="4">{{ctx.Locale.Tr "repo.settings.lfs_locks_no_locks"}}</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+			{{template "base/paginate" .}}
+		</div>
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/lfs_pointers.tmpl b/repo/settings/lfs_pointers.tmpl
new file mode 100644
index 0000000..4cfc0fc
--- /dev/null
+++ b/repo/settings/lfs_pointers.tmpl
@@ -0,0 +1,56 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+	<div class="repo-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.lfs_pointers.found" .NumPointers .NumAssociated .NumNotAssociated .NumNoExist}}
+			{{if gt .NumAssociatable 0}}
+				<div class="ui right">
+					<form class="ui form" method="post" action="{{$.Link}}/associate">
+						{{.CsrfTokenHtml}}
+						{{range .Pointers}}
+							{{if .Associatable}}
+								<input type="hidden" name="oid" value="{{.Oid}} {{.Size}}">
+							{{end}}
+						{{end}}
+						<button class="ui primary tiny button">{{ctx.Locale.Tr "repo.settings.lfs_pointers.associateAccessible" $.NumAssociatable}}</button>
+					</form>
+				</div>
+			{{end}}
+		</h4>
+		<div class="ui attached segment">
+			<table id="lfs-files-table" class="ui fixed single line table">
+				<thead>
+					<tr>
+						<th class="three wide">{{ctx.Locale.Tr "repo.settings.lfs_pointers.sha"}}</th>
+						<th class="four wide">{{ctx.Locale.Tr "repo.settings.lfs_pointers.oid"}}</th>
+						<th class="two wide">{{ctx.Locale.Tr "repo.settings.lfs_pointers.inRepo"}}</th>
+						<th class="two wide">{{ctx.Locale.Tr "repo.settings.lfs_pointers.exists"}}</th>
+						<th class="two wide" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.lfs_pointers.accessible"}}">{{ctx.Locale.Tr "repo.settings.lfs_pointers.accessible"}}</th>
+						<th class="three wide"></th>
+					</tr>
+				</thead>
+				<tbody>
+					{{range .Pointers}}
+						<tr>
+							<td>
+								<a href="{{$.RepoLink}}/raw/blob/{{.SHA}}" rel="nofollow" target="_blank" title="{{.SHA}}" class="ui button tw-font-mono">
+									{{ShortSha .SHA}}
+								</a>
+							</td>
+							<td>
+								<a {{if and .Exists .InRepo}}href="{{$.LFSFilesLink}}/show/{{.Oid}}" rel="nofollow" target="_blank"{{end}} title="{{.Oid}}" class="ui button tw-font-mono">
+									{{ShortSha .Oid}}
+								</a>
+							</td>
+							<td>{{svg (Iif .InRepo "octicon-check" "octicon-x")}}</td>
+							<td>{{svg (Iif .Exists "octicon-check" "octicon-x")}}</td>
+							<td>{{svg (Iif .Accessible "octicon-check" "octicon-x")}}</td>
+							<td class="tw-text-right">
+								<a class="ui primary button" href="{{$.LFSFilesLink}}/find?oid={{.Oid}}&size={{.Size}}&sha={{.SHA}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
+							</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+		</div>
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/navbar.tmpl b/repo/settings/navbar.tmpl
new file mode 100644
index 0000000..3e127cc
--- /dev/null
+++ b/repo/settings/navbar.tmpl
@@ -0,0 +1,53 @@
+<div class="flex-container-nav">
+	<div class="ui fluid vertical menu">
+		<div class="header item">{{ctx.Locale.Tr "repo.settings"}}</div>
+		<a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.RepoLink}}/settings">
+			{{ctx.Locale.Tr "repo.settings.options"}}
+		</a>
+		<a class="{{if .PageIsSettingsCollaboration}}active {{end}}item" href="{{.RepoLink}}/settings/collaboration">
+			{{ctx.Locale.Tr "repo.settings.collaboration"}}
+		</a>
+		{{if not DisableWebhooks}}
+			<a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks">
+				{{ctx.Locale.Tr "repo.settings.hooks"}}
+			</a>
+		{{end}}
+		{{if .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeCode}}
+			<a class="{{if .PageIsSettingsBranches}}active {{end}}item" href="{{.RepoLink}}/settings/branches">
+				{{ctx.Locale.Tr "repo.settings.branches"}}
+			</a>
+			<a class="{{if .PageIsSettingsTags}}active {{end}}item" href="{{.RepoLink}}/settings/tags">
+				{{ctx.Locale.Tr "repo.settings.tags"}}
+			</a>
+			{{if .SignedUser.CanEditGitHook}}
+				<a class="{{if .PageIsSettingsGitHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks/git">
+					{{ctx.Locale.Tr "repo.settings.githooks"}}
+				</a>
+			{{end}}
+			<a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{.RepoLink}}/settings/keys">
+				{{ctx.Locale.Tr "repo.settings.deploy_keys"}}
+			</a>
+			{{if .LFSStartServer}}
+				<a class="{{if .PageIsSettingsLFS}}active {{end}}item" href="{{.RepoLink}}/settings/lfs">
+					{{ctx.Locale.Tr "repo.settings.lfs"}}
+				</a>
+			{{end}}
+		{{end}}
+		{{if and .EnableActions (.Permission.CanRead ctx.Consts.RepoUnitTypeActions)}}
+		<details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}>
+			<summary>{{ctx.Locale.Tr "actions.actions"}}</summary>
+			<div class="menu">
+				<a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{.RepoLink}}/settings/actions/runners">
+					{{ctx.Locale.Tr "actions.runners"}}
+				</a>
+				<a class="{{if .PageIsSharedSettingsSecrets}}active {{end}}item" href="{{.RepoLink}}/settings/actions/secrets">
+					{{ctx.Locale.Tr "secrets.secrets"}}
+				</a>
+				<a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{.RepoLink}}/settings/actions/variables">
+					{{ctx.Locale.Tr "actions.variables"}}
+				</a>
+			</div>
+		</details>
+		{{end}}
+	</div>
+</div>
diff --git a/repo/settings/options.tmpl b/repo/settings/options.tmpl
new file mode 100644
index 0000000..1a7884b
--- /dev/null
+++ b/repo/settings/options.tmpl
@@ -0,0 +1,1112 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings options")}}
+	<div class="user-main-content twelve wide column">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.basic_settings"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="update">
+				<div class="required field {{if .Err_RepoName}}error{{end}}">
+					<label>{{ctx.Locale.Tr "repo.repo_name"}}</label>
+					<input name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
+				</div>
+				<div class="inline field">
+					<label>{{ctx.Locale.Tr "repo.repo_size"}}</label>
+					<span {{if not (eq .Repository.Size 0)}} data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}>{{FileSize .Repository.Size}}</span>
+				</div>
+				<div class="inline field">
+					<label>{{ctx.Locale.Tr "repo.template"}}</label>
+					<div class="ui checkbox">
+						<input name="template" type="checkbox" {{if .Repository.IsTemplate}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.template_helper"}}</label>
+					</div>
+				</div>
+				<div class="field {{if .Err_Description}}error{{end}}">
+					<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
+					<textarea id="description" name="description" rows="2" maxlength="2048">{{.Repository.Description}}</textarea>
+				</div>
+				<div class="field {{if .Err_Website}}error{{end}}">
+					<label for="website">{{ctx.Locale.Tr "repo.settings.site"}}</label>
+					<input id="website" name="website" type="url" maxlength="1024" value="{{.Repository.Website}}">
+				</div>
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button>
+				</div>
+			</form>
+
+			<div class="divider"></div>
+			<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
+				{{.CsrfTokenHtml}}
+				<div class="inline field">
+					<label for="avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label>
+					<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
+				</div>
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button>
+					<button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button>
+				</div>
+			</form>
+		</div>
+
+		{{/* These variables exist to make the logic in the Settings window easier to comprehend and are not used later on. */}}
+		{{$newMirrorsPartiallyEnabled := or (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}}
+		{{/* .Repository.IsMirror is not always reliable if the repository is not actively acting as a mirror because of errors. */}}
+		{{$showMirrorSettings := and (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeCode) (or $newMirrorsPartiallyEnabled .Repository.IsMirror .PullMirror .PushMirrors)}}
+		{{$newMirrorsEntirelyEnabled := and (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}}
+		{{$onlyNewPushMirrorsEnabled := and (not .DisableNewPushMirrors) .DisableNewPullMirrors}}
+		{{$onlyNewPullMirrorsEnabled := and .DisableNewPushMirrors (not .DisableNewPullMirrors)}}
+		{{$existingPushMirror := or .Repository.IsMirror .PushMirrors}}
+		{{$modifyBrokenPullMirror := and .Repository.IsMirror (not .PullMirror)}}
+		{{$isWorkingPullMirror := .PullMirror}}
+
+		{{if $showMirrorSettings}}
+			<h4 class="ui top attached header">
+				{{ctx.Locale.Tr "repo.settings.mirror_settings"}}
+			</h4>
+			<div class="ui attached segment">
+				{{if .Repository.IsArchived}}
+					<div class="ui warning message tw-text-center">
+						{{ctx.Locale.Tr "repo.settings.archive.mirrors_unavailable"}}
+					</div>
+				{{else}}
+					{{if $newMirrorsEntirelyEnabled}}
+						{{ctx.Locale.Tr "repo.settings.mirror_settings.docs"}}
+						<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com/usage/repo-mirror#pushing-to-a-remote-repository">{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}</a><br><br>
+						{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.pull_mirror_instructions"}}
+						<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com/usage/repo-mirror#pulling-from-a-remote-repository">{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_pull_section"}}</a><br>
+					{{else if $onlyNewPushMirrorsEnabled}}
+						{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_pull_mirror.instructions"}}
+						{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.more_information_if_disabled"}}
+						<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com/usage/repo-mirror#pulling-from-a-remote-repository">{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}</a><br>
+					{{else if $onlyNewPullMirrorsEnabled}}
+						{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.instructions"}}
+						{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.pull_mirror_warning"}}
+						{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.more_information_if_disabled"}}
+						<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com/usage/repo-mirror#pulling-from-a-remote-repository">{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}</a><br><br>
+						{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.info"}}
+						{{if $existingPushMirror}}
+							{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.can_still_use"}}
+						{{end}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.no_new_mirrors"}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.can_still_use"}}<br>
+					{{end}}
+
+					{{if .Repository.IsMirror}}
+					<table class="ui table">
+						<thead>
+							<tr>
+								<th class="tw-w-2/5">{{ctx.Locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}</th>
+								<th>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction"}}</th>
+								<th>{{ctx.Locale.Tr "repo.settings.mirror_settings.last_update"}}</th>
+								<th></th>
+							</tr>
+						</thead>
+						{{if $modifyBrokenPullMirror}}
+							{{/* even if a repo is a pull mirror (IsMirror=true), the PullMirror might still be nil if the mirror migration is broken */}}
+							<tbody>
+								<tr>
+									<td colspan="4">
+										<div class="text red tw-py-4">{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{ctx.Locale.Tr "error.occurred"}}</div>
+									</td>
+								</tr>
+							</tbody>
+						{{else if $isWorkingPullMirror}}
+						<tbody>
+							<tr>
+								<td>{{.PullMirror.RemoteAddress}}</td>
+								<td>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td>
+								<td>{{DateUtils.FullTime .PullMirror.UpdatedUnix}}</td>
+								<td class="right aligned">
+									<form method="post" class="tw-inline-block">
+										{{.CsrfTokenHtml}}
+										<input type="hidden" name="action" value="mirror-sync">
+										<button class="ui primary tiny button inline">{{ctx.Locale.Tr "repo.settings.sync_mirror"}}</button>
+									</form>
+								</td>
+							</tr>
+							<tr>
+								<td colspan="4">
+									<form class="ui form" method="post">
+										{{template "base/disable_form_autofill"}}
+										{{.CsrfTokenHtml}}
+										<input type="hidden" name="action" value="mirror">
+										<div class="inline field {{if .Err_EnablePrune}}error{{end}}">
+											<label>{{ctx.Locale.Tr "repo.mirror_prune"}}</label>
+											<div class="ui checkbox">
+										<input id="enable_prune" name="enable_prune" type="checkbox" {{if .PullMirror.EnablePrune}}checked{{end}}>
+										<label>{{ctx.Locale.Tr "repo.mirror_prune_desc"}}</label>
+											</div>
+										</div>
+										<div class="inline field {{if .Err_Interval}}error{{end}}">
+											<label for="interval">{{ctx.Locale.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
+											<input id="interval" name="interval" value="{{.PullMirror.Interval}}">
+										</div>
+										{{$address := MirrorRemoteAddress ctx .Repository .PullMirror.GetRemoteName}}
+										<div class="field {{if .Err_MirrorAddress}}error{{end}}">
+											<label for="mirror_address">{{ctx.Locale.Tr "repo.mirror_address"}}</label>
+											<input id="mirror_address" name="mirror_address" value="{{$address.Address}}" required>
+											<p class="help">{{ctx.Locale.Tr "repo.mirror_address_desc"}}</p>
+										</div>
+										<details class="ui optional field" {{if or .Err_Auth $address.Username}}open{{end}}>
+											<summary class="tw-p-1">
+												{{ctx.Locale.Tr "repo.need_auth"}}
+											</summary>
+											<div class="tw-p-1">
+												<div class="inline field {{if .Err_Auth}}error{{end}}">
+													<label for="mirror_username">{{ctx.Locale.Tr "username"}}</label>
+													<input id="mirror_username" name="mirror_username" value="{{$address.Username}}" {{if not .mirror_username}}data-need-clear="true"{{end}}>
+												</div>
+												<div class="inline field {{if .Err_Auth}}error{{end}}">
+													<label for="mirror_password">{{ctx.Locale.Tr "password"}}</label>
+													<input id="mirror_password" name="mirror_password" type="password" placeholder="{{if $address.Password}}{{ctx.Locale.Tr "repo.mirror_password_placeholder"}}{{else}}{{ctx.Locale.Tr "repo.mirror_password_blank_placeholder"}}{{end}}" value="" {{if not .mirror_password}}data-need-clear="true"{{end}} autocomplete="off">
+												</div>
+												<p class="help">{{ctx.Locale.Tr "repo.mirror_password_help"}}</p>
+											</div>
+										</details>
+
+										{{if .LFSStartServer}}
+										<div class="inline field">
+											<label>{{ctx.Locale.Tr "repo.mirror_lfs"}}</label>
+											<div class="ui checkbox">
+												<input id="mirror_lfs" name="mirror_lfs" type="checkbox" {{if .PullMirror.LFS}}checked{{end}}>
+												<label>{{ctx.Locale.Tr "repo.mirror_lfs_desc"}}</label>
+											</div>
+										</div>
+										<div class="field {{if .Err_LFSEndpoint}}error{{end}}">
+											<label for="mirror_lfs_endpoint">{{ctx.Locale.Tr "repo.mirror_lfs_endpoint"}}</label>
+											<input id="mirror_lfs_endpoint" name="mirror_lfs_endpoint" value="{{.PullMirror.LFSEndpoint}}" placeholder="{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.placeholder"}}">
+											<p class="help">{{ctx.Locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery"}}</p>
+										</div>
+										{{end}}
+										<div class="field">
+											<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_mirror_settings"}}</button>
+										</div>
+									</form>
+								</td>
+							</tr>
+						</tbody>
+						{{end}}{{/* end if: $modifyBrokenPullMirror / $isWorkingPullMirror */}}
+					</table>
+					{{end}}{{/* end if .Repository.IsMirror */}}
+
+					<table class="ui table">
+						<thead>
+							<tr>
+								<th class="tw-w-2/5">{{ctx.Locale.Tr "repo.settings.mirror_settings.pushed_repository"}}</th>
+								<th>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction"}}</th>
+								<th>{{ctx.Locale.Tr "repo.settings.mirror_settings.last_update"}}</th>
+								<th></th>
+							</tr>
+						</thead>
+						<tbody>
+							{{range .PushMirrors}}
+							<tr>
+								<td class="tw-break-anywhere">{{.RemoteAddress}}</td>
+								<td>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.push"}}</td>
+								<td>{{if .LastUpdateUnix}}{{DateUtils.FullTime .LastUpdateUnix}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label" data-tooltip-content="{{.LastError}}">{{ctx.Locale.Tr "error"}}</div>{{end}}</td>
+								<td class="right aligned">
+									<button
+										class="ui tiny button show-modal"
+										data-modal="#push-mirror-edit-modal"
+										data-tooltip-content="{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.edit_sync_time"}}"
+										data-modal-push-mirror-edit-id="{{.ID}}"
+										data-modal-push-mirror-edit-interval="{{.Interval}}"
+										data-modal-push-mirror-edit-address="{{.RemoteAddress}}"
+									>
+										{{svg "octicon-pencil" 14}}
+									</button>
+									<form method="post" class="tw-inline-block">
+										{{$.CsrfTokenHtml}}
+										<input type="hidden" name="action" value="push-mirror-sync">
+										<input type="hidden" name="push_mirror_id" value="{{.ID}}">
+										<button class="ui primary tiny button" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.sync_mirror"}}">{{svg "octicon-sync" 14}}</button>
+									</form>
+									<form method="post" class="tw-inline-block">
+										{{$.CsrfTokenHtml}}
+										<input type="hidden" name="action" value="push-mirror-remove">
+										<input type="hidden" name="push_mirror_id" value="{{.ID}}">
+										<button class="ui basic red tiny button" data-tooltip-content="{{ctx.Locale.Tr "remove"}}">{{svg "octicon-trash" 14}}</button>
+									</form>
+								</td>
+							</tr>
+							{{else}}
+							<tr>
+								<td>{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.none"}}</td>
+							</tr>
+							{{end}}
+							{{if (not .DisableNewPushMirrors)}}
+								<tr>
+									<td colspan="4">
+										<form class="ui form" method="post">
+											{{template "base/disable_form_autofill"}}
+											{{.CsrfTokenHtml}}
+											<input type="hidden" name="action" value="push-mirror-add">
+											<div class="field {{if .Err_PushMirrorAddress}}error{{end}}">
+												<label for="push_mirror_address">{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.remote_url"}}</label>
+												<input id="push_mirror_address" name="push_mirror_address" value="{{.push_mirror_address}}" required>
+												<p class="help">{{ctx.Locale.Tr "repo.mirror_address_desc"}}</p>
+											</div>
+											<details class="ui optional field" {{if or .Err_PushMirrorAuth .push_mirror_username}}open{{end}}>
+												<summary class="tw-p-1">
+													{{ctx.Locale.Tr "repo.need_auth"}}
+												</summary>
+												<div class="tw-p-1">
+													<div class="inline field {{if .Err_PushMirrorAuth}}error{{end}}">
+														<label for="push_mirror_username">{{ctx.Locale.Tr "username"}}</label>
+														<input id="push_mirror_username" name="push_mirror_username" value="{{.push_mirror_username}}">
+													</div>
+													<div class="inline field {{if .Err_PushMirrorAuth}}error{{end}}">
+														<label for="push_mirror_password">{{ctx.Locale.Tr "password"}}</label>
+														<input id="push_mirror_password" name="push_mirror_password" type="password" value="{{.push_mirror_password}}" autocomplete="off">
+													</div>
+												</div>
+											</details>
+											<div class="field">
+												<div class="ui checkbox">
+													<input id="push_mirror_sync_on_commit" name="push_mirror_sync_on_commit" type="checkbox" {{if .push_mirror_sync_on_commit}}checked{{end}}>
+													<label for="push_mirror_sync_on_commit">{{ctx.Locale.Tr "repo.mirror_sync_on_commit"}}</label>
+												</div>
+											</div>
+											<div class="inline field {{if .Err_PushMirrorInterval}}error{{end}}">
+												<label for="push_mirror_interval">{{ctx.Locale.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
+												<input id="push_mirror_interval" name="push_mirror_interval" value="{{if .push_mirror_interval}}{{.push_mirror_interval}}{{else}}{{.DefaultMirrorInterval}}{{end}}">
+											</div>
+											<div class="field">
+												<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.add"}}</button>
+											</div>
+										</form>
+									</td>
+								</tr>
+							{{end}}
+						</tbody>
+					</table>
+				{{end}}
+			</div>
+		{{end}}
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.advanced_settings"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="advanced">
+
+				{{$isCodeEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeCode}}
+				{{$isCodeGlobalDisabled := ctx.Consts.RepoUnitTypeCode.UnitGlobalDisabled}}
+				<div class="inline field">
+					<label>{{ctx.Locale.Tr "repo.code"}}</label>
+					<div class="ui checkbox{{if $isCodeGlobalDisabled}} disabled{{end}}"{{if $isCodeGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+						<input class="enable-system" name="enable_code" type="checkbox"{{if $isCodeEnabled}} checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.code.desc"}}</label>
+					</div>
+				</div>
+
+				{{$isInternalWikiEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeWiki}}
+				{{$isExternalWikiEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalWiki}}
+				{{$isWikiEnabled := or $isInternalWikiEnabled $isExternalWikiEnabled}}
+				{{$isWikiGlobalDisabled := ctx.Consts.RepoUnitTypeWiki.UnitGlobalDisabled}}
+				{{$isExternalWikiGlobalDisabled := ctx.Consts.RepoUnitTypeExternalWiki.UnitGlobalDisabled}}
+				{{$isBothWikiGlobalDisabled := and $isWikiGlobalDisabled $isExternalWikiGlobalDisabled}}
+				<div class="inline field">
+					<label>{{ctx.Locale.Tr "repo.wiki"}}</label>
+					<div class="ui checkbox{{if $isBothWikiGlobalDisabled}} disabled{{end}}"{{if $isBothWikiGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+						<input class="enable-system" name="enable_wiki" type="checkbox" data-target="#wiki_box" {{if $isWikiEnabled}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.wiki_desc"}}</label>
+					</div>
+				</div>
+				<div class="field{{if not $isWikiEnabled}} disabled{{end}}" id="wiki_box">
+					<div class="field">
+						<div class="ui radio checkbox{{if $isWikiGlobalDisabled}} disabled{{end}}"{{if $isWikiGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+							<input class="enable-system-radio" name="enable_external_wiki" type="radio" value="false" data-context="#internal_wiki_box" data-target="#external_wiki_box" {{if $isInternalWikiEnabled}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.use_internal_wiki"}}</label>
+						</div>
+					</div>
+					<div id="internal_wiki_box" class="field tw-pl-4 {{if not $isInternalWikiEnabled}}disabled{{end}}">
+						<div class="inline field">
+							<label>{{ctx.Locale.Tr "repo.settings.default_wiki_branch_name"}}</label>
+							<input name="default_wiki_branch" value="{{.Repository.DefaultWikiBranch}}">
+						</div>
+						<div class="inline field">
+							{{$unitInternalWiki := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeWiki}}
+							<label>{{ctx.Locale.Tr "repo.settings.default_wiki_everyone_access"}}</label>
+							<select name="default_wiki_everyone_access" class="ui selection dropdown">
+								{{/* everyone access mode is different from others, none means it is unset and won't be applied */}}
+								<option value="none" {{Iif (eq $unitInternalWiki.EveryoneAccessMode 0) "selected"}}>{{ctx.Locale.Tr "settings.permission_not_set"}}</option>
+								<option value="read" {{Iif (eq $unitInternalWiki.EveryoneAccessMode 1) "selected"}}>{{ctx.Locale.Tr "settings.permission_read"}}</option>
+								<option value="write" {{Iif (eq $unitInternalWiki.EveryoneAccessMode 2) "selected"}}>{{ctx.Locale.Tr "settings.permission_write"}}</option>
+							</select>
+						</div>
+					</div>
+					<div class="field">
+						<div class="ui radio checkbox{{if $isExternalWikiGlobalDisabled}} disabled{{end}}"{{if $isExternalWikiGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+							<input class="enable-system-radio" name="enable_external_wiki" type="radio" value="true" data-context="#internal_wiki_box" data-target="#external_wiki_box" {{if $isExternalWikiEnabled}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.use_external_wiki"}}</label>
+						</div>
+					</div>
+					<div id="external_wiki_box" class="field tw-pl-4 {{if not $isExternalWikiEnabled}}disabled{{end}}">
+						<label for="external_wiki_url">{{ctx.Locale.Tr "repo.settings.external_wiki_url"}}</label>
+						<input id="external_wiki_url" name="external_wiki_url" type="url" value="{{(.Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL}}">
+						<p class="help">{{ctx.Locale.Tr "repo.settings.external_wiki_url_desc"}}</p>
+					</div>
+				</div>
+
+				<div class="divider"></div>
+
+				{{$isIssuesEnabled := or (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeIssues) (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalTracker)}}
+				{{$isIssuesGlobalDisabled := ctx.Consts.RepoUnitTypeIssues.UnitGlobalDisabled}}
+				{{$isExternalTrackerGlobalDisabled := ctx.Consts.RepoUnitTypeExternalTracker.UnitGlobalDisabled}}
+				{{$isIssuesAndExternalGlobalDisabled := and $isIssuesGlobalDisabled $isExternalTrackerGlobalDisabled}}
+				<div class="inline field">
+					<label>{{ctx.Locale.Tr "repo.issues"}}</label>
+					<div class="ui checkbox{{if $isIssuesAndExternalGlobalDisabled}} disabled{{end}}"{{if $isIssuesAndExternalGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+						<input class="enable-system" name="enable_issues" type="checkbox" data-target="#issue_box" {{if $isIssuesEnabled}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.issues_desc"}}</label>
+					</div>
+				</div>
+				<div class="field {{if not $isIssuesEnabled}}disabled{{end}}" id="issue_box">
+					<div class="field">
+						<div class="ui radio checkbox{{if $isIssuesGlobalDisabled}} disabled{{end}}"{{if $isIssuesGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+							<input class="enable-system-radio" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalTracker)}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.use_internal_issue_tracker"}}</label>
+						</div>
+					</div>
+					<div class="field tw-pl-4 {{if (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalTracker)}}disabled{{end}}" id="internal_issue_box">
+						{{if .Repository.CanEnableTimetracker}}
+							<div class="field">
+								<div class="ui checkbox">
+									<input name="enable_timetracker" class="enable-system" data-target="#only_contributors" type="checkbox" {{if .Repository.IsTimetrackerEnabled ctx}}checked{{end}}>
+									<label>{{ctx.Locale.Tr "repo.settings.enable_timetracker"}}</label>
+								</div>
+							</div>
+							<div class="field {{if not (.Repository.IsTimetrackerEnabled ctx)}}disabled{{end}}" id="only_contributors">
+								<div class="ui checkbox">
+									<input name="allow_only_contributors_to_track_time" type="checkbox" {{if .Repository.AllowOnlyContributorsToTrackTime ctx}}checked{{end}}>
+									<label>{{ctx.Locale.Tr "repo.settings.allow_only_contributors_to_track_time"}}</label>
+								</div>
+							</div>
+						{{end}}
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="enable_issue_dependencies" type="checkbox" {{if (.Repository.IsDependenciesEnabled ctx)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.issues.dependency.setting"}}</label>
+							</div>
+						</div>
+						<div class="ui checkbox">
+							<input name="enable_close_issues_via_commit_in_any_branch" type="checkbox" {{if .Repository.CloseIssuesViaCommitInAnyBranch}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.admin_enable_close_issues_via_commit_in_any_branch"}}</label>
+						</div>
+					</div>
+					<div class="field">
+						<div class="ui radio checkbox{{if $isExternalTrackerGlobalDisabled}} disabled{{end}}"{{if $isExternalTrackerGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+							<input class="enable-system-radio" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalTracker}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.use_external_issue_tracker"}}</label>
+						</div>
+					</div>
+					<div class="field tw-pl-4 {{if not (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalTracker)}}disabled{{end}}" id="external_issue_box">
+						<div class="field">
+							<label for="external_tracker_url">{{ctx.Locale.Tr "repo.settings.external_tracker_url"}}</label>
+							<input id="external_tracker_url" name="external_tracker_url" type="url" value="{{(.Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerURL}}">
+							<p class="help">{{ctx.Locale.Tr "repo.settings.external_tracker_url_desc"}}</p>
+						</div>
+						<div class="field">
+							<label for="tracker_url_format">{{ctx.Locale.Tr "repo.settings.tracker_url_format"}}</label>
+							<input id="tracker_url_format" name="tracker_url_format" type="url" value="{{(.Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerFormat}}" placeholder="https://github.com/{user}/{repo}/issues/{index}">
+							<p class="help">{{ctx.Locale.Tr "repo.settings.tracker_url_format_desc"}}</p>
+						</div>
+						<div class="inline fields">
+							<label for="issue_style">{{ctx.Locale.Tr "repo.settings.tracker_issue_style"}}</label>
+							<div class="field">
+								<div class="ui radio checkbox">
+								{{$externalTracker := (.Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeExternalTracker)}}
+								{{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}}
+									<input class="js-tracker-issue-style" name="tracker_issue_style" type="radio" value="numeric" {{if eq $externalTrackerStyle "numeric"}}checked{{end}}>
+									<label>{{ctx.Locale.Tr "repo.settings.tracker_issue_style.numeric"}} <span class="ui light grey text">#1234</span></label>
+								</div>
+							</div>
+							<div class="field">
+								<div class="ui radio checkbox">
+									<input class="js-tracker-issue-style" name="tracker_issue_style" type="radio" value="alphanumeric" {{if eq $externalTrackerStyle "alphanumeric"}}checked{{end}}>
+									<label>{{ctx.Locale.Tr "repo.settings.tracker_issue_style.alphanumeric"}} <span class="ui light grey text">ABC-123 , DEFG-234</span></label>
+								</div>
+							</div>
+							<div class="field">
+								<div class="ui radio checkbox">
+									<input class="js-tracker-issue-style" name="tracker_issue_style" type="radio" value="regexp" {{if eq $externalTrackerStyle "regexp"}}checked{{end}}>
+									<label>{{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp"}} <span class="ui light grey text">(ISSUE-\d+) , ISSUE-(\d+)</span></label>
+								</div>
+							</div>
+						</div>
+						<div class="field {{if ne $externalTrackerStyle "regexp"}}disabled{{end}}" id="tracker-issue-style-regex-box">
+							<label for="external_tracker_regexp_pattern">{{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp_pattern"}}</label>
+							<input id="external_tracker_regexp_pattern" name="external_tracker_regexp_pattern" value="{{(.Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerRegexpPattern}}">
+							<p class="help">{{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc"}}</p>
+						</div>
+					</div>
+				</div>
+
+				<div class="divider"></div>
+
+				{{$isProjectsEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeProjects}}
+				{{$isProjectsGlobalDisabled := ctx.Consts.RepoUnitTypeProjects.UnitGlobalDisabled}}
+				{{$projectsUnit := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeProjects}}
+				<div class="inline field">
+					<label>{{ctx.Locale.Tr "repo.projects"}}</label>
+					<div class="ui checkbox{{if $isProjectsGlobalDisabled}} disabled{{end}}"{{if $isProjectsGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+						<input class="enable-system" name="enable_projects" type="checkbox" data-target="#projects_box" {{if $isProjectsEnabled}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.projects_desc"}}</label>
+					</div>
+				</div>
+				<div class="field {{if not $isProjectsEnabled}} disabled{{end}} tw-pl-4" id="projects_box">
+					<p>
+						{{ctx.Locale.Tr "repo.settings.projects_mode_desc"}}
+					</p>
+					<div class="ui dropdown selection">
+						<select name="projects_mode">
+							<option value="repo" {{if or (not $isProjectsEnabled) (eq $projectsUnit.ProjectsConfig.GetProjectsMode "repo")}}selected{{end}}>{{ctx.Locale.Tr "repo.settings.projects_mode_repo"}}</option>
+							<option value="owner" {{if or (not $isProjectsEnabled) (eq $projectsUnit.ProjectsConfig.GetProjectsMode "owner")}}selected{{end}}>{{ctx.Locale.Tr "repo.settings.projects_mode_owner"}}</option>
+							<option value="all" {{if or (not $isProjectsEnabled) (eq $projectsUnit.ProjectsConfig.GetProjectsMode "all")}}selected{{end}}>{{ctx.Locale.Tr "repo.settings.projects_mode_all"}}</option>
+						</select>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="default text">
+							{{if (eq $projectsUnit.ProjectsConfig.GetProjectsMode "repo")}}
+								{{ctx.Locale.Tr "repo.settings.projects_mode_repo"}}
+							{{end}}
+							{{if (eq $projectsUnit.ProjectsConfig.GetProjectsMode "owner")}}
+								{{ctx.Locale.Tr "repo.settings.projects_mode_owner"}}
+							{{end}}
+							{{if (eq $projectsUnit.ProjectsConfig.GetProjectsMode "all")}}
+								{{ctx.Locale.Tr "repo.settings.projects_mode_all"}}
+							{{end}}
+						</div>
+						<div class="menu">
+							<div class="item" data-value="repo">{{ctx.Locale.Tr "repo.settings.projects_mode_repo"}}</div>
+							<div class="item" data-value="owner">{{ctx.Locale.Tr "repo.settings.projects_mode_owner"}}</div>
+							<div class="item" data-value="all">{{ctx.Locale.Tr "repo.settings.projects_mode_all"}}</div>
+						</div>
+					</div>
+				</div>
+
+				<div class="divider"></div>
+
+				{{$isReleasesEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeReleases}}
+				{{$isReleasesGlobalDisabled := ctx.Consts.RepoUnitTypeReleases.UnitGlobalDisabled}}
+				<div class="inline field">
+					<label>{{ctx.Locale.Tr "repo.releases"}}</label>
+					<div class="ui checkbox{{if $isReleasesGlobalDisabled}} disabled{{end}}"{{if $isReleasesGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+						<input class="enable-system" name="enable_releases" type="checkbox" {{if $isReleasesEnabled}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.releases_desc"}}</label>
+					</div>
+				</div>
+
+				{{$isPackagesEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypePackages}}
+				{{$isPackagesGlobalDisabled := ctx.Consts.RepoUnitTypePackages.UnitGlobalDisabled}}
+				<div class="inline field">
+					<label>{{ctx.Locale.Tr "repo.packages"}}</label>
+					<div class="ui checkbox{{if $isPackagesGlobalDisabled}} disabled{{end}}"{{if $isPackagesGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+						<input class="enable-system" name="enable_packages" type="checkbox" {{if $isPackagesEnabled}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.packages_desc"}}</label>
+					</div>
+				</div>
+
+				{{if .EnableActions}}
+					{{$isActionsEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeActions}}
+					{{$isActionsGlobalDisabled := ctx.Consts.RepoUnitTypeActions.UnitGlobalDisabled}}
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "actions.actions"}}</label>
+							<div class="ui checkbox{{if $isActionsGlobalDisabled}} disabled{{end}}"{{if $isActionsGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+							<input class="enable-system" name="enable_actions" type="checkbox" {{if $isActionsEnabled}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.actions_desc"}}</label>
+						</div>
+					</div>
+				{{end}}
+
+				{{if not .IsMirror}}
+					<div class="divider"></div>
+					{{$pullRequestEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypePullRequests}}
+					{{$pullRequestGlobalDisabled := ctx.Consts.RepoUnitTypePullRequests.UnitGlobalDisabled}}
+					{{$prUnit := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypePullRequests}}
+					<div class="inline field">
+						<label>{{ctx.Locale.Tr "repo.pulls"}}</label>
+						<div class="ui checkbox{{if $pullRequestGlobalDisabled}} disabled{{end}}"{{if $pullRequestGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+							<input class="enable-system" name="enable_pulls" type="checkbox" data-target="#pull_box" {{if $pullRequestEnabled}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.pulls_desc"}}</label>
+						</div>
+					</div>
+					<div class="field{{if not $pullRequestEnabled}} disabled{{end}}" id="pull_box">
+						<div class="field">
+							<p>
+								{{ctx.Locale.Tr "repo.settings.merge_style_desc"}}
+							</p>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="pulls_allow_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowMerge)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.pulls.merge_pull_request"}}</label>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="pulls_allow_rebase" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowRebase)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.pulls.rebase_merge_pull_request"}}</label>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="pulls_allow_rebase_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowRebaseMerge)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.pulls.rebase_merge_commit_pull_request"}}</label>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="pulls_allow_squash" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowSquash)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.pulls.squash_merge_pull_request"}}</label>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="pulls_allow_fast_forward_only" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowFastForwardOnly)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.pulls.fast_forward_only_merge_pull_request"}}</label>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="pulls_allow_manual_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowManualMerge)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.pulls.merge_manually"}}</label>
+							</div>
+						</div>
+
+						<div class="field">
+							<p>
+								{{ctx.Locale.Tr "repo.settings.default_merge_style_desc"}}
+							</p>
+							<div class="ui dropdown selection">
+								<select name="pulls_default_merge_style">
+									<option value="merge" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "merge")}}selected{{end}}>{{ctx.Locale.Tr "repo.pulls.merge_pull_request"}}</option>
+									<option value="rebase" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase")}}selected{{end}}>{{ctx.Locale.Tr "repo.pulls.rebase_merge_pull_request"}}</option>
+									<option value="rebase-merge" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase-merge")}}selected{{end}}>{{ctx.Locale.Tr "repo.pulls.rebase_merge_commit_pull_request"}}</option>
+									<option value="squash" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "squash")}}selected{{end}}>{{ctx.Locale.Tr "repo.pulls.squash_merge_pull_request"}}</option>
+									<option value="fast-forward-only" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "fast-forward-only")}}selected{{end}}>{{ctx.Locale.Tr "repo.pulls.fast_forward_only_merge_pull_request"}}</option>
+								</select>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+								<div class="default text">
+									{{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "merge")}}
+										{{ctx.Locale.Tr "repo.pulls.merge_pull_request"}}
+									{{end}}
+									{{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase")}}
+										{{ctx.Locale.Tr "repo.pulls.rebase_merge_pull_request"}}
+									{{end}}
+									{{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase-merge")}}
+										{{ctx.Locale.Tr "repo.pulls.rebase_merge_commit_pull_request"}}
+									{{end}}
+									{{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "squash")}}
+										{{ctx.Locale.Tr "repo.pulls.squash_merge_pull_request"}}
+									{{end}}
+									{{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "fast-forward-only")}}
+										{{ctx.Locale.Tr "repo.pulls.fast_forward_only_merge_pull_request"}}
+									{{end}}
+								</div>
+								<div class="menu">
+									<div class="item" data-value="merge">{{ctx.Locale.Tr "repo.pulls.merge_pull_request"}}</div>
+									<div class="item" data-value="rebase">{{ctx.Locale.Tr "repo.pulls.rebase_merge_pull_request"}}</div>
+									<div class="item" data-value="rebase-merge">{{ctx.Locale.Tr "repo.pulls.rebase_merge_commit_pull_request"}}</div>
+									<div class="item" data-value="squash">{{ctx.Locale.Tr "repo.pulls.squash_merge_pull_request"}}</div>
+									<div class="item" data-value="fast-forward-only">{{ctx.Locale.Tr "repo.pulls.fast_forward_only_merge_pull_request"}}</div>
+								</div>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="default_allow_maintainer_edit" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.DefaultAllowMaintainerEdit)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.settings.pulls.default_allow_edits_from_maintainers"}}</label>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="pulls_allow_rebase_update" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowRebaseUpdate)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.settings.pulls.allow_rebase_update"}}</label>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="default_delete_branch_after_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.DefaultDeleteBranchAfterMerge)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.settings.pulls.default_delete_branch_after_merge"}}</label>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="enable_autodetect_manual_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AutodetectManualMerge)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.settings.pulls.enable_autodetect_manual_merge"}}</label>
+							</div>
+						</div>
+						<div class="field">
+							<div class="ui checkbox">
+								<input name="pulls_ignore_whitespace" type="checkbox" {{if and $pullRequestEnabled ($prUnit.PullRequestsConfig.IgnoreWhitespaceConflicts)}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.settings.pulls.ignore_whitespace"}}</label>
+							</div>
+						</div>
+					</div>
+				{{end}}
+
+				<div class="divider"></div>
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button>
+				</div>
+			</form>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.signing_settings"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="signing">
+				<div class="field">
+					<label>{{ctx.Locale.Tr "repo.settings.trust_model"}}</label><br>
+					<div class="field">
+						<div class="ui radio checkbox">
+							<input type="radio" id="trust_model_default" name="trust_model" {{if eq .Repository.TrustModel.String "default"}}checked="checked"{{end}} value="default">
+							<label for="trust_model_default">{{ctx.Locale.Tr "repo.settings.trust_model.default"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.trust_model.default.desc"}}</p>
+						</div>
+					</div>
+					<div class="field">
+						<div class="ui radio checkbox">
+							<input type="radio" id="trust_model_collaborator" name="trust_model" {{if eq .Repository.TrustModel.String "collaborator"}}checked="checked"{{end}} value="collaborator">
+							<label for="trust_model_collaborator">{{ctx.Locale.Tr "repo.settings.trust_model.collaborator.long"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.trust_model.collaborator.desc"}}</p>
+						</div>
+					</div>
+					<div class="field">
+						<div class="ui radio checkbox">
+							<input type="radio" name="trust_model" id="trust_model_committer" {{if eq .Repository.TrustModel.String "committer"}}checked="checked"{{end}} value="committer">
+							<label for="trust_model_committer">{{ctx.Locale.Tr "repo.settings.trust_model.committer.long"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.trust_model.committer.desc"}}</p>
+						</div>
+					</div>
+					<div class="field">
+						<div class="ui radio checkbox">
+							<input type="radio" name="trust_model" id="trust_model_collaboratorcommitter" {{if eq .Repository.TrustModel.String "collaboratorcommitter"}}checked="checked"{{end}} value="collaboratorcommitter">
+							<label for="trust_model_collaboratorcommitter">{{ctx.Locale.Tr "repo.settings.trust_model.collaboratorcommitter.long"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.trust_model.collaboratorcommitter.desc"}}</p>
+						</div>
+					</div>
+				</div>
+
+				<div class="divider"></div>
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button>
+				</div>
+			</form>
+		</div>
+
+		{{if .IsAdmin}}
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "repo.settings.admin_settings"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="admin">
+				<div class="field">
+					<div class="ui checkbox">
+						<input name="enable_health_check" type="checkbox" {{if .Repository.IsFsckEnabled}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.admin_enable_health_check"}}</label>
+					</div>
+				</div>
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button>
+				</div>
+			</form>
+
+			<div class="divider"></div>
+			<form class="ui form" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="admin_index">
+				{{if .IsRepoIndexerEnabled}}
+					<h4 class="ui header">{{ctx.Locale.Tr "repo.settings.admin_code_indexer"}}</h4>
+					<div class="inline fields">
+						<label>{{ctx.Locale.Tr "repo.settings.admin_indexer_commit_sha"}}</label>
+						<span class="field">
+							{{if .CodeIndexerStatus}}
+								<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.CodeIndexerStatus.CommitSha}}">
+									<span class="shortsha">{{ShortSha .CodeIndexerStatus.CommitSha}}</span>
+								</a>
+							{{else}}
+									<span>{{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}}</span>
+							{{end}}
+						</span>
+						<div class="field">
+							<button class="ui primary button" name="request_reindex_type" value="code">{{ctx.Locale.Tr "repo.settings.reindex_button"}}</button>
+						</div>
+					</div>
+				{{end}}
+				<h4 class="ui header">{{ctx.Locale.Tr "repo.settings.admin_stats_indexer"}}</h4>
+				<div class="inline fields">
+					{{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}}
+						<label>{{ctx.Locale.Tr "repo.settings.admin_indexer_commit_sha"}}</label>
+					{{end}}
+					<span class="field">
+						{{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}}
+							<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.StatsIndexerStatus.CommitSha}}">
+								<span class="shortsha">{{ShortSha .StatsIndexerStatus.CommitSha}}</span>
+							</a>
+						{{else}}
+							<span>{{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}}</span>
+						{{end}}
+					</span>
+					<div class="field">
+						<button class="ui primary button" name="request_reindex_type" value="stats">{{ctx.Locale.Tr "repo.settings.reindex_button"}}</button>
+					</div>
+				</div>
+			</form>
+		</div>
+		{{end}}
+
+		{{if .Permission.IsOwner}}
+		<h4 class="ui top attached error header">
+			{{ctx.Locale.Tr "repo.settings.danger_zone"}}
+		</h4>
+		<div class="ui attached error danger segment">
+			<div class="flex-list">
+				{{if not .Repository.IsFork}}
+					<div class="flex-item tw-items-center">
+						<div class="flex-item-main">
+							<div class="flex-item-title">{{ctx.Locale.Tr "repo.visibility"}}</div>
+							{{if .Repository.IsPrivate}}
+								<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.visibility.public.text"}}</div>
+							{{else}}
+								<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.visibility.private.text"}}</div>
+							{{end}}
+						</div>
+						<div class="flex-item-trailing">
+							<button class="ui basic red show-modal button" data-modal="#visibility-repo-modal">
+								{{if .Repository.IsPrivate}}
+									{{ctx.Locale.Tr "repo.settings.visibility.public.button"}}
+								{{else}}
+									{{ctx.Locale.Tr "repo.settings.visibility.private.button"}}
+								{{end}}
+							</button>
+						</div>
+					</div>
+				{{end}}
+				{{if .Repository.IsMirror}}
+					<div class="flex-item">
+						<div class="flex-item-main">
+							<div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.convert"}}</div>
+							<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.convert_desc"}}</div>
+						</div>
+						<div class="flex-item-trailing">
+							<button class="ui basic red show-modal button" data-modal="#convert-mirror-repo-modal">{{ctx.Locale.Tr "repo.settings.convert"}}</button>
+						</div>
+					</div>
+				{{end}}
+				{{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
+					<div class="flex-item">
+						<div class="flex-item-main">
+							<div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.convert_fork"}}</div>
+							<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.convert_fork_desc"}}</div>
+						</div>
+						<div class="flex-item-trailing">
+							<button class="ui basic red show-modal button" data-modal="#convert-fork-repo-modal">{{ctx.Locale.Tr "repo.settings.convert_fork"}}</button>
+						</div>
+					</div>
+				{{end}}
+				<div class="flex-item">
+					<div class="flex-item-main">
+						<div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.transfer"}}</div>
+						<div class="flex-item-body">
+							{{if .RepoTransfer}}
+								{{ctx.Locale.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}}
+							{{else}}
+								{{ctx.Locale.Tr "repo.settings.transfer_desc"}}
+							{{end}}
+						</div>
+					</div>
+					<div class="flex-item-trailing">
+						{{if .RepoTransfer}}
+							<form class="ui form" action="{{.Link}}" method="post">
+								{{.CsrfTokenHtml}}
+								<input type="hidden" name="action" value="cancel_transfer">
+								<button class="ui red button">{{ctx.Locale.Tr "repo.settings.transfer_abort"}}</button>
+							</form>
+						{{else}}
+							<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{ctx.Locale.Tr "repo.settings.transfer"}}</button>
+						{{end}}
+					</div>
+				</div>
+				{{if .Permission.CanRead ctx.Consts.RepoUnitTypeWiki}}
+					<div class="flex-item">
+						<div class="flex-item-main">
+							<div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.wiki_delete"}}</div>
+							<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.wiki_delete_desc"}}</div>
+						</div>
+						<div class="flex-item-trailing">
+							<button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{ctx.Locale.Tr "repo.settings.wiki_delete"}}</button>
+						</div>
+					</div>
+				{{end}}
+				<div class="flex-item">
+					<div class="flex-item-main">
+						<div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.delete"}}</div>
+						<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.delete_desc"}}</div>
+					</div>
+					<div class="flex-item-trailing">
+						<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{ctx.Locale.Tr "repo.settings.delete"}}</button>
+					</div>
+				</div>
+				{{if not .Repository.IsMirror}}
+					<div class="flex-item tw-items-center">
+						<div class="flex-item-main">
+							{{if .Repository.IsArchived}}
+								<div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.unarchive.header"}}</div>
+								<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.unarchive.text"}}</div>
+							{{else}}
+								<div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.archive.header"}}</div>
+								<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.archive.text"}}</div>
+							{{end}}
+						</div>
+						<div class="flex-item-trailing">
+							<button class="ui basic red show-modal button" data-modal="#archive-repo-modal">
+								{{if .Repository.IsArchived}}
+									{{ctx.Locale.Tr "repo.settings.unarchive.button"}}
+								{{else}}
+									{{ctx.Locale.Tr "repo.settings.archive.button"}}
+								{{end}}
+							</button>
+						</div>
+					</div>
+				{{end}}
+			</div>
+		</div>
+		{{end}}
+	</div>
+{{template "repo/settings/layout_footer" .}}
+
+{{if .Permission.IsOwner}}
+	{{if .Repository.IsMirror}}
+		<div class="ui small modal" id="convert-mirror-repo-modal">
+			<div class="header">
+				{{ctx.Locale.Tr "repo.settings.convert"}}
+			</div>
+			<div class="content">
+				<div class="ui warning message">
+					{{ctx.Locale.Tr "repo.settings.convert_notices_1"}}
+				</div>
+				<form class="ui form" action="{{.Link}}" method="post">
+					{{.CsrfTokenHtml}}
+					<input type="hidden" name="action" value="convert">
+					<div class="field">
+						<label>
+							{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
+							<span class="text red">{{.Repository.Name}}</span>
+						</label>
+					</div>
+					<div class="required field">
+						<label>{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input name="repo_name" required maxlength="100">
+					</div>
+
+					<div class="text right actions">
+						<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+						<button class="ui red button">{{ctx.Locale.Tr "repo.settings.convert_confirm"}}</button>
+					</div>
+				</form>
+			</div>
+		</div>
+	{{end}}
+	{{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
+		<div class="ui small modal" id="convert-fork-repo-modal">
+			<div class="header">
+				{{ctx.Locale.Tr "repo.settings.convert_fork"}}
+			</div>
+			<div class="content">
+				<div class="ui warning message">
+					{{ctx.Locale.Tr "repo.settings.convert_fork_notices_1"}}
+				</div>
+				<form class="ui form" action="{{.Link}}" method="post">
+					{{.CsrfTokenHtml}}
+					<input type="hidden" name="action" value="convert_fork">
+					<div class="field">
+						<label>
+							{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
+							<span class="text red">{{.Repository.Name}}</span>
+						</label>
+					</div>
+					<div class="required field">
+						<label>{{ctx.Locale.Tr "repo.repo_name"}}</label>
+						<input name="repo_name" required>
+					</div>
+
+					<div class="text right actions">
+						<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+						<button class="ui red button">{{ctx.Locale.Tr "repo.settings.convert_fork_confirm"}}</button>
+					</div>
+				</form>
+			</div>
+		</div>
+	{{end}}
+	<div class="ui small modal" id="transfer-repo-modal">
+		<div class="header">
+			{{ctx.Locale.Tr "repo.settings.transfer"}}
+		</div>
+		<div class="content">
+			<div class="ui warning message">
+				{{ctx.Locale.Tr "repo.settings.transfer_notices_1"}} <br>
+				{{ctx.Locale.Tr "repo.settings.transfer_notices_2"}} <br>
+				{{ctx.Locale.Tr "repo.settings.transfer_notices_3"}} <br>
+				{{ctx.Locale.Tr "repo.settings.transfer_notices_4"}}
+			</div>
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="transfer">
+				<div class="field">
+					<label>
+						{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
+						<span class="text red">{{.Repository.Name}}</span>
+					</label>
+				</div>
+				<div class="required field">
+					<label>{{ctx.Locale.Tr "repo.repo_name"}}</label>
+					<input name="repo_name" required>
+				</div>
+				<div class="required field">
+					<label for="new_owner_name">{{ctx.Locale.Tr "repo.settings.transfer_owner"}}</label>
+					<input id="new_owner_name" name="new_owner_name" required>
+				</div>
+
+				<div class="text right actions">
+					<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+					<button class="ui red button">{{ctx.Locale.Tr "repo.settings.transfer_perform"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+
+	<div class="ui small modal" id="delete-repo-modal">
+		<div class="header">
+			{{ctx.Locale.Tr "repo.settings.delete"}}
+		</div>
+		<div class="content">
+			<div class="ui warning message">
+				{{ctx.Locale.Tr "repo.settings.delete_notices_1"}}<br>
+				{{ctx.Locale.Tr "repo.settings.delete_notices_2" .Repository.FullName}}
+				{{if .Repository.NumForks}}<br>
+				{{ctx.Locale.Tr "repo.settings.delete_notices_fork_1"}}
+				{{end}}
+			</div>
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="delete">
+				<div class="field">
+					<label>
+						{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
+						<span class="text red">{{.Repository.Name}}</span>
+					</label>
+				</div>
+				<div class="required field">
+					<label for="repo_name_to_delete">{{ctx.Locale.Tr "repo.repo_name"}}</label>
+					<input id="repo_name_to_delete" name="repo_name" required>
+				</div>
+
+				<div class="text right actions">
+					<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+					<button class="ui red button">{{ctx.Locale.Tr "repo.settings.confirm_delete"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+
+	{{if not .Repository.IsFork}}
+		<div class="ui g-modal-confirm modal" id="visibility-repo-modal">
+			<div class="header">
+				{{ctx.Locale.Tr "repo.visibility"}}
+			</div>
+			<div class="content">
+					{{if .Repository.IsPrivate}}
+						<p>{{ctx.Locale.Tr "repo.settings.visibility.public.bullet_title"}}</p>
+						<ul>
+							<li>{{ctx.Locale.Tr "repo.settings.visibility.public.bullet_one"}}</li>
+						</ul>
+					{{else}}
+						<p>{{ctx.Locale.Tr "repo.settings.visibility.private.bullet_title"}}</p>
+						<ul>
+							<li>{{ctx.Locale.Tr "repo.settings.visibility.private.bullet_one"}}</li>
+							<li>{{ctx.Locale.Tr "repo.settings.visibility.private.bullet_two"}}{{if .Repository.NumForks}}<span class="text red">{{ctx.Locale.Tr "repo.visibility_fork_helper"}}</span>{{end}}</li>
+						</ul>
+					{{end}}
+			</div>
+			<form action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="visibility">
+				<input type="hidden" name="repo_id" value="{{.Repository.ID}}">
+				{{template "base/modal_actions_confirm" .}}
+			</form>
+		</div>
+	{{end}}
+
+	{{if .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeWiki}}
+	<div class="ui small modal" id="delete-wiki-modal">
+		<div class="header">
+			{{ctx.Locale.Tr "repo.settings.wiki_delete"}}
+		</div>
+		<div class="content">
+			<div class="ui warning message">
+				{{ctx.Locale.Tr "repo.settings.delete_notices_1"}}<br>
+				{{ctx.Locale.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name}}
+			</div>
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="delete-wiki">
+				<div class="field">
+					<label>
+						{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
+						<span class="text red">{{.Repository.Name}}</span>
+					</label>
+				</div>
+				<div class="required field">
+					<label>{{ctx.Locale.Tr "repo.repo_name"}}</label>
+					<input name="repo_name" required>
+				</div>
+
+				<div class="text right actions">
+					<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+					<button class="ui red button">{{ctx.Locale.Tr "repo.settings.confirm_wiki_delete"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+	{{end}}
+
+	{{if not .Repository.IsMirror}}
+		<div class="ui g-modal-confirm modal" id="archive-repo-modal">
+			<div class="header">
+				{{if .Repository.IsArchived}}
+					{{ctx.Locale.Tr "repo.settings.unarchive.header"}}
+				{{else}}
+					{{ctx.Locale.Tr "repo.settings.archive.header"}}
+				{{end}}
+			</div>
+			<div class="content">
+				<p>
+					{{if .Repository.IsArchived}}
+						{{ctx.Locale.Tr "repo.settings.unarchive.text"}}
+					{{else}}
+						{{ctx.Locale.Tr "repo.settings.archive.text"}}
+					{{end}}
+				</p>
+			</div>
+			<form action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<input type="hidden" name="action" value="{{if .Repository.IsArchived}}unarchive{{else}}archive{{end}}">
+				<input type="hidden" name="repo_id" value="{{.Repository.ID}}">
+				{{template "base/modal_actions_confirm" .}}
+			</form>
+		</div>
+	{{end}}
+{{end}}
+
+{{template "repo/settings/push_mirror_sync_modal" .}}
diff --git a/repo/settings/protected_branch.tmpl b/repo/settings/protected_branch.tmpl
new file mode 100644
index 0000000..61cc607
--- /dev/null
+++ b/repo/settings/protected_branch.tmpl
@@ -0,0 +1,341 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings branches")}}
+	<div class="repo-setting-content">
+		<form class="ui form" action="{{.Link}}" method="post">
+			<h4 class="ui top attached header">
+				{{ctx.Locale.Tr "repo.settings.branch_protection" .Rule.RuleName}}
+			</h4>
+			<div class="ui attached segment branch-protection">
+				<h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.protect_patterns"}}</h5>
+				<div class="field">
+					<label>{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern"}}</label>
+					<input name="rule_name" type="text" value="{{.Rule.RuleName}}">
+					<input name="rule_id" type="hidden" value="{{.Rule.ID}}">
+					<p class="help tw-ml-0">{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern_desc" "https://github.com/gobwas/glob"}}</p>
+				</div>
+				<div class="field">
+					<label>{{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns"}}</label>
+					<input name="protected_file_patterns" type="text" value="{{.Rule.ProtectedFilePatterns}}">
+					<p class="help tw-ml-0">{{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns_desc" "https://pkg.go.dev/github.com/gobwas/glob#Compile" "github.com/gobwas/glob"}}</p>
+				</div>
+				<div class="field">
+					<label>{{ctx.Locale.Tr "repo.settings.protect_unprotected_file_patterns"}}</label>
+					<input name="unprotected_file_patterns" type="text" value="{{.Rule.UnprotectedFilePatterns}}">
+					<p class="help tw-ml-0">{{ctx.Locale.Tr "repo.settings.protect_unprotected_file_patterns_desc" "https://pkg.go.dev/github.com/gobwas/glob#Compile" "github.com/gobwas/glob"}}</p>
+				</div>
+
+				{{.CsrfTokenHtml}}
+				<h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.event_push"}}</h5>
+				<div class="field">
+					<div class="ui radio checkbox">
+						<input name="enable_push" type="radio" value="none" class="toggle-target-disabled" data-target="#whitelist_box" {{if not .Rule.CanPush}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.protect_disable_push"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.protect_disable_push_desc"}}</p>
+					</div>
+				</div>
+				<div class="field">
+					<div class="ui radio checkbox">
+						<input name="enable_push" type="radio" value="all" class="toggle-target-disabled" data-target="#whitelist_box" {{if and (.Rule.CanPush) (not .Rule.EnableWhitelist)}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.protect_enable_push"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.protect_enable_push_desc"}}</p>
+					</div>
+				</div>
+				<div class="grouped fields">
+					<div class="field">
+						<div class="ui radio checkbox">
+							<input name="enable_push" type="radio" value="whitelist" class="toggle-target-enabled" data-target="#whitelist_box" {{if and (.Rule.CanPush) (.Rule.EnableWhitelist)}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.protect_whitelist_committers"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.protect_whitelist_committers_desc"}}</p>
+						</div>
+					</div>
+					<div id="whitelist_box" class="grouped fields {{if not .Rule.EnableWhitelist}}disabled{{end}}">
+						<div class="checkbox-sub-item field">
+							<label>{{ctx.Locale.Tr "repo.settings.protect_whitelist_users"}}</label>
+							<div class="ui multiple search selection dropdown">
+								<input type="hidden" name="whitelist_users" value="{{.whitelist_users}}">
+								<div class="default text">{{ctx.Locale.Tr "search.user_kind"}}</div>
+								<div class="menu">
+									{{range .Users}}
+										<div class="item" data-value="{{.ID}}">
+											{{ctx.AvatarUtils.Avatar . 28 "mini"}}{{template "repo/search_name" .}}
+										</div>
+									{{end}}
+								</div>
+							</div>
+						</div>
+						{{if .Owner.IsOrganization}}
+							<div class="checkbox-sub-item field">
+								<label>{{ctx.Locale.Tr "repo.settings.protect_whitelist_teams"}}</label>
+								<div class="ui multiple search selection dropdown">
+									<input type="hidden" name="whitelist_teams" value="{{.whitelist_teams}}">
+									<div class="default text">{{ctx.Locale.Tr "search.team_kind"}}</div>
+									<div class="menu">
+										{{range .Teams}}
+											<div class="item" data-value="{{.ID}}">
+												{{svg "octicon-people"}}
+												{{.Name}}
+											</div>
+										{{end}}
+									</div>
+								</div>
+							</div>
+						{{end}}
+						<div class="checkbox-sub-item field">
+							<div class="ui checkbox">
+								<input type="checkbox" name="whitelist_deploy_keys" {{if .Rule.WhitelistDeployKeys}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.settings.protect_whitelist_deploy_keys"}}</label>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="field">
+					<div class="ui checkbox">
+						<input name="require_signed_commits" type="checkbox" {{if .Rule.RequireSignedCommits}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.require_signed_commits"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.require_signed_commits_desc"}}</p>
+					</div>
+				</div>
+				<h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.event_force_push"}}</h5>
+				<div class="field">
+					<div class="ui radio checkbox">
+						<input type="radio" name="enable_force_push" value="none" class="toggle-target-disabled" data-target="#force_push_allowlist_box" {{if not .Rule.CanForcePush}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.protect_disable_force_push"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.protect_disable_force_push_desc"}}</p>
+					</div>
+				</div>
+				<div class="field">
+					<div class="ui radio checkbox">
+						<input type="radio" name="enable_force_push" value="all" class="toggle-target-disabled" data-target="#force_push_allowlist_box" {{if and (.Rule.CanForcePush) (not .Rule.EnableForcePushAllowlist)}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.protect_enable_force_push_all"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.protect_enable_force_push_all_desc"}}</p>
+					</div>
+				</div>
+				<div class="grouped fields">
+					<div class="field">
+						<div class="ui radio checkbox">
+							<input type="radio" name="enable_force_push" value="whitelist" class="toggle-target-enabled" data-target="#force_push_allowlist_box" {{if and (.Rule.CanForcePush) (.Rule.EnableForcePushAllowlist)}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.protect_enable_force_push_allowlist"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.protect_enable_force_push_allowlist_desc"}}</p>
+						</div>
+					</div>
+					<div id="force_push_allowlist_box" class="grouped fields {{if not .Rule.EnableForcePushAllowlist}}disabled{{end}}">
+						<div class="checkbox-sub-item field">
+							<label>{{ctx.Locale.Tr "repo.settings.protect_force_push_allowlist_users"}}</label>
+							<div class="ui multiple search selection dropdown">
+								<input type="hidden" name="force_push_allowlist_users" value="{{.force_push_allowlist_users}}">
+								<div class="default text">{{ctx.Locale.Tr "search.user_kind"}}</div>
+								<div class="menu">
+									{{range .Users}}
+										<div class="item" data-value="{{.ID}}">
+											{{ctx.AvatarUtils.Avatar . 28 "mini"}}{{template "repo/search_name" .}}
+										</div>
+									{{end}}
+								</div>
+							</div>
+						</div>
+						{{if .Owner.IsOrganization}}
+							<div class="checkbox-sub-item field">
+								<label>{{ctx.Locale.Tr "repo.settings.protect_force_push_allowlist_teams"}}</label>
+								<div class="ui multiple search selection dropdown">
+									<input type="hidden" name="force_push_allowlist_teams" value="{{.force_push_allowlist_teams}}">
+									<div class="default text">{{ctx.Locale.Tr "search.team_kind"}}</div>
+									<div class="menu">
+										{{range .Teams}}
+											<div class="item" data-value="{{.ID}}">
+												{{svg "octicon-people"}}
+												{{.Name}}
+											</div>
+										{{end}}
+									</div>
+								</div>
+							</div>
+						{{end}}
+						<div class="checkbox-sub-item field">
+							<div class="ui checkbox">
+								<input type="checkbox" name="force_push_allowlist_deploy_keys" {{if .Rule.ForcePushAllowlistDeployKeys}}checked{{end}}>
+								<label>{{ctx.Locale.Tr "repo.settings.protect_force_push_allowlist_deploy_keys"}}</label>
+							</div>
+						</div>
+					</div>
+				</div>
+				<h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.event_pull_request_approvals"}}</h5>
+				<div class="field">
+					<label>{{ctx.Locale.Tr "repo.settings.protect_required_approvals"}}</label>
+					<input name="required_approvals" type="number" value="{{.Rule.RequiredApprovals}}">
+					<p class="help tw-ml-0">{{ctx.Locale.Tr "repo.settings.protect_required_approvals_desc"}}</p>
+				</div>
+				<div class="grouped fields">
+					<div class="field">
+						<div class="ui checkbox">
+							<input name="enable_approvals_whitelist" type="checkbox" class="toggle-target-enabled" data-target="#approvals_whitelist_box" {{if .Rule.EnableApprovalsWhitelist}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.protect_approvals_whitelist_enabled"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.protect_approvals_whitelist_enabled_desc"}}</p>
+						</div>
+					</div>
+					<div id="approvals_whitelist_box" class="grouped fields {{if not .Rule.EnableApprovalsWhitelist}}disabled{{end}}">
+						<div class="checkbox-sub-item field">
+							<label>{{ctx.Locale.Tr "repo.settings.protect_approvals_whitelist_users"}}</label>
+							<div class="ui multiple search selection dropdown">
+								<input type="hidden" name="approvals_whitelist_users" value="{{.approvals_whitelist_users}}">
+								<div class="default text">{{ctx.Locale.Tr "search.user_kind"}}</div>
+								<div class="menu">
+								{{range .Users}}
+									<div class="item" data-value="{{.ID}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}{{template "repo/search_name" .}}
+									</div>
+								{{end}}
+								</div>
+							</div>
+						</div>
+						{{if .Owner.IsOrganization}}
+							<div class="checkbox-sub-item field">
+								<label>{{ctx.Locale.Tr "repo.settings.protect_approvals_whitelist_teams"}}</label>
+								<div class="ui multiple search selection dropdown">
+									<input type="hidden" name="approvals_whitelist_teams" value="{{.approvals_whitelist_teams}}">
+									<div class="default text">{{ctx.Locale.Tr "search.team_kind"}}</div>
+									<div class="menu">
+									{{range .Teams}}
+										<div class="item" data-value="{{.ID}}">
+											{{svg "octicon-people"}}
+										{{.Name}}
+										</div>
+									{{end}}
+									</div>
+								</div>
+							</div>
+						{{end}}
+					</div>
+				</div>
+				<div class="field">
+					<div class="ui checkbox">
+						<input id="dismiss_stale_approvals" name="dismiss_stale_approvals" type="checkbox" {{if .Rule.DismissStaleApprovals}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.dismiss_stale_approvals"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.dismiss_stale_approvals_desc"}}</p>
+					</div>
+				</div>
+				<div id="ignore_stale_approvals_box" class="field {{if .Rule.DismissStaleApprovals}}disabled{{end}}">
+					<div class="ui checkbox">
+						<input id="ignore_stale_approvals" name="ignore_stale_approvals" type="checkbox" {{if .Rule.IgnoreStaleApprovals}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.ignore_stale_approvals"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.ignore_stale_approvals_desc"}}</p>
+					</div>
+				</div>
+				<div class="grouped fields">
+					<div class="field">
+						<div class="ui checkbox">
+							<input name="enable_status_check" type="checkbox" class="toggle-target-enabled" data-target="#statuscheck_contexts_box" {{if .Rule.EnableStatusCheck}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.protect_check_status_contexts"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.protect_check_status_contexts_desc"}}</p>
+						</div>
+					</div>
+					<div id="statuscheck_contexts_box" class="checkbox-sub-item field {{if not .Rule.EnableStatusCheck}}disabled{{end}}">
+						<label>{{ctx.Locale.Tr "repo.settings.protect_status_check_patterns"}}</label>
+						<textarea id="status_check_contexts" name="status_check_contexts" rows="3">{{.status_check_contexts}}</textarea>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.protect_status_check_patterns_desc"}}</p>
+						<table class="ui celled table">
+							<thead>
+								<tr>
+									<th>{{ctx.Locale.Tr "repo.settings.protect_check_status_contexts_list"}}</th>
+								</tr>
+							</thead>
+							<tbody>
+							{{range $.recent_status_checks}}
+								<tr>
+									<td>
+										<span>{{.}}</span>
+										<span class="status-check-matched-mark tw-hidden" data-status-check="{{.}}">{{ctx.Locale.Tr "repo.settings.protect_status_check_matched"}}</span>
+									</td>
+								</tr>
+							{{else}}
+								<tr><td>-</td></tr>
+							{{end}}
+							</tbody>
+						</table>
+					</div>
+				</div>
+				<h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.event_pull_request_merge"}}</h5>
+				<div class="grouped fields">
+					<div class="field">
+						<div class="ui radio checkbox">
+							<input name="enable_merge_whitelist" type="radio" value="false" class="toggle-target-disabled" data-target="#merge_whitelist_box" {{if not .Rule.EnableMergeWhitelist}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.protect_enable_merge"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.protect_enable_merge_desc"}}</p>
+						</div>
+					</div>
+					<div class="field">
+						<div class="ui radio checkbox">
+							<input name="enable_merge_whitelist" type="radio" value="true" class="toggle-target-enabled" data-target="#merge_whitelist_box" {{if .Rule.EnableMergeWhitelist}}checked{{end}}>
+							<label>{{ctx.Locale.Tr "repo.settings.protect_merge_whitelist_committers"}}</label>
+							<p class="help">{{ctx.Locale.Tr "repo.settings.protect_merge_whitelist_committers_desc"}}</p>
+						</div>
+					</div>
+					<div id="merge_whitelist_box" class="grouped fields {{if not .Rule.EnableMergeWhitelist}}disabled{{end}}">
+						<div class="checkbox-sub-item field">
+							<label>{{ctx.Locale.Tr "repo.settings.protect_merge_whitelist_users"}}</label>
+							<div class="ui multiple search selection dropdown">
+								<input type="hidden" name="merge_whitelist_users" value="{{.merge_whitelist_users}}">
+								<div class="default text">{{ctx.Locale.Tr "search.user_kind"}}</div>
+								<div class="menu">
+								{{range .Users}}
+									<div class="item" data-value="{{.ID}}">
+										{{ctx.AvatarUtils.Avatar . 28 "mini"}}{{template "repo/search_name" .}}
+									</div>
+								{{end}}
+								</div>
+							</div>
+						</div>
+					{{if .Owner.IsOrganization}}
+						<div class="checkbox-sub-item field">
+							<label>{{ctx.Locale.Tr "repo.settings.protect_merge_whitelist_teams"}}</label>
+							<div class="ui multiple search selection dropdown">
+								<input type="hidden" name="merge_whitelist_teams" value="{{.merge_whitelist_teams}}">
+								<div class="default text">{{ctx.Locale.Tr "search.team_kind"}}</div>
+								<div class="menu">
+								{{range .Teams}}
+									<div class="item" data-value="{{.ID}}">
+										{{svg "octicon-people"}}
+									{{.Name}}
+									</div>
+								{{end}}
+								</div>
+							</div>
+						</div>
+					{{end}}
+					</div>
+				</div>
+				<div class="field">
+					<div class="ui checkbox">
+						<input name="block_on_rejected_reviews" type="checkbox" {{if .Rule.BlockOnRejectedReviews}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.block_rejected_reviews"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.block_rejected_reviews_desc"}}</p>
+					</div>
+				</div>
+				<div class="field">
+					<div class="ui checkbox">
+						<input name="block_on_official_review_requests" type="checkbox" {{if .Rule.BlockOnOfficialReviewRequests}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.block_on_official_review_requests"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.block_on_official_review_requests_desc"}}</p>
+					</div>
+				</div>
+				<div class="field">
+					<div class="ui checkbox">
+						<input name="block_on_outdated_branch" type="checkbox" {{if .Rule.BlockOnOutdatedBranch}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.block_outdated_branch"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.block_outdated_branch_desc"}}</p>
+					</div>
+				</div>
+				<div class="field">
+					<div class="ui checkbox">
+						<input name="block_admin_merge_override" type="checkbox" {{if .Rule.BlockAdminMergeOverride}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "repo.settings.block_admin_merge_override"}}</label>
+						<p class="help">{{ctx.Locale.Tr "repo.settings.block_admin_merge_override_desc"}}</p>
+					</div>
+				</div>
+				<div class="divider"></div>
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.protected_branch.save_rule"}}</button>
+				</div>
+			</div>
+		</form>
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/push_mirror_sync_modal.tmpl b/repo/settings/push_mirror_sync_modal.tmpl
new file mode 100644
index 0000000..e8dad61
--- /dev/null
+++ b/repo/settings/push_mirror_sync_modal.tmpl
@@ -0,0 +1,32 @@
+<div class="ui small modal" id="push-mirror-edit-modal">
+	<div class="header">
+		{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.edit_sync_time"}}
+	</div>
+	<div class="content">
+		<form class="ui form ignore-dirty" method="post">
+			{{.CsrfTokenHtml}}
+			<input type="hidden" name="action" value="push-mirror-update">
+			<input type="hidden" name="push_mirror_id" id="push-mirror-edit-id">
+			<div class="field">
+				<label for="name">{{ctx.Locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}</label>
+				<div class="ui small input">
+					<input id="push-mirror-edit-address" readonly>
+				</div>
+			</div>
+			<div class="inline field">
+				<label for="push-mirror-edit-interval">{{ctx.Locale.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
+				<input id="push-mirror-edit-interval" name="push_mirror_interval" autofocus>
+			</div>
+			<div class="actions">
+				<button class="ui small basic cancel button">
+					{{svg "octicon-x"}}
+					{{ctx.Locale.Tr "cancel"}}
+				</button>
+				<button class="ui primary small approve button">
+					{{svg "fontawesome-save"}}
+					{{ctx.Locale.Tr "save"}}
+				</button>
+			</div>
+		</form>
+	</div>
+</div>
diff --git a/repo/settings/runner_edit.tmpl b/repo/settings/runner_edit.tmpl
new file mode 100644
index 0000000..8b76aea
--- /dev/null
+++ b/repo/settings/runner_edit.tmpl
@@ -0,0 +1,5 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings runners")}}
+	<div class="repo-setting-content">
+		{{template "shared/actions/runner_edit" .}}
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/secrets.tmpl b/repo/settings/secrets.tmpl
new file mode 100644
index 0000000..0b89639
--- /dev/null
+++ b/repo/settings/secrets.tmpl
@@ -0,0 +1,5 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings")}}
+	<div class="repo-setting-content">
+		{{template "shared/secrets/add_list" .}}
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/tags.tmpl b/repo/settings/tags.tmpl
new file mode 100644
index 0000000..27b0f51
--- /dev/null
+++ b/repo/settings/tags.tmpl
@@ -0,0 +1,126 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit")}}
+	<div class="repo-setting-content">
+		{{if .Repository.IsArchived}}
+			<div class="ui warning message tw-text-center">
+				{{ctx.Locale.Tr "repo.settings.archive.tagsettings_unavailable"}}
+			</div>
+		{{else}}
+			<h4 class="ui top attached header">
+				{{ctx.Locale.Tr "repo.settings.tags.protection"}}
+			</h4>
+
+			<div class="ui attached segment">
+				<div class="ui grid">
+					<div class="sixteen wide column">
+						<div class="ui segment">
+							<form class="ui form" action="{{.Link}}" method="post">
+								{{.CsrfTokenHtml}}
+								<div class="field">
+									<label>{{ctx.Locale.Tr "repo.settings.tags.protection.pattern"}}</label>
+									<div id="search-tag-box" class="ui search">
+										<div class="ui input">
+											<input class="prompt" name="name_pattern" autocomplete="off" value="{{.name_pattern}}" placeholder="v*" autofocus required>
+										</div>
+										<div class="help">{{ctx.Locale.Tr "repo.settings.tags.protection.pattern.description" "https://docs.gitea.com/usage/protected-tags"}}</div>
+									</div>
+								</div>
+								<div class="whitelist field">
+									<label>{{ctx.Locale.Tr "repo.settings.tags.protection.allowed.users"}}</label>
+									<div class="ui multiple search selection dropdown">
+										<input type="hidden" name="allowlist_users" value="{{.allowlist_users}}">
+										<div class="default text">{{ctx.Locale.Tr "search.user_kind"}}</div>
+										<div class="menu">
+											{{range .Users}}
+												<div class="item" data-value="{{.ID}}">
+													{{ctx.AvatarUtils.Avatar . 28 "mini"}}{{template "repo/search_name" .}}
+												</div>
+											{{end}}
+										</div>
+									</div>
+								</div>
+								{{if .Owner.IsOrganization}}
+									<div class="whitelist field">
+										<label>{{ctx.Locale.Tr "repo.settings.tags.protection.allowed.teams"}}</label>
+										<div class="ui multiple search selection dropdown">
+											<input type="hidden" name="allowlist_teams" value="{{.allowlist_teams}}">
+											<div class="default text">{{ctx.Locale.Tr "search.team_kind"}}</div>
+											<div class="menu">
+												{{range .Teams}}
+													<div class="item" data-value="{{.ID}}">
+														{{svg "octicon-people"}}
+														{{.Name}}
+													</div>
+												{{end}}
+											</div>
+										</div>
+									</div>
+								{{end}}
+								<div class="field">
+									{{if .PageIsEditProtectedTag}}
+									<button class="ui primary button">
+										{{ctx.Locale.Tr "save"}}
+									</button>
+									<a class="ui primary button" href="{{$.RepoLink}}/settings/tags">
+										{{ctx.Locale.Tr "cancel"}}
+									</a>
+									{{else}}
+									<button class="ui primary button">
+										{{ctx.Locale.Tr "repo.settings.tags.protection.create"}}
+									</button>
+									{{end}}
+								</div>
+							</form>
+						</div>
+					</div>
+
+					<div class="sixteen wide column">
+						<table class="ui single line table">
+							<thead>
+								<th>{{ctx.Locale.Tr "repo.settings.tags.protection.pattern"}}</th>
+								<th>{{ctx.Locale.Tr "repo.settings.tags.protection.allowed"}}</th>
+								<th></th>
+							</thead>
+							<tbody>
+								{{range .ProtectedTags}}
+									<tr>
+										<td><pre>{{.NamePattern}}</pre></td>
+										<td>
+											{{if or .AllowlistUserIDs (and $.Owner.IsOrganization .AllowlistTeamIDs)}}
+												{{$userIDs := .AllowlistUserIDs}}
+												{{range $.Users}}
+													{{if SliceUtils.Contains $userIDs .ID}}
+														<a class="ui basic label" href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 26}} {{.GetDisplayName}}</a>
+													{{end}}
+												{{end}}
+												{{if $.Owner.IsOrganization}}
+													{{$teamIDs := .AllowlistTeamIDs}}
+													{{range $.Teams}}
+														{{if SliceUtils.Contains $teamIDs .ID}}
+															<a class="ui basic label" href="{{$.Owner.OrganisationLink}}/teams/{{PathEscape .LowerName}}">{{.Name}}</a>
+														{{end}}
+													{{end}}
+												{{end}}
+											{{else}}
+												{{ctx.Locale.Tr "repo.settings.tags.protection.allowed.noone"}}
+											{{end}}
+										</td>
+										<td class="right aligned">
+											<a class="ui tiny primary button" href="{{$.RepoLink}}/settings/tags/{{.ID}}">{{ctx.Locale.Tr "edit"}}</a>
+											<form class="tw-inline-block" action="{{$.RepoLink}}/settings/tags/delete" method="post">
+												{{$.CsrfTokenHtml}}
+												<input type="hidden" name="id" value="{{.ID}}">
+												<button class="ui tiny red button">{{ctx.Locale.Tr "remove"}}</button>
+											</form>
+										</td>
+									</tr>
+								{{else}}
+									<tr class="center aligned"><td colspan="3">{{ctx.Locale.Tr "repo.settings.tags.protection.none"}}</td></tr>
+								{{end}}
+							</tbody>
+						</table>
+					</div>
+				</div>
+			</div>
+		{{end}}
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/webhook/base.tmpl b/repo/settings/webhook/base.tmpl
new file mode 100644
index 0000000..d524722
--- /dev/null
+++ b/repo/settings/webhook/base.tmpl
@@ -0,0 +1,5 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings webhooks")}}
+	<div class="repo-setting-content">
+		{{template "repo/settings/webhook/list" .}}
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/webhook/base_list.tmpl b/repo/settings/webhook/base_list.tmpl
new file mode 100644
index 0000000..36e75a7
--- /dev/null
+++ b/repo/settings/webhook/base_list.tmpl
@@ -0,0 +1,26 @@
+<h4 class="ui top attached header">
+	{{.Title}}
+	<div class="ui right">
+		<div class="ui jump dropdown">
+			<div class="ui primary tiny button">{{ctx.Locale.Tr "repo.settings.add_webhook"}}</div>
+			{{template "repo/settings/webhook/link_menu" .}}
+		</div>
+	</div>
+</h4>
+<div class="ui attached segment">
+	<div class="ui list">
+		<div class="item">
+			{{.Description}}
+		</div>
+		{{range .Webhooks}}
+			<div class="item truncated-item-container">
+				<span class="text {{if eq .LastStatus 1}}green{{else if eq .LastStatus 2}}red{{else}}grey{{end}} tw-mr-2">{{svg "octicon-dot-fill" 22}}</span>
+				<div class="text truncate tw-flex-1 tw-mr-2">
+					<a title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a>
+				</div>
+				<a class="muted tw-p-2" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
+				<a class="delete-button tw-p-2" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}}</a>
+			</div>
+		{{end}}
+	</div>
+</div>
diff --git a/repo/settings/webhook/delete_modal.tmpl b/repo/settings/webhook/delete_modal.tmpl
new file mode 100644
index 0000000..9955ed3
--- /dev/null
+++ b/repo/settings/webhook/delete_modal.tmpl
@@ -0,0 +1,10 @@
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.settings.webhook_deletion"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.settings.webhook_deletion_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
diff --git a/repo/settings/webhook/dingtalk.tmpl b/repo/settings/webhook/dingtalk.tmpl
new file mode 100644
index 0000000..0ba99e9
--- /dev/null
+++ b/repo/settings/webhook/dingtalk.tmpl
@@ -0,0 +1,11 @@
+{{if eq .HookType "dingtalk"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://dingtalk.com" (ctx.Locale.Tr "repo.settings.web_hook_name_dingtalk")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/dingtalk/{{or .Webhook.ID "new"}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_PayloadURL}}error{{end}}">
+			<label for="payload_url">{{ctx.Locale.Tr "repo.settings.payload_url"}}</label>
+			<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/discord.tmpl b/repo/settings/webhook/discord.tmpl
new file mode 100644
index 0000000..104346e
--- /dev/null
+++ b/repo/settings/webhook/discord.tmpl
@@ -0,0 +1,19 @@
+{{if eq .HookType "discord"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://discord.com" (ctx.Locale.Tr "repo.settings.web_hook_name_discord")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/discord/{{or .Webhook.ID "new"}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_PayloadURL}}error{{end}}">
+			<label for="payload_url">{{ctx.Locale.Tr "repo.settings.payload_url"}}</label>
+			<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+		</div>
+		<div class="field">
+			<label for="username">{{ctx.Locale.Tr "repo.settings.discord_username"}}</label>
+			<input id="username" name="username" value="{{.DiscordHook.Username}}" placeholder="Gitea">
+		</div>
+		<div class="field">
+			<label for="icon_url">{{ctx.Locale.Tr "repo.settings.discord_icon_url"}}</label>
+			<input id="icon_url" name="icon_url" value="{{.DiscordHook.IconURL}}" placeholder="https://example.com/assets/img/logo.svg">
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/feishu.tmpl b/repo/settings/webhook/feishu.tmpl
new file mode 100644
index 0000000..d80deab
--- /dev/null
+++ b/repo/settings/webhook/feishu.tmpl
@@ -0,0 +1,12 @@
+{{if eq .HookType "feishu"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://feishu.cn" (ctx.Locale.Tr "repo.settings.web_hook_name_feishu")}}</p>
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://larksuite.com" (ctx.Locale.Tr "repo.settings.web_hook_name_larksuite")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/feishu/{{or .Webhook.ID "new"}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_PayloadURL}}error{{end}}">
+			<label for="payload_url">{{ctx.Locale.Tr "repo.settings.payload_url"}}</label>
+			<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/gitea.tmpl b/repo/settings/webhook/gitea.tmpl
new file mode 100644
index 0000000..e6eb61e
--- /dev/null
+++ b/repo/settings/webhook/gitea.tmpl
@@ -0,0 +1,40 @@
+{{if eq .HookType "gitea"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://docs.gitea.com/usage/webhooks" (ctx.Locale.Tr "repo.settings.web_hook_name_gitea")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/gitea/{{or .Webhook.ID "new"}}" method="post">
+		{{template "base/disable_form_autofill"}}
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_PayloadURL}}error{{end}}">
+			<label for="payload_url">{{ctx.Locale.Tr "repo.settings.payload_url"}}</label>
+			<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "repo.settings.http_method"}}</label>
+			<div class="ui selection dropdown">
+				<input type="hidden" id="http_method" name="http_method" value="{{if .Webhook.HTTPMethod}}{{.Webhook.HTTPMethod}}{{else}}POST{{end}}">
+				<div class="default text"></div>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				<div class="menu">
+					<div class="item" data-value="POST">POST</div>
+					<div class="item" data-value="GET">GET</div>
+				</div>
+			</div>
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "repo.settings.content_type"}}</label>
+			<div class="ui selection dropdown">
+				<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}1{{end}}">
+				<div class="default text"></div>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				<div class="menu">
+					<div class="item" data-value="1">application/json</div>
+					<div class="item" data-value="2">application/x-www-form-urlencoded</div>
+				</div>
+			</div>
+		</div>
+		<div class="field {{if .Err_Secret}}error{{end}}">
+			<label for="secret">{{ctx.Locale.Tr "repo.settings.secret"}}</label>
+			<input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/gogs.tmpl b/repo/settings/webhook/gogs.tmpl
new file mode 100644
index 0000000..e91a327
--- /dev/null
+++ b/repo/settings/webhook/gogs.tmpl
@@ -0,0 +1,28 @@
+{{if eq .HookType "gogs"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://docs.gitea.com/usage/webhooks" (ctx.Locale.Tr "repo.settings.web_hook_name_gogs")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/gogs/{{or .Webhook.ID "new"}}" method="post">
+		{{template "base/disable_form_autofill"}}
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_PayloadURL}}error{{end}}">
+			<label for="payload_url">{{ctx.Locale.Tr "repo.settings.payload_url"}}</label>
+			<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "repo.settings.content_type"}}</label>
+			<div class="ui selection dropdown">
+				<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}1{{end}}">
+				<div class="default text"></div>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				<div class="menu">
+					<div class="item" data-value="1">application/json</div>
+					<div class="item" data-value="2">application/x-www-form-urlencoded</div>
+				</div>
+			</div>
+		</div>
+		<div class="field {{if .Err_Secret}}error{{end}}">
+			<label for="secret">{{ctx.Locale.Tr "repo.settings.secret"}}</label>
+			<input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/history.tmpl b/repo/settings/webhook/history.tmpl
new file mode 100644
index 0000000..ea3c037
--- /dev/null
+++ b/repo/settings/webhook/history.tmpl
@@ -0,0 +1,92 @@
+{{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminDefaultHooksNew .PageIsAdminSystemHooksNew}}
+{{if .PageIsSettingsHooksEdit}}
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "repo.settings.recent_deliveries"}}
+		{{if .Permission.IsAdmin}}
+			<div class="ui right">
+				<!-- the button is wrapped with a span because the tooltip doesn't show on hover if we put data-tooltip-content directly on the button -->
+				<span data-tooltip-content="{{if or $isNew .Webhook.IsActive}}{{ctx.Locale.Tr "repo.settings.webhook.test_delivery_desc"}}{{else}}{{ctx.Locale.Tr "repo.settings.webhook.test_delivery_desc_disabled"}}{{end}}">
+					<button class="ui tiny button{{if not (or $isNew .Webhook.IsActive)}} disabled{{end}}" id="test-delivery" data-link="{{.Link}}/test" data-redirect="{{.Link}}">
+						<span class="text">{{ctx.Locale.Tr "repo.settings.webhook.test_delivery"}}</span>
+					</button>
+			</span>
+			</div>
+		{{end}}
+	</h4>
+	<div class="ui attached segment">
+		<div class="ui list">
+			{{range .History}}
+				<div class="item">
+					<div class="flex-text-block tw-justify-between">
+						<div class="flex-text-inline">
+							{{if .IsSucceed}}
+								<span class="text green">{{svg "octicon-check"}}</span>
+							{{else if not .IsDelivered}}
+								<span class="text orange">{{svg "octicon-stopwatch"}}</span>
+							{{else}}
+								<span class="text red">{{svg "octicon-alert"}}</span>
+							{{end}}
+							<a class="ui primary sha label toggle button show-panel" data-panel="#info-{{.ID}}">{{.UUID}}</a>
+						</div>
+						<span class="text grey">
+							{{DateUtils.TimeSince .Delivered}}
+						</span>
+					</div>
+					<div class="info tw-hidden" id="info-{{.ID}}">
+						<div class="ui top attached tabular menu">
+							<a class="item active" data-tab="request-{{.ID}}">
+								{{template "shared/misc/tabtitle" (ctx.Locale.Tr "repo.settings.webhook.request")}}
+							</a>
+							<a class="item" data-tab="response-{{.ID}}">
+								{{template "shared/misc/tabtitle" (ctx.Locale.Tr "repo.settings.webhook.response")}}
+								{{if .ResponseInfo}}
+									{{if .IsSucceed}}
+										<span class="ui green label">{{.ResponseInfo.Status}}</span>
+									{{else}}
+										<span class="ui red label">{{.ResponseInfo.Status}}</span>
+									{{end}}
+								{{else}}
+									<span class="ui label">-</span>
+								{{end}}
+							</a>
+							{{if or $.Permission.IsAdmin $.IsOrganizationOwner $.PageIsAdmin $.PageIsUserSettings}}
+							<div class="right menu">
+								<form class="tw-py-2" action="{{$.Link}}/replay/{{.UUID}}" method="post">
+									{{$.CsrfTokenHtml}}
+									<span data-tooltip-content="{{if $.Webhook.IsActive}}{{ctx.Locale.Tr "repo.settings.webhook.replay.description"}}{{else}}{{ctx.Locale.Tr "repo.settings.webhook.replay.description_disabled"}}{{end}}">
+										<button class="ui tiny button tw-mr-0{{if not $.Webhook.IsActive}} disabled{{end}}">{{svg "octicon-sync"}}</button>
+									</span>
+								</form>
+							</div>
+							{{end}}
+						</div>
+						<div class="ui bottom attached tab segment active" data-tab="request-{{.ID}}">
+							{{if .RequestInfo}}
+								<h5>{{ctx.Locale.Tr "repo.settings.webhook.headers"}}</h5>
+								<pre class="webhook-info"><strong>Request URL:</strong> {{.RequestInfo.URL}}
+<strong>Request method:</strong> {{if .RequestInfo.HTTPMethod}}{{.RequestInfo.HTTPMethod}}{{else}}POST{{end}}
+{{range $key, $val := .RequestInfo.Headers}}<strong>{{$key}}:</strong> {{$val}}
+{{end}}</pre>
+								<h5>{{ctx.Locale.Tr "repo.settings.webhook.payload"}}</h5>
+								<pre class="webhook-info"><code class="json">{{or .RequestInfo.Body .PayloadContent}}</code></pre>
+							{{else}}
+								-
+							{{end}}
+						</div>
+						<div class="ui bottom attached tab segment" data-tab="response-{{.ID}}">
+							{{if .ResponseInfo}}
+								<h5>{{ctx.Locale.Tr "repo.settings.webhook.headers"}}</h5>
+								<pre class="webhook-info">{{range $key, $val := .ResponseInfo.Headers}}<strong>{{$key}}:</strong> {{$val}}
+{{end}}</pre>
+								<h5>{{ctx.Locale.Tr "repo.settings.webhook.body"}}</h5>
+								<pre class="webhook-info"><code>{{.ResponseInfo.Body}}</code></pre>
+							{{else}}
+								-
+							{{end}}
+						</div>
+					</div>
+				</div>
+			{{end}}
+		</div>
+	</div>
+{{end}}
diff --git a/repo/settings/webhook/link_menu.tmpl b/repo/settings/webhook/link_menu.tmpl
new file mode 100644
index 0000000..e2c86dc
--- /dev/null
+++ b/repo/settings/webhook/link_menu.tmpl
@@ -0,0 +1,50 @@
+{{$size := 20}}
+{{if .Size}}
+	{{$size = .Size}}
+{{end}}
+<div class="menu">
+	<a class="item" href="{{.BaseLinkNew}}/gitea/new">
+		{{template "shared/webhook/icon" (dict "HookType" "gitea" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_gitea"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/gogs/new">
+		{{template "shared/webhook/icon" (dict "HookType" "gogs" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_gogs"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/slack/new">
+		{{template "shared/webhook/icon" (dict "HookType" "slack" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_slack"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/discord/new">
+		{{template "shared/webhook/icon" (dict "HookType" "discord" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_discord"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/dingtalk/new">
+		{{template "shared/webhook/icon" (dict "HookType" "dingtalk" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_dingtalk"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/telegram/new">
+		{{template "shared/webhook/icon" (dict "HookType" "telegram" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_telegram"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/msteams/new">
+		{{template "shared/webhook/icon" (dict "HookType" "msteams" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_msteams"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/feishu/new">
+		{{template "shared/webhook/icon" (dict "HookType" "feishu" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_feishu_or_larksuite"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/matrix/new">
+		{{template "shared/webhook/icon" (dict "HookType" "matrix" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_matrix"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/wechatwork/new">
+		{{template "shared/webhook/icon" (dict "HookType" "wechatwork" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_wechatwork"}}
+	</a>
+	<a class="item" href="{{.BaseLinkNew}}/packagist/new">
+		{{template "shared/webhook/icon" (dict "HookType" "packagist" "Size" $size)}}
+		{{ctx.Locale.Tr "repo.settings.web_hook_name_packagist"}}
+	</a>
+</div>
diff --git a/repo/settings/webhook/list.tmpl b/repo/settings/webhook/list.tmpl
new file mode 100644
index 0000000..b24159f
--- /dev/null
+++ b/repo/settings/webhook/list.tmpl
@@ -0,0 +1,4 @@
+
+{{template "repo/settings/webhook/base_list" .}}
+
+{{template "repo/settings/webhook/delete_modal" .}}
diff --git a/repo/settings/webhook/matrix.tmpl b/repo/settings/webhook/matrix.tmpl
new file mode 100644
index 0000000..7f1c9f0
--- /dev/null
+++ b/repo/settings/webhook/matrix.tmpl
@@ -0,0 +1,27 @@
+{{if eq .HookType "matrix"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://matrix.org/" (ctx.Locale.Tr "repo.settings.web_hook_name_matrix")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/matrix/{{or .Webhook.ID "new"}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_HomeserverURL}}error{{end}}">
+			<label for="homeserver_url">{{ctx.Locale.Tr "repo.settings.matrix.homeserver_url"}}</label>
+			<input id="homeserver_url" name="homeserver_url" type="url" value="{{.MatrixHook.HomeserverURL}}" autofocus required>
+		</div>
+		<div class="required field {{if .Err_Room}}error{{end}}">
+			<label for="room_id">{{ctx.Locale.Tr "repo.settings.matrix.room_id"}}</label>
+			<input id="room_id" name="room_id" type="text" value="{{.MatrixHook.Room}}" required>
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "repo.settings.matrix.message_type"}}</label>
+				<div class="ui selection dropdown">
+				<input type="hidden" id="message_type" name="message_type" value="{{if .MatrixHook.MessageType}}{{.MatrixHook.MessageType}}{{else}}1{{end}}">
+				<div class="default text"></div>
+				{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				<div class="menu">
+					<div class="item" data-value="1">m.notice</div>
+					<div class="item" data-value="2">m.text</div>
+				</div>
+			</div>
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/msteams.tmpl b/repo/settings/webhook/msteams.tmpl
new file mode 100644
index 0000000..62ea24e
--- /dev/null
+++ b/repo/settings/webhook/msteams.tmpl
@@ -0,0 +1,11 @@
+{{if eq .HookType "msteams"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://teams.microsoft.com" (ctx.Locale.Tr "repo.settings.web_hook_name_msteams")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/msteams/{{or .Webhook.ID "new"}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_PayloadURL}}error{{end}}">
+			<label for="payload_url">{{ctx.Locale.Tr "repo.settings.payload_url"}}</label>
+			<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/new.tmpl b/repo/settings/webhook/new.tmpl
new file mode 100644
index 0000000..b04a442
--- /dev/null
+++ b/repo/settings/webhook/new.tmpl
@@ -0,0 +1,7 @@
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings new webhook")}}
+	<div class="repo-setting-content">
+		{{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}}
+		{{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}}
+		{{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}}
+	</div>
+{{template "repo/settings/layout_footer" .}}
diff --git a/repo/settings/webhook/packagist.tmpl b/repo/settings/webhook/packagist.tmpl
new file mode 100644
index 0000000..25aba2a
--- /dev/null
+++ b/repo/settings/webhook/packagist.tmpl
@@ -0,0 +1,19 @@
+{{if eq .HookType "packagist"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://packagist.org" (ctx.Locale.Tr "repo.settings.web_hook_name_packagist")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/packagist/{{or .Webhook.ID "new"}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_Username}}error{{end}}">
+			<label for="username">{{ctx.Locale.Tr "repo.settings.packagist_username"}}</label>
+			<input id="username" name="username" value="{{.PackagistHook.Username}}" placeholder="Gitea" autofocus required>
+		</div>
+		<div class="required field {{if .Err_APIToken}}error{{end}}">
+			<label for="api_token">{{ctx.Locale.Tr "repo.settings.packagist_api_token"}}</label>
+			<input id="api_token" name="api_token" value="{{.PackagistHook.APIToken}}" placeholder="X5F_tZ-Wj3c1vqaU2Rky" required>
+		</div>
+		<div class="required field {{if .Err_PackageURL}}error{{end}}">
+			<label for="package_url">{{ctx.Locale.Tr "repo.settings.packagist_package_url"}}</label>
+			<input id="package_url" name="package_url" value="{{.PackagistHook.PackageURL}}" placeholder="https://packagist.org/packages/laravel/framework" required>
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/settings.tmpl b/repo/settings/webhook/settings.tmpl
new file mode 100644
index 0000000..07e7305
--- /dev/null
+++ b/repo/settings/webhook/settings.tmpl
@@ -0,0 +1,299 @@
+{{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminDefaultHooksNew .PageIsAdminSystemHooksNew}}
+<div class="field">
+	<h4>{{ctx.Locale.Tr "repo.settings.event_desc"}}</h4>
+	<div class="grouped event type fields">
+		<div class="field">
+			<div class="ui radio non-events checkbox">
+				<input name="events" type="radio" value="push_only" {{if or $isNew .Webhook.PushOnly}}checked{{end}}>
+				<label>{{ctx.Locale.Tr "repo.settings.event_push_only"}}</label>
+			</div>
+		</div>
+		<div class="field">
+			<div class="ui radio non-events checkbox">
+				<input name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
+				<label>{{ctx.Locale.Tr "repo.settings.event_send_everything"}}</label>
+			</div>
+		</div>
+		<div class="field">
+			<div class="ui radio events checkbox">
+				<input name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
+				<label>{{ctx.Locale.Tr "repo.settings.event_choose"}}</label>
+			</div>
+		</div>
+	</div>
+
+	<div class="events fields ui grid {{if not .Webhook.ChooseEvents}}tw-hidden{{end}}">
+		<!-- Repository Events -->
+		<div class="fourteen wide column">
+			<label>{{ctx.Locale.Tr "repo.settings.event_header_repository"}}</label>
+		</div>
+		<!-- Create -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="create" type="checkbox" {{if .Webhook.Create}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_create"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_create_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Delete -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="delete" type="checkbox" {{if .Webhook.Delete}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_delete"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_delete_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Fork -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="fork" type="checkbox" {{if .Webhook.Fork}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_fork"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_fork_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Push -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="push" type="checkbox" {{if .Webhook.Push}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_push"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_push_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Repository -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="repository" type="checkbox" {{if .Webhook.Repository}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_repository"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_repository_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Release -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="release" type="checkbox" {{if .Webhook.Release}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_release"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_release_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Package -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="package" type="checkbox" {{if .Webhook.Package}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_package"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_package_desc"}}</span>
+				</div>
+			</div>
+		</div>
+
+		<!-- Wiki -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="wiki" type="checkbox" {{if .Webhook.Wiki}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_wiki"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_wiki_desc"}}</span>
+				</div>
+			</div>
+		</div>
+
+		<!-- Status -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="status" type="checkbox" {{if .Webhook.Status}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_statuses"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_statuses_desc"}}</span>
+				</div>
+			</div>
+		</div>
+
+		<!-- Issue Events -->
+		<div class="fourteen wide column">
+			<label>{{ctx.Locale.Tr "repo.settings.event_header_issue"}}</label>
+		</div>
+		<!-- Issues -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="issues" type="checkbox" {{if .Webhook.Issues}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_issues"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_issues_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Issue Assign -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="issue_assign" type="checkbox" {{if .Webhook.IssueAssign}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_issue_assign"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_issue_assign_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Issue Label -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="issue_label" type="checkbox" {{if .Webhook.IssueLabel}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_issue_label"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_issue_label_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Issue Milestone -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="issue_milestone" type="checkbox" {{if .Webhook.IssueMilestone}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_issue_milestone"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_issue_milestone_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Issue Comment -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="issue_comment" type="checkbox" {{if .Webhook.IssueComment}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_issue_comment"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_issue_comment_desc"}}</span>
+				</div>
+			</div>
+		</div>
+
+		<!-- Pull Request Events -->
+		<div class="fourteen wide column">
+			<label>{{ctx.Locale.Tr "repo.settings.event_header_pull_request"}}</label>
+		</div>
+		<!-- Pull Request -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="pull_request" type="checkbox" {{if .Webhook.PullRequest}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_pull_request"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Pull Request Assign -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="pull_request_assign" type="checkbox" {{if .Webhook.PullRequestAssign}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_pull_request_assign"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_assign_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Pull Request Label -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="pull_request_label" type="checkbox" {{if .Webhook.PullRequestLabel}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_pull_request_label"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_label_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Pull Request Milestone -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="pull_request_milestone" type="checkbox" {{if .Webhook.PullRequestMilestone}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_pull_request_milestone"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_milestone_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Pull Request Comment -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="pull_request_comment" type="checkbox" {{if .Webhook.PullRequestComment}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_pull_request_comment"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_comment_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Pull Request Review -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="pull_request_review" type="checkbox" {{if .Webhook.PullRequestReview}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_pull_request_review"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_review_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Pull Request Sync -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="pull_request_sync" type="checkbox" {{if .Webhook.PullRequestSync}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_pull_request_sync"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_sync_desc"}}</span>
+				</div>
+			</div>
+		</div>
+		<!-- Pull Request Review Request -->
+		<div class="seven wide column">
+			<div class="field">
+				<div class="ui checkbox">
+					<input name="pull_request_review_request" type="checkbox" {{if .Webhook.PullRequestReviewRequest}}checked{{end}}>
+					<label>{{ctx.Locale.Tr "repo.settings.event_pull_request_review_request"}}</label>
+					<span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_review_request_desc"}}</span>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+
+<!-- Branch filter -->
+<div class="field">
+	<label for="branch_filter">{{ctx.Locale.Tr "repo.settings.branch_filter"}}</label>
+	<input id="branch_filter" name="branch_filter" type="text" value="{{or .Webhook.BranchFilter "*"}}">
+	<span class="help">{{ctx.Locale.Tr "repo.settings.branch_filter_desc" "https://pkg.go.dev/github.com/gobwas/glob#Compile" "github.com/gobwas/glob"}}</span>
+</div>
+
+<!-- Authorization Header -->
+<div class="field{{if eq .HookType "matrix"}} required{{end}}">
+	<label for="authorization_header">{{ctx.Locale.Tr "repo.settings.authorization_header"}}</label>
+	<input id="authorization_header" name="authorization_header" type="text" value="{{.Webhook.HeaderAuthorization}}"{{if eq .HookType "matrix"}} placeholder="Bearer $access_token" required{{end}}>
+	{{if ne .HookType "matrix"}}{{/* Matrix doesn't make the authorization optional but it is implied by the help string, should be changed.*/}}
+		<span class="help">{{ctx.Locale.Tr "repo.settings.authorization_header_desc" ("<code>Bearer token123456</code>, <code>Basic YWxhZGRpbjpvcGVuc2VzYW1l</code>" | SafeHTML)}}</span>
+	{{end}}
+</div>
+
+<div class="divider"></div>
+
+<div class="inline field">
+	<div class="ui checkbox">
+		<input name="active" type="checkbox" {{if or $isNew .Webhook.IsActive}}checked{{end}}>
+		<label>{{ctx.Locale.Tr "repo.settings.active"}}</label>
+		<span class="help">{{ctx.Locale.Tr "repo.settings.active_helper"}}</span>
+	</div>
+</div>
+<div class="field">
+	{{if $isNew}}
+		<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_webhook"}}</button>
+	{{else}}
+		<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_webhook"}}</button>
+		<a class="ui red delete-button button" data-url="{{.BaseLink}}/delete" data-id="{{.Webhook.ID}}">{{ctx.Locale.Tr "repo.settings.delete_webhook"}}</a>
+	{{end}}
+</div>
+
+{{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..e7cae92
--- /dev/null
+++ b/repo/settings/webhook/slack.tmpl
@@ -0,0 +1,28 @@
+{{if eq .HookType "slack"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://slack.com" (ctx.Locale.Tr "repo.settings.web_hook_name_slack")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/slack/{{or .Webhook.ID "new"}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_PayloadURL}}error{{end}}">
+			<label for="payload_url">{{ctx.Locale.Tr "repo.settings.payload_url"}}</label>
+			<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+		</div>
+		<div class="required field {{if .Err_Channel}}error{{end}}">
+			<label for="channel">{{ctx.Locale.Tr "repo.settings.slack_channel"}}</label>
+			<input id="channel" name="channel" value="{{.SlackHook.Channel}}" placeholder="#general" required>
+		</div>
+
+		<div class="field">
+			<label for="username">{{ctx.Locale.Tr "repo.settings.slack_username"}}</label>
+			<input id="username" name="username" value="{{.SlackHook.Username}}" placeholder="Gitea">
+		</div>
+		<div class="field">
+			<label for="icon_url">{{ctx.Locale.Tr "repo.settings.slack_icon_url"}}</label>
+			<input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="https://example.com/img/favicon.png">
+		</div>
+		<div class="field">
+			<label for="color">{{ctx.Locale.Tr "repo.settings.slack_color"}}</label>
+			<input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="#dd4b39, good, warning, danger">
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/telegram.tmpl b/repo/settings/webhook/telegram.tmpl
new file mode 100644
index 0000000..f92c2be
--- /dev/null
+++ b/repo/settings/webhook/telegram.tmpl
@@ -0,0 +1,19 @@
+{{if eq .HookType "telegram"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://core.telegram.org/bots" (ctx.Locale.Tr "repo.settings.web_hook_name_telegram")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/telegram/{{or .Webhook.ID "new"}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_BotToken}}error{{end}}">
+			<label for="bot_token">{{ctx.Locale.Tr "repo.settings.bot_token"}}</label>
+			<input id="bot_token" name="bot_token" type="text" value="{{.TelegramHook.BotToken}}" autofocus required>
+		</div>
+		<div class="required field {{if .Err_ChatID}}error{{end}}">
+			<label for="chat_id">{{ctx.Locale.Tr "repo.settings.chat_id"}}</label>
+			<input id="chat_id" name="chat_id" type="text" value="{{.TelegramHook.ChatID}}" required>
+		</div>
+		<div class="field {{if .Err_ThreadID}}error{{end}}">
+			<label for="thread_id">{{ctx.Locale.Tr "repo.settings.thread_id"}}</label>
+			<input id="thread_id" name="thread_id" type="text" value="{{.TelegramHook.ThreadID}}">
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/settings/webhook/wechatwork.tmpl b/repo/settings/webhook/wechatwork.tmpl
new file mode 100644
index 0000000..78a1617
--- /dev/null
+++ b/repo/settings/webhook/wechatwork.tmpl
@@ -0,0 +1,11 @@
+{{if eq .HookType "wechatwork"}}
+	<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://work.weixin.qq.com" (ctx.Locale.Tr "repo.settings.web_hook_name_wechatwork")}}</p>
+	<form class="ui form" action="{{.BaseLink}}/wechatwork/{{or .Webhook.ID "new"}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_PayloadURL}}error{{end}}">
+			<label for="payload_url">{{ctx.Locale.Tr "repo.settings.payload_url"}}</label>
+			<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+		</div>
+		{{template "repo/settings/webhook/settings" .}}
+	</form>
+{{end}}
diff --git a/repo/shabox_badge.tmpl b/repo/shabox_badge.tmpl
new file mode 100644
index 0000000..36fc9e0
--- /dev/null
+++ b/repo/shabox_badge.tmpl
@@ -0,0 +1,15 @@
+<div class="ui detail icon button">
+	{{if .verification.Verified}}
+		<div title="{{if eq .verification.TrustStatus "trusted"}}{{else if eq .verification.TrustStatus "untrusted"}}{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}}{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}}{{.verification.Reason}}">
+		{{if ne .verification.SigningUser.ID 0}}
+			{{svg "gitea-lock"}}
+			{{ctx.AvatarUtils.Avatar .verification.SigningUser 16 "signature"}}
+		{{else}}
+			<span title="{{ctx.Locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span>
+			{{ctx.AvatarUtils.AvatarByEmail .verification.SigningEmail "" 16 "signature"}}
+		{{end}}
+		</div>
+	{{else}}
+		<span title="{{ctx.Locale.Tr .verification.Reason}}">{{svg "gitea-unlock"}}</span>
+	{{end}}
+</div>
diff --git a/repo/star_unstar.tmpl b/repo/star_unstar.tmpl
new file mode 100644
index 0000000..9234a0d
--- /dev/null
+++ b/repo/star_unstar.tmpl
@@ -0,0 +1,13 @@
+<form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}unstar{{else}}star{{end}}">
+	<div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.star_guest_user"}}"{{end}}>
+		{{$buttonText := ctx.Locale.Tr "repo.star"}}
+		{{if $.IsStaringRepo}}{{$buttonText = ctx.Locale.Tr "repo.unstar"}}{{end}}
+		<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}} aria-label="{{$buttonText}}">
+			{{svg (Iif $.IsStaringRepo "octicon-star-fill" "octicon-star")}}
+			<span aria-hidden="true">{{$buttonText}}</span>
+		</button>
+		<a hx-boost="false" class="ui basic label" href="{{$.RepoLink}}/stars">
+			{{CountFmt .Repository.NumStars}}
+		</a>
+	</div>
+</form>
diff --git a/repo/sub_menu.tmpl b/repo/sub_menu.tmpl
new file mode 100644
index 0000000..b39db95
--- /dev/null
+++ b/repo/sub_menu.tmpl
@@ -0,0 +1,19 @@
+{{if and (not .HideRepoInfo) (not .IsBlame)}}
+<div class="ui segments repository-summary tw-my-0">
+	<div class="ui segment sub-menu repository-menu">
+		{{if and (.Permission.CanRead ctx.Consts.RepoUnitTypeCode) (not .IsEmptyRepo)}}
+			<a class="item muted {{if .PageIsCommits}}active{{end}}" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">
+				{{svg "octicon-history"}} <b>{{ctx.Locale.PrettyNumber .CommitsCount}}</b> {{ctx.Locale.TrN .CommitsCount "repo.commit" "repo.commits"}}
+			</a>
+			<a class="item muted {{if .PageIsBranches}}active{{end}}" href="{{.RepoLink}}/branches">
+				{{svg "octicon-git-branch"}} <b>{{ctx.Locale.PrettyNumber .BranchesCount}}</b> {{ctx.Locale.TrN .BranchesCount "repo.branch" "repo.branches"}}
+			</a>
+			{{if $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
+				<a class="item muted {{if .PageIsTagList}}active{{end}}" href="{{.RepoLink}}/tags">
+					{{svg "octicon-tag"}} <b>{{ctx.Locale.PrettyNumber .NumTags}}</b> {{ctx.Locale.TrN .NumTags "repo.tag" "repo.tags"}}
+				</a>
+			{{end}}
+		{{end}}
+	</div>
+</div>
+{{end}}
diff --git a/repo/tag/list.tmpl b/repo/tag/list.tmpl
new file mode 100644
index 0000000..9789943
--- /dev/null
+++ b/repo/tag/list.tmpl
@@ -0,0 +1,88 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository tags">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		{{template "repo/release_tag_header" .}}
+		<h4 class="ui top attached header">
+			<div class="five wide column tw-flex tw-items-center">
+				{{.TagCount}} {{ctx.Locale.Tr "repo.release.tags"}}
+			</div>
+		</h4>
+		{{$canReadReleases := $.Permission.CanRead ctx.Consts.RepoUnitTypeReleases}}
+		<div class="ui attached segment">
+			<form class="ignore-dirty" method="get">
+				{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.tag_kind") "Tooltip" (ctx.Locale.Tr "search.tag_tooltip")}}
+			</form>
+		</div>
+		<div class="ui attached table segment">
+			{{if .Releases}}
+			<table class="ui very basic striped fixed table single line" id="tags-table">
+				<tbody class="tag-list">
+					{{range $idx, $release := .Releases}}
+						<tr>
+							<td class="tag-list-row">
+								<h3 class="tag-list-row-title tw-mb-2">
+									{{if $canReadReleases}}
+										<a class="tag-list-row-link tw-flex tw-items-center" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a>
+									{{else}}
+										<a class="tag-list-row-link tw-flex tw-items-center" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a>
+									{{end}}
+								</h3>
+								<div class="download tw-flex tw-items-center">
+									{{if $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
+										{{if .CreatedUnix}}
+											<span class="tw-mr-2">{{svg "octicon-clock" 16 "tw-mr-1"}}{{DateUtils.TimeSince .CreatedUnix}}</span>
+										{{end}}
+
+										<a class="tw-mr-2 tw-font-mono muted" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "tw-mr-1"}}{{ShortSha .Sha1}}</a>
+
+										{{if not $.DisableDownloadSourceArchives}}
+											<a class="archive-link tw-mr-2 muted" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.zip" rel="nofollow">{{svg "octicon-file-zip" 16 "tw-mr-1"}}ZIP</a>
+											<a class="archive-link tw-mr-2 muted" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip" 16 "tw-mr-1"}}TAR.GZ</a>
+										{{end}}
+
+										{{if (and $canReadReleases $.CanCreateRelease $release.IsTag)}}
+											<a class="tw-mr-2 muted" href="{{$.RepoLink}}/releases/new?tag={{.TagName}}">{{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.new_release"}}</a>
+										{{end}}
+
+										{{if (and ($.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) $release.IsTag)}}
+											<a class="ui delete-button tw-mr-2 muted" data-url="{{$.RepoLink}}/tags/delete" data-id="{{.ID}}">
+												{{svg "octicon-trash" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.delete_tag"}}
+											</a>
+										{{end}}
+
+										{{if and $canReadReleases (not $release.IsTag)}}
+											<a class="tw-mr-2 muted" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}">{{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.detail"}}</a>
+										{{end}}
+									{{end}}
+								</div>
+							</td>
+						</tr>
+					{{end}}
+				</tbody>
+			</table>
+			{{else}}
+				{{if .NumTags}}
+					<p class="tw-p-4">{{ctx.Locale.Tr "no_results_found"}}</p>
+				{{end}}
+			{{end}}
+		</div>
+		{{template "base/paginate" .}}
+	</div>
+</div>
+
+{{if $.Permission.CanWrite ctx.Consts.RepoUnitTypeCode}}
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.release.delete_tag"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.release.deletion_tag_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+{{end}}
+
+{{template "base/footer" .}}
diff --git a/repo/tag/name.tmpl b/repo/tag/name.tmpl
new file mode 100644
index 0000000..c304201
--- /dev/null
+++ b/repo/tag/name.tmpl
@@ -0,0 +1,3 @@
+<a class="ui label basic tiny button{{if .IsRelease}} primary{{end}}" href="{{.RepoLink}}/src/tag/{{.TagName|PathEscape}}">
+{{svg "octicon-tag"}} {{.TagName}}
+</a>
diff --git a/repo/unicode_escape_prompt.tmpl b/repo/unicode_escape_prompt.tmpl
new file mode 100644
index 0000000..8bceafa
--- /dev/null
+++ b/repo/unicode_escape_prompt.tmpl
@@ -0,0 +1,22 @@
+{{if .EscapeStatus}}
+	{{if .EscapeStatus.HasInvisible}}
+		<div class="ui warning message unicode-escape-prompt tw-text-left">
+			<button class="btn close icon hide-panel" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
+			<div class="header">
+				{{ctx.Locale.Tr "repo.invisible_runes_header"}}
+			</div>
+			<p>{{ctx.Locale.Tr "repo.invisible_runes_description"}}</p>
+			{{if .EscapeStatus.HasAmbiguous}}
+				<p>{{ctx.Locale.Tr "repo.ambiguous_runes_description"}}</p>
+			{{end}}
+		</div>
+	{{else if .EscapeStatus.HasAmbiguous}}
+		<div class="ui warning message unicode-escape-prompt tw-text-left">
+			<button class="btn close icon hide-panel" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
+			<div class="header">
+				{{ctx.Locale.Tr "repo.ambiguous_runes_header"}}
+			</div>
+			<p>{{ctx.Locale.Tr "repo.ambiguous_runes_description"}}</p>
+		</div>
+	{{end}}
+{{end}}
diff --git a/repo/upload.tmpl b/repo/upload.tmpl
new file mode 100644
index 0000000..eef5199
--- /dev/null
+++ b/repo/upload.tmpl
@@ -0,0 +1,15 @@
+<div
+	class="ui dropzone"
+	data-link-url="{{.UploadLinkUrl}}"
+	data-upload-url="{{.UploadUrl}}"
+	data-remove-url="{{.UploadRemoveUrl}}"
+	data-accepts="{{.UploadAccepts}}"
+	data-max-file="{{.UploadMaxFiles}}"
+	data-max-size="{{.UploadMaxSize}}"
+	data-default-message="{{ctx.Locale.Tr "dropzone.default_message"}}"
+	data-invalid-input-type="{{ctx.Locale.Tr "dropzone.invalid_input_type"}}"
+	data-file-too-big="{{ctx.Locale.Tr "dropzone.file_too_big"}}"
+	data-remove-file="{{ctx.Locale.Tr "dropzone.remove_file"}}"
+>
+	<div class="files"></div>
+</div>
diff --git a/repo/user_cards.tmpl b/repo/user_cards.tmpl
new file mode 100644
index 0000000..360aeaf
--- /dev/null
+++ b/repo/user_cards.tmpl
@@ -0,0 +1,39 @@
+<!-- Refresh the content if a htmx response contains "HX-Trigger" header.
+This usually happens when a user stays on the watchers/stargazers page
+when they watched/unwatched/starred/unstarred and the list should be refreshed.
+To test go to the watchers page and click the watch button. The user cards should reload.
+At the moment, no JS initialization would re-trigger (fortunately there is no JS for this page).
+-->
+<div class="no-loading-indicator tw-hidden"></div>
+<div class="user-cards"
+		hx-trigger="refreshUserCards from:body" hx-indicator=".no-loading-indicator"
+		hx-get="{{$.CurrentURL}}" hx-swap="outerHTML" hx-select=".user-cards"
+>
+	{{if .CardsTitle}}
+	<h2 class="ui dividing header">
+		{{.CardsTitle}}
+	</h2>
+	{{end}}
+	<ul class="list">
+		{{range .Cards}}
+			<li class="item ui segment">
+				<a href="{{.HomeLink}}">
+					{{ctx.AvatarUtils.Avatar . 48}}
+				</a>
+				<h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3>
+
+				<div class="meta">
+					{{if .Website}}
+						{{svg "octicon-link"}} <a href="{{.Website}}" target="_blank" rel="noopener noreferrer">{{.Website}}</a>
+					{{else if .Location}}
+						{{svg "octicon-location"}} {{.Location}}
+					{{else}}
+						{{svg "octicon-calendar"}} {{ctx.Locale.Tr "user.joined_on" (DateUtils.AbsoluteShort .CreatedUnix)}}
+					{{end}}
+				</div>
+			</li>
+		{{end}}
+	</ul>
+
+	{{template "base/paginate" .}}
+</div>
diff --git a/repo/view_file.tmpl b/repo/view_file.tmpl
new file mode 100644
index 0000000..86366ae
--- /dev/null
+++ b/repo/view_file.tmpl
@@ -0,0 +1,143 @@
+<div {{if .ReadmeInList}}id="readme" {{end}}class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
+	{{- if .FileError}}
+		<div class="ui error message">
+			<div class="text left tw-whitespace-pre">{{.FileError}}</div>
+		</div>
+	{{end}}
+	{{- if .FileWarning}}
+		<div class="ui warning message">
+			<div class="text left tw-whitespace-pre">{{.FileWarning}}</div>
+		</div>
+	{{end}}
+
+	{{if not .ReadmeInList}}
+		<div id="repo-file-commit-box" class="ui segment list-header tw-mb-4 tw-flex tw-justify-between">
+			<div class="latest-commit">
+				{{template "repo/latest_commit" .}}
+			</div>
+			{{if .LatestCommit}}
+				{{if .LatestCommit.Committer}}
+					<div class="text grey age">
+						{{DateUtils.TimeSince .LatestCommit.Committer.When}}
+					</div>
+				{{end}}
+			{{end}}
+		</div>
+	{{end}}
+
+	<h4 class="file-header ui top attached header tw-flex tw-items-center tw-justify-between tw-flex-wrap">
+		<div class="file-header-left tw-flex tw-items-center tw-py-2 tw-pr-4">
+			{{if .ReadmeInList}}
+				{{svg "octicon-book" 16 "tw-mr-2"}}
+				<strong><a class="muted" href="#readme">{{.FileName}}</a></strong>
+			{{else}}
+				{{template "repo/file_info" .}}
+			{{end}}
+		</div>
+		<div class="file-header-right file-actions tw-flex tw-items-center tw-flex-wrap">
+			{{if .HasSourceRenderedToggle}}
+				<div class="ui compact icon buttons">
+					<a href="?display=source" class="ui mini basic button {{if .IsDisplayingSource}}active{{end}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_source"}}">{{svg "octicon-code" 15}}</a>
+					<a href="{{$.Link}}" class="ui mini basic button {{if .IsDisplayingRendered}}active{{end}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_rendered"}}">{{svg "octicon-file" 15}}</a>
+				</div>
+			{{end}}
+			{{if not .ReadmeInList}}
+				<div class="ui buttons tw-mr-1">
+					<a class="ui mini basic button" href="{{$.RawFileLink}}">{{ctx.Locale.Tr "repo.file_raw"}}</a>
+					{{if not .IsViewCommit}}
+						<a class="ui mini basic button" href="{{.RepoLink}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{ctx.Locale.Tr "repo.file_permalink"}}</a>
+					{{end}}
+					{{if .IsRepresentableAsText}}
+						<a class="ui mini basic button" href="{{.RepoLink}}/blame/{{.BranchNameSubURL}}/{{PathEscapeSegments .TreePath}}">{{ctx.Locale.Tr "repo.blame"}}</a>
+					{{end}}
+					<a class="ui mini basic button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{PathEscapeSegments .TreePath}}">{{ctx.Locale.Tr "repo.file_history"}}</a>
+					{{if .EscapeStatus.Escaped}}
+						<button class="ui mini basic button unescape-button tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
+						<button class="ui mini basic button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
+					{{end}}
+				</div>
+				<a download class="btn-octicon" data-tooltip-content="{{ctx.Locale.Tr "repo.download_file"}}" href="{{$.RawFileLink}}">{{svg "octicon-download"}}</a>
+				<a id="copy-content" class="btn-octicon {{if not .CanCopyContent}} disabled{{end}}"{{if or .IsImageFile (and .HasSourceRenderedToggle (not .IsDisplayingSource))}} data-link="{{$.RawFileLink}}"{{end}} data-tooltip-content="{{if .CanCopyContent}}{{ctx.Locale.Tr "copy_content"}}{{else}}{{ctx.Locale.Tr "copy_type_unsupported"}}{{end}}">{{svg "octicon-copy"}}</a>
+				{{if .EnableFeed}}
+				<a class="btn-octicon" href="{{$.FeedURL}}/rss/{{$.BranchNameSubURL}}/{{PathEscapeSegments .TreePath}}" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
+					{{svg "octicon-rss"}}
+				</a>
+				{{end}}
+				{{if .Repository.CanEnableEditor}}
+					{{if .CanEditFile}}
+						<a class="btn-octicon" data-tooltip-content="{{.EditFileTooltip}}" href="{{.RepoLink}}/_edit/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}">{{svg "octicon-pencil"}}</a>
+					{{else}}
+						<span class="btn-octicon disabled" data-tooltip-content="{{.EditFileTooltip}}">{{svg "octicon-pencil"}}</span>
+					{{end}}
+					{{if .CanDeleteFile}}
+						<a class="btn-octicon btn-octicon-danger" data-tooltip-content="{{.DeleteFileTooltip}}" href="{{.RepoLink}}/_delete/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}">{{svg "octicon-trash"}}</a>
+					{{else}}
+						<span class="btn-octicon disabled" data-tooltip-content="{{.DeleteFileTooltip}}">{{svg "octicon-trash"}}</span>
+					{{end}}
+				{{end}}
+			{{else if .EscapeStatus.Escaped}}
+				<button class="ui mini basic button unescape-button tw-mr-1 tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
+				<button class="ui mini basic button escape-button tw-mr-1">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
+			{{end}}
+			{{if and .ReadmeInList .CanEditReadmeFile}}
+				<a class="btn-octicon" data-tooltip-content="{{ctx.Locale.Tr "repo.editor.edit_this_file"}}" href="{{.RepoLink}}/_edit/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}/{{PathEscapeSegments .FileName}}">{{svg "octicon-pencil"}}</a>
+			{{end}}
+		</div>
+	</h4>
+	<div class="ui bottom attached table unstackable segment">
+		{{if not (or .IsMarkup .IsRenderedHTML)}}
+			{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
+		{{end}}
+		<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsPlainText}} plain-text{{else if .IsTextSource}} code-view{{end}}">
+			{{if .IsFileTooLarge}}
+				{{template "shared/filetoolarge" dict "RawFileLink" .RawFileLink}}
+			{{else if not .FileSize}}
+				{{template "shared/fileisempty"}}
+			{{else if .IsMarkup}}
+				{{if .FileContent}}{{.FileContent}}{{end}}
+			{{else if .IsPlainText}}
+				<pre>{{if .FileContent}}{{.FileContent}}{{end}}</pre>
+			{{else if not .IsTextSource}}
+				<div class="view-raw">
+					{{if .IsImageFile}}
+						<img src="{{$.RawFileLink}}">
+					{{else if .IsVideoFile}}
+						<video controls src="{{$.RawFileLink}}">
+							<strong>{{ctx.Locale.Tr "repo.video_not_supported_in_browser"}}</strong>
+						</video>
+					{{else if .IsAudioFile}}
+						<audio controls src="{{$.RawFileLink}}">
+							<strong>{{ctx.Locale.Tr "repo.audio_not_supported_in_browser"}}</strong>
+						</audio>
+					{{else if .IsPDFFile}}
+						<div class="pdf-content is-loading" data-src="{{$.RawFileLink}}" data-fallback-button-text="{{ctx.Locale.Tr "repo.diff.view_file"}}"></div>
+					{{else}}
+						<a href="{{$.RawFileLink}}" rel="nofollow" class="tw-p-4">{{ctx.Locale.Tr "repo.file_view_raw"}}</a>
+					{{end}}
+				</div>
+			{{else if .FileSize}}
+				<table>
+					<tbody>
+						{{range $idx, $code := .FileContent}}
+						{{$line := Eval $idx "+" 1}}
+						<tr>
+							<td id="L{{$line}}" class="lines-num"><span id="L{{$line}}" data-line-number="{{$line}}"></span></td>
+							{{if $.EscapeStatus.Escaped}}
+								<td class="lines-escape">{{if (index $.LineEscapeStatus $idx).Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{if (index $.LineEscapeStatus $idx).HasInvisible}}{{ctx.Locale.Tr "repo.invisible_runes_line"}} {{end}}{{if (index $.LineEscapeStatus $idx).HasAmbiguous}}{{ctx.Locale.Tr "repo.ambiguous_runes_line"}}{{end}}"></button>{{end}}</td>
+							{{end}}
+							<td rel="L{{$line}}" class="lines-code chroma"><code class="code-inner">{{$code}}</code></td>
+						</tr>
+						{{end}}
+					</tbody>
+				</table>
+				<div class="code-line-menu tippy-target">
+					{{if $.Permission.CanRead ctx.Consts.RepoUnitTypeIssues}}
+						<a class="item ref-in-new-issue" role="menuitem" data-url-issue-new="{{.RepoLink}}/issues/new" data-url-param-body-link="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}" rel="nofollow noindex">{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}</a>
+					{{end}}
+					<a class="item view_git_blame" role="menuitem" href="{{.Repository.Link}}/blame/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{ctx.Locale.Tr "repo.view_git_blame"}}</a>
+					<a class="item copy-line-permalink" role="menuitem" data-url="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}">{{ctx.Locale.Tr "repo.file_copy_permalink"}}</a>
+				</div>
+			{{end}}
+		</div>
+	</div>
+</div>
diff --git a/repo/view_list.tmpl b/repo/view_list.tmpl
new file mode 100644
index 0000000..c50a0d3
--- /dev/null
+++ b/repo/view_list.tmpl
@@ -0,0 +1,57 @@
+{{/* use grid layout, still use the old ID because there are many other CSS styles depending on this ID */}}
+<div id="repo-files-table" {{if .HasFilesWithoutLatestCommit}}hx-indicator="#repo-files-table .repo-file-cell.message" hx-trigger="load" hx-swap="morph" hx-post="{{.LastCommitLoaderURL}}"{{end}}>
+	<div class="repo-file-line repo-file-last-commit">
+		<div class="latest-commit">{{template "repo/latest_commit" .}}</div>
+		<div>{{if and .LatestCommit .LatestCommit.Committer}}{{DateUtils.TimeSince .LatestCommit.Committer.When}}{{end}}</div>
+	</div>
+	{{if .HasParentPath}}
+	<a class="repo-file-line parent-link silenced" href="{{.BranchLink}}{{if .ParentPath}}{{PathEscapeSegments .ParentPath}}{{end}}">
+		{{svg "octicon-file-directory-fill"}} ..
+	</a>
+	{{end}}
+	{{range $item := .Files}}
+		<div class="repo-file-item">
+			{{$entry := $item.Entry}}
+			{{$commit := $item.Commit}}
+			{{$subModuleFile := $item.SubModuleFile}}
+			<div class="repo-file-cell name {{if not $commit}}notready{{end}}">
+				{{if $entry.IsSubModule}}
+					{{svg "octicon-file-submodule"}}
+					{{$refURL := $subModuleFile.RefURL AppUrl $.Repository.FullName $.SSHDomain}} {{/* FIXME: the usage of AppUrl seems incorrect, it would be fixed in the future, use AppSubUrl instead */}}
+					{{if $refURL}}
+						<a class="muted" href="{{$refURL}}">{{$entry.Name}}</a> <span class="at">@</span> <a href="{{$refURL}}/commit/{{PathEscape $subModuleFile.RefID}}">{{ShortSha $subModuleFile.RefID}}</a>
+					{{else}}
+						{{$entry.Name}} <span class="at">@</span> {{ShortSha $subModuleFile.RefID}}
+					{{end}}
+				{{else}}
+					{{if $entry.IsDir}}
+						{{$subJumpablePathName := $entry.GetSubJumpablePathName}}
+						{{svg "octicon-file-directory-fill"}}
+						<a class="muted" href="{{$.TreeLink}}/{{PathEscapeSegments $subJumpablePathName}}" title="{{$subJumpablePathName}}">
+							{{$subJumpablePathFields := StringUtils.Split $subJumpablePathName "/"}}
+							{{$subJumpablePathFieldLast := (Eval (len $subJumpablePathFields) "-" 1)}}
+							{{if eq $subJumpablePathFieldLast 0}}
+								{{$subJumpablePathName}}
+							{{else}}
+								{{$subJumpablePathPrefixes := slice $subJumpablePathFields 0 $subJumpablePathFieldLast}}
+								<span class="text light-2">{{StringUtils.Join $subJumpablePathPrefixes "/"}}</span>/{{index $subJumpablePathFields $subJumpablePathFieldLast}}
+							{{end}}
+						</a>
+					{{else}}
+						{{svg (printf "octicon-%s" (EntryIcon $entry))}}
+						<a class="muted" href="{{$.TreeLink}}/{{PathEscapeSegments $entry.Name}}" title="{{$entry.Name}}">{{$entry.Name}}</a>
+					{{end}}
+				{{end}}
+			</div>
+			<div class="repo-file-cell message loading-icon-2px">
+				{{if $commit}}
+					{{$commitLink := printf "%s/commit/%s" $.RepoLink (PathEscape $commit.ID.String)}}
+					{{ctx.RenderUtils.RenderCommitMessageLinkSubject $commit.Message $commitLink ($.Repository.ComposeMetas ctx)}}
+				{{else}}
+					… {{/* will be loaded again by LastCommitLoaderURL */}}
+				{{end}}
+			</div>
+			<div class="repo-file-cell age">{{if $commit}}{{DateUtils.TimeSince $commit.Committer.When}}{{end}}</div>
+		</div>
+	{{end}}
+</div>
diff --git a/repo/watch_unwatch.tmpl b/repo/watch_unwatch.tmpl
new file mode 100644
index 0000000..465cd91
--- /dev/null
+++ b/repo/watch_unwatch.tmpl
@@ -0,0 +1,13 @@
+<form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}unwatch{{else}}watch{{end}}">
+	<div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.watch_guest_user"}}"{{end}}>
+		{{$buttonText := ctx.Locale.Tr "repo.watch"}}
+		{{if $.IsWatchingRepo}}{{$buttonText = ctx.Locale.Tr "repo.unwatch"}}{{end}}
+		<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}} aria-label="{{$buttonText}}">
+			{{svg "octicon-eye"}}
+			<span aria-hidden="true">{{$buttonText}}</span>
+		</button>
+		<a hx-boost="false" class="ui basic label" href="{{.RepoLink}}/watchers">
+			{{CountFmt .Repository.NumWatches}}
+		</a>
+	</div>
+</form>
diff --git a/repo/watchers.tmpl b/repo/watchers.tmpl
new file mode 100644
index 0000000..1828544
--- /dev/null
+++ b/repo/watchers.tmpl
@@ -0,0 +1,8 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository watchers">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "repo/user_cards" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/wiki/new.tmpl b/repo/wiki/new.tmpl
new file mode 100644
index 0000000..ea2913c
--- /dev/null
+++ b/repo/wiki/new.tmpl
@@ -0,0 +1,45 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository wiki new">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<div class="ui header flex-text-block tw-justify-between">
+			{{ctx.Locale.Tr "repo.wiki.new_page"}}
+			{{if .PageIsWikiEdit}}
+				<a class="ui tiny primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.new_page_button"}}</a>
+			{{end}}
+		</div>
+		<form class="ui form" action="?action={{if .PageIsWikiEdit}}_edit{{else}}_new{{end}}" method="post">
+			{{.CsrfTokenHtml}}
+			<div class="field {{if .Err_Title}}error{{end}}">
+				<input name="title" value="{{.title}}" aria-label="{{ctx.Locale.Tr "repo.wiki.page_title"}}" placeholder="{{ctx.Locale.Tr "repo.wiki.page_title"}}" autofocus required>
+			</div>
+			<div class="help">
+				{{ctx.Locale.Tr "repo.wiki.page_name_desc"}}
+			</div>
+
+			{{$content := .content}}
+			{{if not .PageIsWikiEdit}}
+				{{$content = ctx.Locale.Tr "repo.wiki.welcome"}}
+			{{end}}
+			{{template "shared/combomarkdowneditor" (dict
+				"CustomInit" true
+				"MarkdownPreviewInRepo" $.Repository
+				"MarkdownPreviewMode" "wiki"
+				"TextareaName" "content"
+				"TextareaContent" $content
+				"TextareaPlaceholder" (ctx.Locale.Tr "repo.wiki.page_content")
+			)}}
+
+			<div class="field tw-mt-4">
+				<input name="message" aria-label="{{ctx.Locale.Tr "repo.wiki.default_commit_message"}}" placeholder="{{ctx.Locale.Tr "repo.wiki.default_commit_message"}}">
+			</div>
+			<div class="divider"></div>
+			<div class="text right">
+				<a class="ui basic cancel button" href="{{.Link}}">{{ctx.Locale.Tr "cancel"}}</a>
+				<button class="ui primary button">{{ctx.Locale.Tr "repo.wiki.save_page"}}</button>
+			</div>
+		</form>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/wiki/pages.tmpl b/repo/wiki/pages.tmpl
new file mode 100644
index 0000000..38d6d6f
--- /dev/null
+++ b/repo/wiki/pages.tmpl
@@ -0,0 +1,31 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository wiki pages">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<h2 class="ui header tw-flex tw-items-center tw-justify-between">
+			<span>{{ctx.Locale.Tr "repo.wiki.pages"}}</span>
+			<span>
+				{{if and .CanWriteWiki (not .Repository.IsMirror)}}
+					<a class="ui small primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.new_page_button"}}</a>
+				{{end}}
+			</span>
+		</h2>
+		{{if .IsRepositoryAdmin}}<div>{{ctx.Locale.Tr "repo.default_branch"}}: {{.Repository.DefaultWikiBranch}}</div>{{end}}
+		<table class="ui table wiki-pages-list">
+			<tbody>
+				{{range .Pages}}
+					<tr>
+						<td>
+							{{svg "octicon-file"}}
+							<a href="{{$.RepoLink}}/wiki/{{.SubURL}}">{{.Name}}</a>
+							<a class="wiki-git-entry" href="{{$.RepoLink}}/wiki/{{.GitEntryName | PathEscape}}" data-tooltip-content="{{ctx.Locale.Tr "repo.wiki.original_git_entry_tooltip"}}">{{svg "octicon-chevron-right"}}</a>
+						</td>
+						{{$timeSince := DateUtils.TimeSince .UpdatedUnix}}
+						<td class="text right">{{ctx.Locale.Tr "repo.wiki.last_updated" $timeSince}}</td>
+					</tr>
+				{{end}}
+			</tbody>
+		</table>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/wiki/revision.tmpl b/repo/wiki/revision.tmpl
new file mode 100644
index 0000000..ca89549
--- /dev/null
+++ b/repo/wiki/revision.tmpl
@@ -0,0 +1,37 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository wiki revisions">
+	{{template "repo/header" .}}
+	{{$title := .title}}
+	<div class="ui container">
+		<div class="ui stackable grid">
+			<div class="ui eight wide column">
+				<div class="ui header">
+					<a class="file-revisions-btn ui basic button" title="{{ctx.Locale.Tr "repo.wiki.back_to_wiki"}}" href="{{.RepoLink}}/wiki/{{.PageURL}}"><span>{{.revision}}</span> {{svg "octicon-home"}}</a>
+					{{$title}}
+					<div class="ui sub header tw-break-anywhere">
+						{{$timeSince := DateUtils.TimeSince .Author.When}}
+						{{ctx.Locale.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince}}
+					</div>
+				</div>
+			</div>
+			<div class="ui eight wide column text right">
+				{{template "repo/clone_panel" .}}
+			</div>
+		</div>
+		<h2 class="ui top header">{{ctx.Locale.Tr "repo.wiki.wiki_page_revisions"}}</h2>
+		<div class="tw-mt-4">
+			<h4 class="ui top attached header">
+				<div class="ui stackable grid">
+					<div class="sixteen wide column">
+						{{.CommitCount}} {{ctx.Locale.Tr "repo.commits.commits"}}
+					</div>
+				</div>
+			</h4>
+			{{if and .Commits (gt .CommitCount 0)}}
+				{{template "repo/commits_list" .}}
+			{{end}}
+			{{template "base/paginate" .}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/wiki/start.tmpl b/repo/wiki/start.tmpl
new file mode 100644
index 0000000..1b3c3d5
--- /dev/null
+++ b/repo/wiki/start.tmpl
@@ -0,0 +1,15 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository wiki start">
+	{{template "repo/header" .}}
+	<div class="ui container">
+		<div class="ui center segment tw-py-8">
+			{{svg "octicon-book" 48}}
+			<h2>{{ctx.Locale.Tr "repo.wiki.welcome"}}</h2>
+			<p>{{ctx.Locale.Tr "repo.wiki.welcome_desc"}}</p>
+			{{if and .CanWriteWiki (not .Repository.IsMirror)}}
+				<a class="ui primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.create_first_page"}}</a>
+			{{end}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/repo/wiki/view.tmpl b/repo/wiki/view.tmpl
new file mode 100644
index 0000000..843a977
--- /dev/null
+++ b/repo/wiki/view.tmpl
@@ -0,0 +1,112 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository wiki view">
+	{{template "repo/header" .}}
+	{{$title := .title}}
+	<div class="ui container">
+		<div class="repo-button-row">
+			<div class="flex-text-block tw-flex-1">
+				<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}">
+					<div class="ui basic small button">
+						<span class="text">
+							{{ctx.Locale.Tr "repo.wiki.page"}}:
+							<strong>{{$title}}</strong>
+						</span>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+					</div>
+					<div class="menu">
+						<div class="ui icon search input">
+							<i class="icon">{{svg "octicon-filter" 16}}</i>
+							<input name="search" placeholder="{{ctx.Locale.Tr "repo.wiki.filter_page"}}...">
+						</div>
+						<div class="scrolling menu">
+							<a class="item muted" href="{{.RepoLink}}/wiki/?action=_pages">{{ctx.Locale.Tr "repo.wiki.pages"}}</a>
+							<div class="divider"></div>
+							{{range .Pages}}
+								<a class="item {{if eq $.Title .Name}}selected{{end}}" href="{{$.RepoLink}}/wiki/{{.SubURL}}">{{.Name}}</a>
+							{{end}}
+						</div>
+					</div>
+				</div>
+			</div>
+			{{template "repo/clone_panel" .}}
+		</div>
+		<div class="ui dividing header">
+			<div class="flex-text-block tw-flex-wrap tw-justify-end">
+				<div class="flex-text-block tw-flex-1 tw-min-w-[300px]">
+					<a class="file-revisions-btn ui basic button" title="{{ctx.Locale.Tr "repo.wiki.file_revision"}}" href="{{.RepoLink}}/wiki/{{.PageURL}}?action=_revision" ><span>{{.CommitCount}}</span> {{svg "octicon-history"}}</a>
+					<div class="tw-flex-1 gt-ellipsis">
+						{{$title}}
+						<div class="ui sub header gt-ellipsis">
+							{{$timeSince := DateUtils.TimeSince .Author.When}}
+							{{ctx.Locale.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince}}
+						</div>
+					</div>
+				</div>
+				<div class="repo-button-row">
+					{{if .EscapeStatus.Escaped}}
+						<a class="ui small button unescape-button tw-hidden" data-unicode-content-selector=".wiki-content-parts">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
+						<a class="ui small button escape-button" data-unicode-content-selector=".wiki-content-parts">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
+					{{end}}
+					{{if and .CanWriteWiki (not .Repository.IsMirror)}}
+						<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}?action=_edit">{{ctx.Locale.Tr "repo.wiki.edit_page_button"}}</a>
+						<a class="ui small primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.new_page_button"}}</a>
+						<a class="ui small red button delete-button" href="" data-url="{{.RepoLink}}/wiki/{{.PageURL}}?action=_delete" data-id="{{.PageURL}}">{{ctx.Locale.Tr "repo.wiki.delete_page_button"}}</a>
+					{{end}}
+				</div>
+			</div>
+		</div>
+		{{if .FormatWarning}}
+			<div class="ui negative message">
+				<p>{{.FormatWarning}}</p>
+			</div>
+		{{end}}
+
+		<div class="wiki-content-parts">
+			{{if .sidebarTocContent}}
+			<div class="markup wiki-content-sidebar wiki-content-toc">
+				{{.sidebarTocContent | SafeHTML}}
+			</div>
+			{{end}}
+
+			<div class="markup wiki-content-main {{if or .sidebarTocContent .sidebarPresent}}with-sidebar{{end}}">
+				{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
+				{{.content | SafeHTML}}
+			</div>
+
+			{{if .sidebarPresent}}
+			<div class="markup wiki-content-sidebar">
+				{{if and .CanWriteWiki (not .Repository.IsMirror)}}
+					<a class="tw-float-right muted" href="{{.RepoLink}}/wiki/_Sidebar?action=_edit" aria-label="{{ctx.Locale.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
+				{{end}}
+				{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .sidebarEscapeStatus "root" $}}
+				{{.sidebarContent | SafeHTML}}
+			</div>
+			{{end}}
+
+			<div class="tw-clear-both"></div>
+
+			{{if .footerPresent}}
+			<div class="markup wiki-content-footer">
+				{{if and .CanWriteWiki (not .Repository.IsMirror)}}
+					<a class="tw-float-right muted" href="{{.RepoLink}}/wiki/_Footer?action=_edit" aria-label="{{ctx.Locale.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
+				{{end}}
+				{{template "repo/unicode_escape_prompt" dict "footerEscapeStatus" .sidebarEscapeStatus "root" $}}
+				{{.footerContent | SafeHTML}}
+			</div>
+			{{end}}
+		</div>
+	</div>
+</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "repo.wiki.delete_page_button"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "repo.wiki.delete_page_notice_1" $title}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "base/footer" .}}
diff --git a/shared/actions/runner_badge.tmpl b/shared/actions/runner_badge.tmpl
new file mode 100644
index 0000000..816e87e
--- /dev/null
+++ b/shared/actions/runner_badge.tmpl
@@ -0,0 +1,25 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="{{.Badge.Width}}" height="18"
+	role="img" aria-label="{{.Badge.Label.Text}}: {{.Badge.Message.Text}}">
+	<title>{{.Badge.Label.Text}}: {{.Badge.Message.Text}}</title>
+	<linearGradient id="s" x2="0" y2="100%">
+		<stop offset="0" stop-color="#fff" stop-opacity=".7" />
+		<stop offset=".1" stop-color="#aaa" stop-opacity=".1" />
+		<stop offset=".9" stop-color="#000" stop-opacity=".3" />
+		<stop offset="1" stop-color="#000" stop-opacity=".5" />
+	</linearGradient>
+	<clipPath id="r">
+		<rect width="{{.Badge.Width}}" height="18" rx="4" fill="#fff" />
+	</clipPath>
+	<g clip-path="url(#r)">
+		<rect width="{{.Badge.Label.Width}}" height="18" fill="#555" />
+		<rect x="{{.Badge.Label.Width}}" width="{{.Badge.Message.Width}}" height="18" fill="{{.Badge.Color}}" />
+		<rect width="{{.Badge.Width}}" height="18" fill="url(#s)" />
+	</g>
+	<g fill="#fff" text-anchor="middle" font-family="Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision"
+		font-size="{{.Badge.FontSize}}"><text aria-hidden="true" x="{{.Badge.Label.X}}" y="140" fill="#010101" fill-opacity=".3"
+			transform="scale(.1)" textLength="{{.Badge.Label.TextLength}}">{{.Badge.Label.Text}}</text><text x="{{.Badge.Label.X}}" y="130"
+			transform="scale(.1)" fill="#fff" textLength="{{.Badge.Label.TextLength}}">{{.Badge.Label.Text}}</text><text aria-hidden="true"
+			x="{{.Badge.Message.X}}" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)"
+			textLength="{{.Badge.Message.TextLength}}">{{.Badge.Message.Text}}</text><text x="{{.Badge.Message.X}}" y="130" transform="scale(.1)"
+			fill="#fff" textLength="{{.Badge.Message.TextLength}}">{{.Badge.Message.Text}}</text></g>
+</svg>
diff --git a/shared/actions/runner_edit.tmpl b/shared/actions/runner_edit.tmpl
new file mode 100644
index 0000000..54250f8
--- /dev/null
+++ b/shared/actions/runner_edit.tmpl
@@ -0,0 +1,96 @@
+<div class="runner-container">
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "actions.runners.runner_title"}} {{.Runner.ID}} {{.Runner.Name}}
+	</h4>
+	<div class="ui attached segment">
+		<form class="ui form" method="post">
+			{{template "base/disable_form_autofill"}}
+			{{.CsrfTokenHtml}}
+			<div class="runner-basic-info">
+				<div class="field tw-inline-block tw-mr-4">
+					<label>{{ctx.Locale.Tr "actions.runners.status"}}</label>
+					<span class="ui {{if .Runner.IsOnline}}green{{else}}basic{{end}} label">{{.Runner.StatusLocaleName ctx.Locale}}</span>
+				</div>
+				<div class="field tw-inline-block tw-mr-4">
+					<label>{{ctx.Locale.Tr "actions.runners.last_online"}}</label>
+					<span>{{if .Runner.LastOnline}}{{DateUtils.TimeSince .Runner.LastOnline}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</span>
+				</div>
+				<div class="field tw-inline-block tw-mr-4">
+					<label>{{ctx.Locale.Tr "actions.runners.labels"}}</label>
+					<span>
+						{{range .Runner.AgentLabels}}
+						<span class="ui label">{{.}}</span>
+						{{end}}
+					</span>
+				</div>
+				<div class="field tw-inline-block tw-mr-4">
+					<label>{{ctx.Locale.Tr "actions.runners.owner_type"}}</label>
+					<span data-tooltip-content="{{.Runner.BelongsToOwnerName}}">{{.Runner.BelongsToOwnerType.LocaleString ctx.Locale}}</span>
+				</div>
+			</div>
+
+			<div class="divider"></div>
+
+			<div class="field">
+				<label for="description">{{ctx.Locale.Tr "actions.runners.description"}}</label>
+				<input id="description" name="description" value="{{.Runner.Description}}">
+			</div>
+
+			<div class="divider"></div>
+
+			<div class="field">
+				<button class="ui primary button" data-url="{{.Link}}">{{ctx.Locale.Tr "actions.runners.update_runner"}}</button>
+				<button class="ui red button delete-button show-modal" data-url="{{.Link}}/delete" data-modal="#runner-delete-modal">
+					{{ctx.Locale.Tr "actions.runners.delete_runner"}}</button>
+			</div>
+		</form>
+	</div>
+
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "actions.runners.task_list"}}
+	</h4>
+	<div class="ui attached segment">
+		<table class="ui very basic striped table unstackable">
+			<thead>
+				<tr>
+					<th>{{ctx.Locale.Tr "actions.runners.task_list.run"}}</th>
+					<th>{{ctx.Locale.Tr "actions.runners.task_list.status"}}</th>
+					<th>{{ctx.Locale.Tr "actions.runners.task_list.repository"}}</th>
+					<th>{{ctx.Locale.Tr "actions.runners.task_list.commit"}}</th>
+					<th>{{ctx.Locale.Tr "actions.runners.task_list.done_at"}}</th>
+				</tr>
+			</thead>
+			<tbody>
+				{{range .Tasks}}
+				<tr>
+					<td><a href="{{.GetRunLink}}" target="_blank">{{.ID}}</a></td>
+					<td><span class="ui label task-status-{{.Status.String}}">{{.Status.LocaleString ctx.Locale}}</span></td>
+					<td><a href="{{.GetRepoLink}}" target="_blank">{{.GetRepoName}}</a></td>
+					<td>
+						<strong><a href="{{.GetCommitLink}}" target="_blank">{{ShortSha .CommitSHA}}</a></strong>
+					</td>
+					<td>{{if .IsStopped}}
+						<span>{{DateUtils.TimeSince .Stopped}}</span>
+						{{else}}-{{end}}</td>
+				</tr>
+				{{end}}
+				{{if not .Tasks}}
+				<tr>
+					<td colspan="5">{{ctx.Locale.Tr "actions.runners.task_list.no_tasks"}}</td>
+				</tr>
+				{{end}}
+			</tbody>
+		</table>
+		{{template "base/paginate" .}}
+	</div>
+	<div class="ui g-modal-confirm delete modal" id="runner-delete-modal">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "actions.runners.delete_runner_header"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "actions.runners.delete_runner_notice"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+</div>
diff --git a/shared/actions/runner_list.tmpl b/shared/actions/runner_list.tmpl
new file mode 100644
index 0000000..e5907da
--- /dev/null
+++ b/shared/actions/runner_list.tmpl
@@ -0,0 +1,99 @@
+<div class="runner-container">
+
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "actions.runners.runner_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
+		<div class="ui right">
+			<div class="ui top right pointing dropdown jump">
+				<button class="ui primary tiny button">
+					{{ctx.Locale.Tr "actions.runners.new"}}
+					{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+				</button>
+				<div class="menu">
+					<div class="item">
+						<a href="https://docs.gitea.com/usage/actions/act-runner">{{ctx.Locale.Tr "actions.runners.new_notice"}}</a>
+					</div>
+					<div class="divider"></div>
+					<div class="header">
+						Registration Token
+					</div>
+					<div class="ui input">
+						<input type="text" value="{{.RegistrationToken}}" readonly>
+						<button class="ui basic label button" aria-label="{{ctx.Locale.Tr "copy"}}" data-clipboard-text="{{.RegistrationToken}}">
+							{{svg "octicon-copy" 14}}
+						</button>
+					</div>
+					<div class="divider"></div>
+					<div class="item">
+						<a class="link-action" data-url="{{$.Link}}/reset_registration_token"
+							data-modal-confirm="{{ctx.Locale.Tr "actions.runners.reset_registration_token_confirm"}}"
+						>
+							{{ctx.Locale.Tr "actions.runners.reset_registration_token"}}
+						</a>
+					</div>
+				</div>
+			</div>
+
+		</div>
+	</h4>
+	<div class="ui attached segment">
+		<form class="ui form ignore-dirty" id="user-list-search-form" action="{{$.Link}}">
+			{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.runner_kind")}}
+		</form>
+	</div>
+	<div class="ui attached table segment">
+		<table class="ui very basic striped table unstackable">
+			<thead>
+				<tr>
+					<th data-sortt-asc="online" data-sortt-desc="offline">
+						{{ctx.Locale.Tr "actions.runners.status"}}
+						{{SortArrow "online" "offline" .SortType false}}
+					</th>
+					<th data-sortt-asc="newest" data-sortt-desc="oldest">
+						{{ctx.Locale.Tr "actions.runners.id"}}
+						{{SortArrow "oldest" "newest" .SortType false}}
+					</th>
+					<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
+						{{ctx.Locale.Tr "actions.runners.name"}}
+						{{SortArrow "alphabetically" "reversealphabetically" .SortType false}}
+					</th>
+					<th>{{ctx.Locale.Tr "actions.runners.version"}}</th>
+					<th>{{ctx.Locale.Tr "actions.runners.owner_type"}}</th>
+					<th>{{ctx.Locale.Tr "actions.runners.labels"}}</th>
+					<th>{{ctx.Locale.Tr "actions.runners.last_online"}}</th>
+					<th>{{ctx.Locale.Tr "edit"}}</th>
+				</tr>
+			</thead>
+			<tbody>
+				{{if .Runners}}
+					{{range .Runners}}
+					<tr>
+						<td>
+							<span class="ui {{if .IsOnline}}green{{end}} label">{{.StatusLocaleName ctx.Locale}}</span>
+						</td>
+						<td>{{.ID}}</td>
+						<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
+						<td>{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}</td>
+						<td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString ctx.Locale}}</span></td>
+						<td class="tw-flex tw-flex-wrap tw-gap-2 runner-tags">
+							{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}
+						</td>
+						<td>{{if .LastOnline}}{{DateUtils.TimeSince .LastOnline}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</td>
+						<td class="runner-ops">
+							{{if .Editable $.RunnerOwnerID $.RunnerRepoID}}
+							<a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
+							{{end}}
+						</td>
+					</tr>
+					{{end}}
+				{{else}}
+					<tr>
+						<td class="center aligned" colspan="8">{{ctx.Locale.Tr "actions.runners.none"}}</td>
+					</tr>
+				{{end}}
+			</tbody>
+		</table>
+	</div>
+
+	{{template "base/paginate" .}}
+
+</div>
diff --git a/shared/combomarkdowneditor.tmpl b/shared/combomarkdowneditor.tmpl
new file mode 100644
index 0000000..3191346
--- /dev/null
+++ b/shared/combomarkdowneditor.tmpl
@@ -0,0 +1,96 @@
+{{/*
+Template Attributes:
+* CustomInit: do not initialize the editor automatically
+* ContainerId: id attribute for the container element
+* ContainerClasses: additional classes for the container element
+* MarkdownPreviewInRepo: the repo to preview markdown
+* MarkdownPreviewContext: preview context (the related url path when rendering) for the preview tab, eg: repo link or user home link
+* MarkdownPreviewMode: content mode for the editor, eg: wiki, comment or default
+* TextareaName: name attribute for the textarea
+* TextareaContent: content for the textarea
+* TextareaMaxLength: maxlength attribute for the textarea
+* TextareaPlaceholder: placeholder attribute for the textarea
+* TextareaAriaLabel: aria-label attribute for the textarea
+* DropzoneParentContainer: container for file upload (leave it empty if no upload)
+* DisableAutosize: whether to disable automatic height resizing
+*/}}
+{{$ariaLabel := or .TextareaAriaLabel .TextareaPlaceholder}}
+{{$repo := .MarkdownPreviewInRepo}}
+{{$previewContext := .MarkdownPreviewContext}}
+{{$previewMode := .MarkdownPreviewMode}}
+{{$previewUrl := print AppSubUrl "/-/markup"}}
+{{if $repo}}
+	{{$previewUrl = print $repo.Link "/markup"}}
+{{end}}
+{{$supportEasyMDE := or (eq $previewMode "comment") (eq $previewMode "wiki")}}
+<div {{if .ContainerId}}id="{{.ContainerId}}"{{end}} class="combo-markdown-editor {{if .CustomInit}}custom-init{{end}} {{.ContainerClasses}}"
+		data-dropzone-parent-container="{{.DropzoneParentContainer}}"
+		data-content-mode="{{$previewMode}}"
+		data-support-easy-mde="{{$supportEasyMDE}}"
+		data-preview-url="{{$previewUrl}}"
+		data-preview-context="{{$previewContext}}"
+>
+	<div class="ui top tabular menu">
+		<a class="active item" data-tab-for="markdown-writer">{{template "shared/misc/tabtitle" (ctx.Locale.Tr "write")}}</a>
+		<a class="item" data-tab-for="markdown-previewer">{{template "shared/misc/tabtitle" (ctx.Locale.Tr "preview")}}</a>
+	</div>
+	<div class="ui tab active" data-tab-panel="markdown-writer">
+		<markdown-toolbar>
+			<div class="markdown-toolbar-group">
+				<md-header class="markdown-toolbar-button" level="1" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.heading.tooltip"}}">{{svg "octicon-heading"}}</md-header>
+				<md-header class="markdown-toolbar-button" level="2" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.heading.tooltip"}}">{{svg "octicon-heading"}}</md-header>
+				<md-header class="markdown-toolbar-button" level="3" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.heading.tooltip"}}">{{svg "octicon-heading"}}</md-header>
+			</div>
+			<div class="markdown-toolbar-group">
+				<md-bold class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.bold.tooltip"}}">{{svg "octicon-bold"}}</md-bold>
+				<md-italic class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.italic.tooltip"}}">{{svg "octicon-italic"}}</md-italic>
+			</div>
+			<div class="markdown-toolbar-group">
+				<md-quote class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.quote.tooltip"}}">{{svg "octicon-quote"}}</md-quote>
+				<md-code class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.code.tooltip"}}">{{svg "octicon-code"}}</md-code>
+				<md-link class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.link.tooltip"}}">{{svg "octicon-link"}}</md-link>
+			</div>
+			<div class="markdown-toolbar-group">
+				<md-unordered-list class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.list.unordered.tooltip"}}">{{svg "octicon-list-unordered"}}</md-unordered-list>
+				<md-ordered-list class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.list.ordered.tooltip"}}">{{svg "octicon-list-ordered"}}</md-ordered-list>
+				<md-task-list class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.list.task.tooltip"}}">{{svg "octicon-tasklist"}}</md-task-list>
+				<button class="markdown-toolbar-button markdown-button-table-add" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.table.add.tooltip"}}">{{svg "octicon-table"}}</button>
+			</div>
+			{{if eq $previewMode "comment"}}
+			<div class="markdown-toolbar-group">
+				<md-mention class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.mention.tooltip"}}">{{svg "octicon-mention"}}</md-mention>
+				<md-ref class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.ref.tooltip"}}">{{svg "octicon-cross-reference"}}</md-ref>
+			</div>
+			{{end}}
+			<div class="markdown-toolbar-group">
+				<button class="markdown-toolbar-button markdown-switch-monospace" role="switch" data-enable-text="{{ctx.Locale.Tr "editor.buttons.enable_monospace_font"}}" data-disable-text="{{ctx.Locale.Tr "editor.buttons.disable_monospace_font"}}">{{svg "octicon-typography"}}</button>
+				{{if $supportEasyMDE}}
+				<button class="markdown-toolbar-button markdown-switch-easymde" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.switch_to_legacy.tooltip"}}">{{svg "octicon-arrow-switch"}}</button>
+				{{end}}
+			</div>
+		</markdown-toolbar>
+		<text-expander keys=": @ #" multiword="#" suffix="">
+			<textarea class="markdown-text-editor"
+				{{if .TextareaName}}name="{{.TextareaName}}"{{end}} {{if .TextareaMaxLength}}maxlength="{{.TextareaMaxLength}}"{{end}}
+				{{if .TextareaPlaceholder}}placeholder="{{.TextareaPlaceholder}}"{{end}} {{if $ariaLabel}}aria-label="{{$ariaLabel}}"{{end}}
+				{{if .DisableAutosize}}data-disable-autosize="{{.DisableAutosize}}"{{end}}
+			>{{.TextareaContent}}</textarea>
+		</text-expander>
+		<script>
+			if (localStorage?.getItem('markdown-editor-monospace') === 'true') {
+				document.querySelector('.markdown-text-editor').classList.add('tw-font-mono');
+			}
+		</script>
+	</div>
+	<div class="ui tab markup" data-tab-panel="markdown-previewer">
+		{{ctx.Locale.Tr "loading"}}
+	</div>
+	<div class="markdown-add-table-panel tippy-target">
+		<div class="ui form tw-p-4 flex-text-block">
+			<input type="number" name="rows" min="1" value="3" size="3" class="tw-w-24" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.table.rows"}}">
+			x
+			<input type="number" name="cols" min="1" value="3" size="3" class="tw-w-24" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.table.cols"}}">
+			<button class="ui button primary" type="button">{{ctx.Locale.Tr "editor.buttons.table.add.insert"}}</button>
+		</div>
+	</div>
+</div>
diff --git a/shared/fileisempty.tmpl b/shared/fileisempty.tmpl
new file mode 100644
index 0000000..a92bcbc
--- /dev/null
+++ b/shared/fileisempty.tmpl
@@ -0,0 +1,3 @@
+<div class="file-not-rendered-prompt">
+	{{ctx.Locale.Tr "repo.file_is_empty"}}
+</div>
diff --git a/shared/filetoolarge.tmpl b/shared/filetoolarge.tmpl
new file mode 100644
index 0000000..cb23864
--- /dev/null
+++ b/shared/filetoolarge.tmpl
@@ -0,0 +1,4 @@
+<div class="file-not-rendered-prompt">
+	{{ctx.Locale.Tr "repo.file_too_large"}}
+	{{if .RawFileLink}}<a href="{{.RawFileLink}}" rel="nofollow">{{ctx.Locale.Tr "repo.file_view_raw"}}</a>{{end}}
+</div>
diff --git a/shared/issueicon.tmpl b/shared/issueicon.tmpl
new file mode 100644
index 0000000..bb6247c
--- /dev/null
+++ b/shared/issueicon.tmpl
@@ -0,0 +1,26 @@
+{{/* the logic should be kept the same as getIssueIcon/getIssueColor in JS code */}}
+{{- if .IsPull -}}
+	{{- if not .PullRequest -}}
+		No PullRequest
+	{{- else -}}
+		{{- if .IsClosed -}}
+			{{- if .PullRequest.HasMerged -}}
+				{{- svg "octicon-git-merge" 16 "text purple" -}}
+			{{- else -}}
+				{{- svg "octicon-git-pull-request-closed" 16 "text red" -}}
+			{{- end -}}
+		{{- else -}}
+			{{- if .PullRequest.IsWorkInProgress ctx -}}
+				{{- svg "octicon-git-pull-request-draft" 16 "text grey" -}}
+			{{- else -}}
+				{{- svg "octicon-git-pull-request" 16 "text green" -}}
+			{{- end -}}
+		{{- end -}}
+	{{- end -}}
+{{- else -}}
+	{{- if .IsClosed -}}
+		{{- svg "octicon-issue-closed" 16 "text red" -}}
+	{{- else -}}
+		{{- svg "octicon-issue-opened" 16 "text green" -}}
+	{{- end -}}
+{{- end -}}
diff --git a/shared/issuelist.tmpl b/shared/issuelist.tmpl
new file mode 100644
index 0000000..a2b802f
--- /dev/null
+++ b/shared/issuelist.tmpl
@@ -0,0 +1,163 @@
+<div id="issue-list" class="flex-list">
+	{{$approvalCounts := .ApprovalCounts}}
+	{{range .Issues}}
+		<div class="flex-item">
+
+			<div class="flex-item-icon">
+				{{if $.CanWriteIssuesOrPulls}}
+				<input type="checkbox" autocomplete="off" class="issue-checkbox tw-mr-4" data-issue-id={{.ID}} aria-label="{{ctx.Locale.Tr "repo.issues.action_check"}} &quot;{{.Title}}&quot;">
+				{{end}}
+				{{template "shared/issueicon" .}}
+			</div>
+
+			<div class="flex-item-main">
+				<div class="flex-item-header">
+					<div class="flex-item-title">
+						<a class="tw-no-underline issue-title" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+						{{if .IsPull}}
+							{{if (index $.CommitStatuses .PullRequest.ID)}}
+								{{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID)}}
+							{{end}}
+						{{end}}
+						<span class="labels-list tw-ml-1">
+							{{range .Labels}}
+								<a href="?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}{{if ne $.listType "milestone"}}&milestone={{$.MilestoneID}}{{end}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.RenderUtils.RenderLabel .}}</a>
+							{{end}}
+						</span>
+					</div>
+					{{if or .TotalTrackedTime .Assignees .NumComments}}
+					<div class="flex-item-trailing">
+						{{if .TotalTrackedTime}}
+						<div class="text grey flex-text-block">
+								{{svg "octicon-clock" 16}}
+								{{.TotalTrackedTime | Sec2Time}}
+						</div>
+						{{end}}
+						{{if .Assignees}}
+						<div class="text grey">
+							{{range .Assignees}}
+								<a class="ui assignee tw-no-underline" href="{{.HomeLink}}" data-tooltip-content="{{.GetDisplayName}}">
+									{{ctx.AvatarUtils.Avatar . 20}}
+								</a>
+							{{end}}
+						</div>
+						{{end}}
+						{{if .NumComments}}
+						<div class="text grey">
+							<a class="tw-no-underline muted flex-text-block" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
+								{{svg "octicon-comment" 16}}{{.NumComments}}
+							</a>
+						</div>
+						{{end}}
+					</div>
+					{{end}}
+				</div>
+				<div class="flex-item-body">
+					<a class="index" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
+						{{if eq $.listType "dashboard"}}
+							{{.Repo.FullName}}#{{.Index}}
+						{{else}}
+							#{{.Index}}
+						{{end}}
+					</a>
+					{{$timeStr := DateUtils.TimeSince .GetLastEventTimestamp}}
+					{{if .OriginalAuthor}}
+						{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}}
+					{{else if gt .Poster.ID 0}}
+						{{ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}}
+					{{else}}
+						{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}}
+					{{end}}
+					{{if .IsPull}}
+						<div class="branches flex-text-inline">
+							<div class="branch">
+								<a href="{{.PullRequest.BaseRepo.Link}}/src/branch/{{PathEscapeSegments .PullRequest.BaseBranch}}">
+									{{/* inline to remove the spaces between spans */}}
+									{{if ne .RepoID .PullRequest.BaseRepoID}}<span class="truncated-name">{{.PullRequest.BaseRepo.OwnerName}}</span>:{{end}}<span class="truncated-name">{{.PullRequest.BaseBranch}}</span>
+								</a>
+							</div>
+							{{svg "gitea-double-chevron-left" 12}}
+							{{if .PullRequest.HeadRepo}}
+							<div class="branch">
+								<a href="{{.PullRequest.HeadRepo.Link}}/src/branch/{{PathEscapeSegments .PullRequest.HeadBranch}}">
+									{{/* inline to remove the spaces between spans */}}
+									{{if ne .RepoID .PullRequest.HeadRepoID}}<span class="truncated-name">{{.PullRequest.HeadRepo.OwnerName}}</span>:{{end}}<span class="truncated-name">{{.PullRequest.HeadBranch}}</span>
+								</a>
+							</div>
+							{{end}}
+						</div>
+					{{end}}
+					{{if and .Milestone (ne $.listType "milestone")}}
+						<a class="milestone flex-text-inline tw-max-w-[300px]" {{if $.RepoLink}}href="{{$.RepoLink}}/milestone/{{.Milestone.ID}}"{{else}}href="{{.Repo.Link}}/milestone/{{.Milestone.ID}}"{{end}}>
+							{{svg "octicon-milestone" 14}}
+							<span class="gt-ellipsis">{{.Milestone.Name}}</span>
+						</a>
+					{{end}}
+					{{if .Project}}
+						<a class="project flex-text-inline tw-max-w-[300px]" href="{{.Project.Link ctx}}">
+							{{svg .Project.IconName 14}}
+							<span class="gt-ellipsis">{{.Project.Title}}</span>
+						</a>
+					{{end}}
+					{{if .Ref}}{{/* TODO: RemoveIssueRef: see "repo/issue/branch_selector_field.tmpl" */}}
+						<a class="ref flex-text-inline tw-max-w-[300px]" {{if $.RepoLink}}href="{{index $.IssueRefURLs .ID}}"{{else}}href="{{.Repo.Link}}{{index $.IssueRefURLs .ID}}"{{end}}>
+							{{svg "octicon-git-branch" 14}}
+							<span class="gt-ellipsis">{{index $.IssueRefEndNames .ID}}</span>
+						</a>
+					{{end}}
+					{{$tasks := .GetTasks}}
+					{{if gt $tasks 0}}
+						{{$tasksDone := .GetTasksDone}}
+						<span class="checklist flex-text-inline">
+							{{svg "octicon-checklist" 14}}{{$tasksDone}} / {{$tasks}}
+							<progress value="{{$tasksDone}}" max="{{$tasks}}"></progress>
+						</span>
+					{{end}}
+					{{if ne .DeadlineUnix 0}}
+						<span class="due-date flex-text-inline" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date"}}">
+							<span{{if .IsOverdue}} class="text red"{{end}}>
+								{{svg "octicon-calendar" 14}}
+								{{DateUtils.AbsoluteShort .DeadlineUnix}}
+							</span>
+						</span>
+					{{end}}
+					{{if .IsPull}}
+						{{$approveOfficial := call $approvalCounts .ID "approve"}}
+						{{$rejectOfficial := call $approvalCounts .ID "reject"}}
+						{{$waitingOfficial := call $approvalCounts .ID "waiting"}}
+						{{if gt $approveOfficial 0}}
+							<span class="approvals green flex-text-inline">
+								{{svg "octicon-check" 14}}
+								{{ctx.Locale.TrN $approveOfficial "repo.pulls.approve_count_1" "repo.pulls.approve_count_n" $approveOfficial}}
+							</span>
+						{{end}}
+						{{if gt $rejectOfficial 0}}
+							<span class="rejects red flex-text-inline">
+								{{svg "octicon-diff" 14}}
+								{{ctx.Locale.TrN $rejectOfficial "repo.pulls.reject_count_1" "repo.pulls.reject_count_n" $rejectOfficial}}
+							</span>
+						{{end}}
+						{{if gt $waitingOfficial 0}}
+							<span class="waiting flex-text-inline">
+								{{svg "octicon-eye" 14}}
+								{{ctx.Locale.TrN $waitingOfficial "repo.pulls.waiting_count_1" "repo.pulls.waiting_count_n" $waitingOfficial}}
+							</span>
+						{{end}}
+						{{if and (not .PullRequest.HasMerged) .PullRequest.ConflictedFiles}}
+							<span class="conflicting flex-text-inline">
+								{{svg "octicon-x" 14}}
+								{{ctx.Locale.TrN (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n" (len .PullRequest.ConflictedFiles)}}
+							</span>
+						{{end}}
+					{{end}}
+				</div>
+			</div>
+		</div>
+	{{end}}
+	{{if .IssueIndexerUnavailable}}
+		<div class="ui error message">
+			<p>{{ctx.Locale.Tr "search.keyword_search_unavailable"}}</p>
+		</div>
+	{{end}}
+</div>
+{{template "base/paginate" .}}
diff --git a/shared/misc/tabtitle.tmpl b/shared/misc/tabtitle.tmpl
new file mode 100644
index 0000000..dea9d4d
--- /dev/null
+++ b/shared/misc/tabtitle.tmpl
@@ -0,0 +1 @@
+<span class="resize-for-semibold" data-text="{{.}}">{{.}}</span>
diff --git a/shared/repo_search.tmpl b/shared/repo_search.tmpl
new file mode 100644
index 0000000..7fcb5d2
--- /dev/null
+++ b/shared/repo_search.tmpl
@@ -0,0 +1,64 @@
+<div class="ui small secondary filter menu">
+	<form id="repo-search-form" class="ui form ignore-dirty tw-flex-1 tw-flex tw-gap-x-2">
+		{{if .Language}}<input type="hidden" name="language" value="{{.Language}}">{{end}}
+		{{if .PageIsExploreRepositories}}<input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}">{{end}}
+		{{if .TabName}}<input type="hidden" name="tab" value="{{.TabName}}">{{end}}
+		{{if .TopicOnly}}<input type="hidden" name="topic" value="{{.TopicOnly}}">{{end}}
+		<div class="ui small fluid action input tw-flex-1">
+			{{template "shared/search/input" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.repo_kind")}}
+			{{template "shared/search/button"}}
+		</div>
+		<!-- Filter -->
+		<div class="item ui small dropdown jump">
+			<span class="text">{{ctx.Locale.Tr "filter"}}</span>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu flex-items-menu">
+				<label class="item"><input type="radio" name="clear-filter"> {{ctx.Locale.Tr "filter.clear"}}</label>
+				<div class="divider"></div>
+				<label class="item"><input type="radio" name="archived" {{if .IsArchived.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.is_archived"}}</label>
+				<label class="item"><input type="radio" name="archived" {{if (not (.IsArchived.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.not_archived"}}</label>
+				<div class="divider"></div>
+				<label class="item"><input type="radio" name="fork" {{if .IsFork.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.is_fork"}}</label>
+				<label class="item"><input type="radio" name="fork" {{if (not (.IsFork.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.not_fork"}}</label>
+				<div class="divider"></div>
+				<label class="item"><input type="radio" name="mirror" {{if .IsMirror.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.is_mirror"}}</label>
+				<label class="item"><input type="radio" name="mirror" {{if (not (.IsMirror.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.not_mirror"}}</label>
+				<div class="divider"></div>
+				<label class="item"><input type="radio" name="template" {{if .IsTemplate.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.is_template"}}</label>
+				<label class="item"><input type="radio" name="template" {{if (not (.IsTemplate.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.not_template"}}</label>
+				<div class="divider"></div>
+				<label class="item"><input type="radio" name="private" {{if .IsPrivate.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.private"}}</label>
+				<label class="item"><input type="radio" name="private" {{if (not (.IsPrivate.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.public"}}</label>
+			</div>
+		</div>
+		<!-- Sort -->
+		<div class="item ui small dropdown jump">
+			<span class="text">{{ctx.Locale.Tr "repo.issues.filter_sort"}}</span>
+			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+			<div class="menu">
+				<label class="{{if eq .SortType "newest"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "newest"}}checked{{end}} value="newest"> {{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</label>
+				<label class="{{if eq .SortType "oldest"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "oldest"}}checked{{end}} value="oldest"> {{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</label>
+				<label class="{{if eq .SortType "alphabetically"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "alphabetically"}}checked{{end}} value="alphabetically"> {{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</label>
+				<label class="{{if eq .SortType "reversealphabetically"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "reversealphabetically"}}checked{{end}} value="reversealphabetically"> {{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</label>
+				<label class="{{if eq .SortType "recentupdate"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "recentupdate"}}checked{{end}} value="recentupdate"> {{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</label>
+				<label class="{{if eq .SortType "leastupdate"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "leastupdate"}}checked{{end}} value="leastupdate"> {{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</label>
+				{{if not .DisableStars}}
+					<label class="{{if eq .SortType "moststars"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "moststars"}}checked{{end}} value="moststars"> {{ctx.Locale.Tr "repo.issues.filter_sort.moststars"}}</label>
+					<label class="{{if eq .SortType "feweststars"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "feweststars"}}checked{{end}} value="feweststars"> {{ctx.Locale.Tr "repo.issues.filter_sort.feweststars"}}</label>
+				{{end}}
+				<label class="{{if eq .SortType "mostforks"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "mostforks"}}checked{{end}} value="mostforks"> {{ctx.Locale.Tr "repo.issues.filter_sort.mostforks"}}</label>
+				<label class="{{if eq .SortType "fewestforks"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "fewestforks"}}checked{{end}} value="fewestforks"> {{ctx.Locale.Tr "repo.issues.filter_sort.fewestforks"}}</label>
+				<label class="{{if eq .SortType "size"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "size"}}checked{{end}} value="size"> {{ctx.Locale.Tr "repo.issues.label.filter_sort.by_size"}}</label>
+				<label class="{{if eq .SortType "reversesize"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "reversesize"}}checked{{end}} value="reversesize"> {{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_by_size"}}</label>
+			</div>
+		</div>
+	</form>
+</div>
+{{if and .PageIsExploreRepositories .OnlyShowRelevant}}
+	<div class="ui message">
+		<span data-tooltip-content="{{ctx.Locale.Tr "explore.relevant_repositories_tooltip"}}">
+			{{ctx.Locale.Tr "explore.relevant_repositories" (printf "?only_show_relevant=0&sort=%s&q=%s&language=%s" $.SortType (QueryEscape $.Keyword) (QueryEscape $.Language))}}
+		</span>
+	</div>
+{{end}}
+<div class="divider"></div>
diff --git a/shared/search/button.tmpl b/shared/search/button.tmpl
new file mode 100644
index 0000000..7bb1662
--- /dev/null
+++ b/shared/search/button.tmpl
@@ -0,0 +1,3 @@
+{{/* Disable (optional) - if search button has to be disabled */}}
+{{/* Tooltip (optional) - a tooltip to be displayed on hover */}}
+<button class="ui small icon button" aria-label="{{ctx.Locale.Tr "search.search"}}" {{with .Tooltip}}data-tooltip-content="{{.}}"{{end}}{{if .Disabled}} disabled{{end}}>{{svg "octicon-search"}}</button>
diff --git a/shared/search/code/results.tmpl b/shared/search/code/results.tmpl
new file mode 100644
index 0000000..a98a662
--- /dev/null
+++ b/shared/search/code/results.tmpl
@@ -0,0 +1,36 @@
+<div class="flex-text-block tw-flex-wrap">
+	{{range $term := .SearchResultLanguages}}
+	<a class="ui {{if eq $.Language $term.Language}}primary{{end}} basic label tw-m-0"
+		href="?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}&fuzzy={{$.IsFuzzy}}">
+		<i class="color-icon tw-mr-2" style="background-color: {{$term.Color}}"></i>
+		{{$term.Language}}
+		<div class="detail">{{$term.Count}}</div>
+	</a>
+	{{end}}
+</div>
+<div class="repository search">
+	{{range $result := .SearchResults}}
+		{{$repo := or $.Repo (index $.RepoMaps .RepoID)}}
+		<div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result">
+			<h4 class="ui top attached header tw-font-normal tw-flex tw-flex-wrap">
+				{{if not $.Repo}}
+					<span class="file tw-flex-1">
+						<a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a>
+						{{if $repo.IsArchived}}
+							<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
+						{{end}}
+						- {{.Filename}}
+					</span>
+				{{else}}
+					<span class="file tw-flex-1">{{.Filename}}</span>
+				{{end}}
+				<a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
+			</h4>
+			<div class="ui attached table segment">
+				{{template "shared/searchfile" dict "RepoLink" $repo.Link "SearchResult" .}}
+			</div>
+			{{template "shared/searchbottom" dict "root" $ "result" .}}
+		</div>
+	{{end}}
+</div>
+{{template "base/paginate" .}}
diff --git a/shared/search/code/search.tmpl b/shared/search/code/search.tmpl
new file mode 100644
index 0000000..dde45c0
--- /dev/null
+++ b/shared/search/code/search.tmpl
@@ -0,0 +1,23 @@
+<form class="ui form ignore-dirty">
+	{{template "shared/search/combo_fuzzy" dict "Value" .Keyword "Disabled" .CodeIndexerUnavailable "IsFuzzy" .IsFuzzy "Placeholder" (ctx.Locale.Tr "search.code_kind")}}
+</form>
+<div class="divider"></div>
+<div class="ui list">
+	{{template "base/alert" .}}
+	{{if .CodeIndexerUnavailable}}
+		<div class="ui error message">
+			<p>{{ctx.Locale.Tr "search.code_search_unavailable"}}</p>
+		</div>
+	{{else}}
+		{{if not .IsRepoIndexerEnabled}}
+			<div class="ui message">
+				<p>{{ctx.Locale.Tr "search.code_search_by_git_grep"}}</p>
+			</div>
+		{{end}}
+		{{if .SearchResults}}
+			{{template "shared/search/code/results" .}}
+		{{else if .Keyword}}
+			<div>{{ctx.Locale.Tr "search.no_results"}}</div>
+		{{end}}
+	{{end}}
+</div>
diff --git a/shared/search/combo.tmpl b/shared/search/combo.tmpl
new file mode 100644
index 0000000..788db95
--- /dev/null
+++ b/shared/search/combo.tmpl
@@ -0,0 +1,8 @@
+{{/* Value - value of the search field (for search results page) */}}
+{{/* Disabled (optional) - if search field/button has to be disabled */}}
+{{/* Placeholder (optional) - placeholder text to be used */}}
+{{/* Tooltip (optional) - a tooltip to be displayed on button hover */}}
+<div class="ui small fluid action input">
+	{{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}}
+	{{template "shared/search/button" dict "Disabled" .Disabled "Tooltip" .Tooltip}}
+</div>
diff --git a/shared/search/combo_fuzzy.tmpl b/shared/search/combo_fuzzy.tmpl
new file mode 100644
index 0000000..3540a89
--- /dev/null
+++ b/shared/search/combo_fuzzy.tmpl
@@ -0,0 +1,10 @@
+{{/* Value - value of the search field (for search results page) */}}
+{{/* Disabled (optional) - if search field/button has to be disabled */}}
+{{/* Placeholder (optional) - placeholder text to be used */}}
+{{/* IsFuzzy - state of the fuzzy search toggle */}}
+{{/* Tooltip (optional) - a tooltip to be displayed on button hover */}}
+<div class="ui small fluid action input">
+	{{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}}
+	{{template "shared/search/fuzzy" dict "Disabled" .Disabled "IsFuzzy" .IsFuzzy}}
+	{{template "shared/search/button" dict "Disabled" .Disabled "Tooltip" .Tooltip}}
+</div>
diff --git a/shared/search/fuzzy.tmpl b/shared/search/fuzzy.tmpl
new file mode 100644
index 0000000..5c09d3c
--- /dev/null
+++ b/shared/search/fuzzy.tmpl
@@ -0,0 +1,10 @@
+{{/* Disabled (optional) - if dropdown has to be disabled */}}
+{{/* IsFuzzy - state of the fuzzy search toggle */}}
+<div class="ui small dropdown selection {{if .Disabled}} disabled{{end}}" data-tooltip-content="{{ctx.Locale.Tr "search.type_tooltip"}}">
+	<input name="fuzzy" type="hidden"{{if .Disabled}} disabled{{end}} value="{{.IsFuzzy}}">{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+	<div class="text">{{if .IsFuzzy}}{{ctx.Locale.Tr "search.fuzzy"}}{{else}}{{ctx.Locale.Tr "search.exact"}}{{end}}</div>
+	<div class="menu">
+		<div class="item" data-value="true" data-tooltip-content="{{ctx.Locale.Tr "search.fuzzy_tooltip"}}">{{ctx.Locale.Tr "search.fuzzy"}}</div>
+		<div class="item" data-value="false" data-tooltip-content="{{ctx.Locale.Tr "search.exact_tooltip"}}">{{ctx.Locale.Tr "search.exact"}}</div>
+	</div>
+</div>
diff --git a/shared/search/input.tmpl b/shared/search/input.tmpl
new file mode 100644
index 0000000..75bed07
--- /dev/null
+++ b/shared/search/input.tmpl
@@ -0,0 +1,4 @@
+{{/* Value - value of the search field (for search results page) */}}
+{{/* Disabled (optional) - if search field has to be disabled */}}
+{{/* Placeholder (optional) - placeholder text to be used */}}
+<input type="search" name="q"{{with .Value}} value="{{.}}"{{end}} maxlength="255" spellcheck="false" placeholder="{{with .Placeholder}}{{.}}{{else}}{{ctx.Locale.Tr "search.search"}}{{end}}"{{if .Disabled}} disabled{{end}}>
diff --git a/shared/searchbottom.tmpl b/shared/searchbottom.tmpl
new file mode 100644
index 0000000..4e0bd95
--- /dev/null
+++ b/shared/searchbottom.tmpl
@@ -0,0 +1,14 @@
+{{if or .result.Language (not .result.UpdatedUnix.IsZero)}}
+<div class="ui bottom attached table segment tw-flex tw-items-center tw-justify-between">
+		<div class="tw-flex tw-items-center tw-ml-4">
+			{{if .result.Language}}
+					<i class="color-icon tw-mr-2" style="background-color: {{.result.Color}}"></i>{{.result.Language}}
+			{{end}}
+		</div>
+		<div class="tw-mr-4">
+			{{if not .result.UpdatedUnix.IsZero}}
+					<span class="ui grey text">{{ctx.Locale.Tr "explore.code_last_indexed_at" (DateUtils.TimeSince .result.UpdatedUnix)}}</span>
+			{{end}}
+		</div>
+</div>
+{{end}}
diff --git a/shared/searchfile.tmpl b/shared/searchfile.tmpl
new file mode 100644
index 0000000..280584e
--- /dev/null
+++ b/shared/searchfile.tmpl
@@ -0,0 +1,14 @@
+<div class="file-body file-code code-view">
+	<table>
+		<tbody>
+			{{range .SearchResult.Lines}}
+				<tr>
+					<td class="lines-num">
+						<a href="{{$.RepoLink}}/src/commit/{{PathEscape $.SearchResult.CommitID}}/{{PathEscapeSegments $.SearchResult.Filename}}#L{{.Num}}"><span>{{.Num}}</span></a>
+					</td>
+					<td class="lines-code chroma"><code class="code-inner">{{.FormattedContent}}</code></td>
+				</tr>
+			{{end}}
+		</tbody>
+	</table>
+</div>
diff --git a/shared/secrets/add_list.tmpl b/shared/secrets/add_list.tmpl
new file mode 100644
index 0000000..59596d1
--- /dev/null
+++ b/shared/secrets/add_list.tmpl
@@ -0,0 +1,81 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "secrets.management"}}
+	<div class="ui right">
+		<button class="ui primary tiny button show-modal"
+			data-modal="#add-secret-modal"
+			data-modal-form.action="{{.Link}}"
+			data-modal-header="{{ctx.Locale.Tr "secrets.creation"}}"
+		>
+			{{ctx.Locale.Tr "secrets.creation"}}
+		</button>
+	</div>
+</h4>
+<div class="ui attached segment">
+	{{if .Secrets}}
+	<div class="flex-list">
+		{{range .Secrets}}
+		<div class="flex-item tw-items-center">
+			<div class="flex-item-leading">
+				{{svg "octicon-key" 32}}
+			</div>
+			<div class="flex-item-main">
+				<div class="flex-item-title">
+					{{.Name}}
+				</div>
+				<div class="flex-item-body">
+					******
+				</div>
+			</div>
+			<div class="flex-item-trailing">
+				<span class="color-text-light-2">
+					{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}}
+				</span>
+				<button class="ui btn interact-bg link-action tw-p-2"
+					data-url="{{$.Link}}/delete?id={{.ID}}"
+					data-modal-confirm="{{ctx.Locale.Tr "secrets.deletion.description"}}"
+					data-tooltip-content="{{ctx.Locale.Tr "secrets.deletion"}}"
+				>
+					{{svg "octicon-trash"}}
+				</button>
+			</div>
+		</div>
+		{{end}}
+	</div>
+	{{else}}
+		{{ctx.Locale.Tr "secrets.none"}}
+	{{end}}
+</div>
+
+{{/* Add secret dialog */}}
+<div class="ui small modal" id="add-secret-modal">
+	<div class="header">
+		<span id="actions-modal-header"></span>
+	</div>
+	<form class="ui form form-fetch-action" method="post">
+		<div class="content">
+			{{.CsrfTokenHtml}}
+			<div class="field">
+				{{ctx.Locale.Tr "secrets.description"}}
+			</div>
+			<div class="field">
+				<label for="secret-name">{{ctx.Locale.Tr "name"}}</label>
+				<input autofocus required
+					id="secret-name"
+					name="name"
+					value="{{.name}}"
+					pattern="^(?!GITEA_|GITHUB_)[a-zA-Z_][a-zA-Z0-9_]*$"
+					placeholder="{{ctx.Locale.Tr "secrets.creation.name_placeholder"}}"
+				>
+			</div>
+			<div class="field">
+				<label for="secret-data">{{ctx.Locale.Tr "value"}}</label>
+				<textarea required
+					id="secret-data"
+					name="data"
+					placeholder="{{ctx.Locale.Tr "secrets.creation.value_placeholder"}}"
+				></textarea>
+			</div>
+		</div>
+		{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+	</form>
+</div>
diff --git a/shared/user/authorlink.tmpl b/shared/user/authorlink.tmpl
new file mode 100644
index 0000000..abe1ab1
--- /dev/null
+++ b/shared/user/authorlink.tmpl
@@ -0,0 +1 @@
+<a class="author text black tw-font-semibold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>{{if .IsBot}}<span class="ui basic label tw-p-1 tw-align-baseline">bot</span>{{end}}
diff --git a/shared/user/avatarlink.tmpl b/shared/user/avatarlink.tmpl
new file mode 100644
index 0000000..5e3ed7a
--- /dev/null
+++ b/shared/user/avatarlink.tmpl
@@ -0,0 +1 @@
+<a class="avatar"{{if gt .user.ID 0}} href="{{.user.HomeLink}}"{{end}}>{{ctx.AvatarUtils.Avatar .user}}</a>
diff --git a/shared/user/block_user_dialog.tmpl b/shared/user/block_user_dialog.tmpl
new file mode 100644
index 0000000..c6db4ca
--- /dev/null
+++ b/shared/user/block_user_dialog.tmpl
@@ -0,0 +1,23 @@
+<div class="ui small modal" id="block-user-modal">
+	<div class="header">{{ctx.Locale.Tr "user.block.title"}}</div>
+	<div class="content">
+		<div class="ui warning message">{{ctx.Locale.Tr "user.block.info"}}</div>
+		<form class="ui form modal-form" method="post">
+			{{.CsrfTokenHtml}}
+			<input type="hidden" name="action" value="block" />
+			<input type="hidden" name="blockee" class="modal-blockee" />
+			<div class="field">
+				<label>{{ctx.Locale.Tr "user.block.user_to_block"}}: <span class="text red modal-blockee-name"></span></label>
+			</div>
+			<div class="field">
+				<label for="block-note">{{ctx.Locale.Tr "user.block.note.title"}}</label>
+				<input id="block-note" name="note">
+				<p class="help">{{ctx.Locale.Tr "user.block.note.info"}}</p>
+			</div>
+			<div class="text right actions">
+				<button class="ui cancel button">{{ctx.Locale.Tr "cancel"}}</button>
+				<button class="ui red button">{{ctx.Locale.Tr "user.block.block"}}</button>
+			</div>
+		</form>
+	</div>
+</div>
diff --git a/shared/user/blocked_users.tmpl b/shared/user/blocked_users.tmpl
new file mode 100644
index 0000000..e83a039
--- /dev/null
+++ b/shared/user/blocked_users.tmpl
@@ -0,0 +1,83 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "user.block.title"}}
+</h4>
+<div class="ui attached segment">
+	<p>{{ctx.Locale.Tr "user.block.info_1"}}</p>
+	<ul>
+		<li>{{ctx.Locale.Tr "user.block.info_2"}}</li>
+		<li>{{ctx.Locale.Tr "user.block.info_3"}}</li>
+		<li>{{ctx.Locale.Tr "user.block.info_4"}}</li>
+		<li>{{ctx.Locale.Tr "user.block.info_5"}}</li>
+		<li>{{ctx.Locale.Tr "user.block.info_6"}}</li>
+		<li>{{ctx.Locale.Tr "user.block.info_7"}}</li>
+	</ul>
+</div>
+<div class="ui segment">
+	<form class="ui form ignore-dirty" action="{{$.Link}}" method="post">
+		{{.CsrfTokenHtml}}
+		<input type="hidden" name="action" value="block" />
+		<div id="search-user-box" class="field ui fluid search input">
+			<input class="prompt tw-mr-2" name="blockee" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" required>
+			<button class="ui red button">{{ctx.Locale.Tr "user.block.block"}}</button>
+		</div>
+		<div class="field">
+			<label>{{ctx.Locale.Tr "user.block.note.title"}}</label>
+			<input name="note">
+			<p class="help">{{ctx.Locale.Tr "user.block.note.info"}}</p>
+		</div>
+	</form>
+</div>
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "user.block.list"}}
+</h4>
+<div class="ui attached segment">
+	<div class="flex-list">
+		{{range .UserBlocks}}
+			<div class="flex-item">
+				<div class="flex-item-leading">
+					{{ctx.AvatarUtils.Avatar .Blockee}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-title">
+						<a class="item" href="{{.Blockee.HTMLURL}}">{{.Blockee.GetDisplayName}}</a>
+					</div>
+					{{if .Note}}
+					<div class="flex-item-body">
+						<i>{{ctx.Locale.Tr "user.block.note"}}:</i> {{.Note}}
+					</div>
+					{{end}}
+				</div>
+				<div class="flex-item-trailing">
+					<button class="ui compact mini button show-modal" data-modal="#block-user-note-modal" data-modal-modal-blockee="{{.Blockee.Name}}" data-modal-modal-note="{{.Note}}">{{ctx.Locale.Tr "user.block.note.edit"}}</button>
+					<form action="{{$.Link}}" method="post">
+						{{$.CsrfTokenHtml}}
+						<input type="hidden" name="action" value="unblock" />
+						<input type="hidden" name="blockee" value="{{.Blockee.Name}}" />
+						<button class="ui compact mini button">{{ctx.Locale.Tr "user.block.unblock"}}</button>
+					</form>
+				</div>
+			</div>
+		{{else}}
+			<div class="item">{{ctx.Locale.Tr "user.block.list.none"}}</div>
+		{{end}}
+	</div>
+</div>
+<div class="ui small modal" id="block-user-note-modal">
+	<div class="header">{{ctx.Locale.Tr "user.block.note.edit"}}</div>
+	<div class="content">
+		<form class="ui form" action="{{$.Link}}" method="post">
+			{{.CsrfTokenHtml}}
+			<input type="hidden" name="action" value="note" />
+			<input type="hidden" name="blockee" class="modal-blockee" />
+			<div class="field">
+				<label>{{ctx.Locale.Tr "user.block.note.title"}}</label>
+				<input name="note" class="modal-note" />
+				<p class="help">{{ctx.Locale.Tr "user.block.note.info"}}</p>
+			</div>
+			<div class="text right actions">
+				<button class="ui cancel button">{{ctx.Locale.Tr "cancel"}}</button>
+				<button class="ui primary button">{{ctx.Locale.Tr "save"}}</button>
+			</div>
+		</form>
+	</div>
+</div>
diff --git a/shared/user/name.tmpl b/shared/user/name.tmpl
new file mode 100644
index 0000000..896349f
--- /dev/null
+++ b/shared/user/name.tmpl
@@ -0,0 +1 @@
+<a class="text muted" href="{{.HomeLink}}">{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}</a>
diff --git a/shared/user/namelink.tmpl b/shared/user/namelink.tmpl
new file mode 100644
index 0000000..a122f4f
--- /dev/null
+++ b/shared/user/namelink.tmpl
@@ -0,0 +1 @@
+<a{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>
diff --git a/shared/user/org_profile_avatar.tmpl b/shared/user/org_profile_avatar.tmpl
new file mode 100644
index 0000000..c0abcab
--- /dev/null
+++ b/shared/user/org_profile_avatar.tmpl
@@ -0,0 +1,16 @@
+{{with .ContextUser}}
+	<div class="ui container">
+		<div class="ui vertically grid head">
+			<div class="column">
+				<div class="ui header tw-flex tw-items-center tw-break-anywhere">
+					{{ctx.AvatarUtils.Avatar . 100}}
+					<span class="text grey"><a class="muted" href="{{.HomeLink}}">{{.DisplayName}}</a></span>
+					<span class="org-visibility">
+						{{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+						{{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+					</span>
+				</div>
+			</div>
+		</div>
+	</div>
+{{end}}
diff --git a/shared/user/profile_big_avatar.tmpl b/shared/user/profile_big_avatar.tmpl
new file mode 100644
index 0000000..f04f1ef
--- /dev/null
+++ b/shared/user/profile_big_avatar.tmpl
@@ -0,0 +1,135 @@
+<div id="profile-avatar-card" class="ui card">
+	<div id="profile-avatar" class="content tw-flex">
+	{{if eq .SignedUserID .ContextUser.ID}}
+		<a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{ctx.Locale.Tr "user.change_avatar"}}">
+			{{/* the size doesn't take affect (and no need to take affect), image size(width) should be controlled by the parent container since this is not a flex layout*/}}
+			{{ctx.AvatarUtils.Avatar .ContextUser 256}}
+		</a>
+	{{else}}
+		<span class="image">
+			{{ctx.AvatarUtils.Avatar .ContextUser 256}}
+		</span>
+	{{end}}
+	</div>
+	<div class="content tw-break-anywhere profile-avatar-name">
+		{{if .ContextUser.FullName}}<span class="header text center">{{.ContextUser.FullName}}</span>{{end}}
+		<span class="username text center">{{.ContextUser.Name}} {{if .IsAdmin}}
+					<a class="muted" href="{{AppSubUrl}}/-/admin/users/{{.ContextUser.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.users.details"}}">
+						{{svg "octicon-gear" 18}}
+					</a>
+				{{end}}</span>
+		<div class="tw-mt-2">
+			<a class="muted" href="{{.ContextUser.HomeLink}}?tab=followers">{{svg "octicon-person" 18 "tw-mr-1"}}{{.NumFollowers}} {{ctx.Locale.Tr "user.followers"}}</a> · <a class="muted" href="{{.ContextUser.HomeLink}}?tab=following">{{.NumFollowing}} {{ctx.Locale.Tr "user.following"}}</a>
+			{{if .EnableFeed}}
+				<a href="{{.ContextUser.HomeLink}}.rss"><i class="ui text grey tw-ml-2" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</i></a>
+			{{end}}
+		</div>
+	</div>
+	<div class="extra content tw-break-anywhere">
+		<ul>
+			{{if .UserBlocking}}
+				<li class="text red">{{svg "octicon-circle-slash"}} {{ctx.Locale.Tr "user.block.blocked"}}</li>
+				{{if .UserBlocking.Note}}
+					<li class="text small red">{{ctx.Locale.Tr "user.block.note"}}: {{.UserBlocking.Note}}</li>
+				{{end}}
+			{{end}}
+			{{if .ContextUser.Location}}
+				<li>
+					{{svg "octicon-location"}}
+					<span class="tw-flex-1">{{.ContextUser.Location}}</span>
+					{{if .ContextUserLocationMapURL}}
+						<a href="{{.ContextUserLocationMapURL}}" rel="nofollow noreferrer" data-tooltip-content="{{ctx.Locale.Tr "user.show_on_map"}}">
+							{{svg "octicon-link-external"}}
+						</a>
+					{{end}}
+				</li>
+			{{end}}
+			{{if (eq .SignedUserID .ContextUser.ID)}}
+				<li>
+					{{svg "octicon-mail"}}
+					<a class="tw-flex-1" href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.Email}}</a>
+					<a class="flex-text-inline" href="{{AppSubUrl}}/user/settings#privacy-user-settings" data-tooltip-content="{{ctx.Locale.Tr (Iif .ShowUserEmail "user.email_visibility.limited" "user.email_visibility.private")}}">
+						{{svg (Iif .ShowUserEmail "octicon-unlock" "octicon-lock")}}
+					</a>
+				</li>
+			{{else}}
+				{{if .ShowUserEmail}}
+					<li>
+						{{svg "octicon-mail"}}
+						<a href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.Email}}</a>
+					</li>
+				{{end}}
+			{{end}}
+			{{if .ContextUser.Website}}
+				<li>
+					{{svg "octicon-link"}}
+					<a target="_blank" rel="noopener noreferrer me" href="{{.ContextUser.Website}}">{{.ContextUser.Website}}</a>
+				</li>
+			{{end}}
+			{{if $.RenderedDescription}}
+				<li>
+					<div class="render-content markup">{{$.RenderedDescription}}</div>
+				</li>
+			{{end}}
+			{{range .OpenIDs}}
+				{{if .Show}}
+					<li>
+						{{svg "fontawesome-openid"}}
+						<a target="_blank" rel="noopener noreferrer" href="{{.URI}}">{{.URI}}</a>
+					</li>
+				{{end}}
+			{{end}}
+			<li>{{svg "octicon-calendar"}} <span>{{ctx.Locale.Tr "user.joined_on" (DateUtils.AbsoluteShort .ContextUser.CreatedUnix)}}</span></li>
+			{{if and .Orgs .HasOrgsVisible}}
+			<li>
+				<ul class="user-orgs">
+				{{range .Orgs}}
+					{{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.HasMemberWithUserID ctx $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
+					<li>
+						<a href="{{.HomeLink}}" data-tooltip-content="{{.Name}}">
+							{{ctx.AvatarUtils.Avatar .}}
+						</a>
+					</li>
+					{{end}}
+				{{end}}
+				</ul>
+			</li>
+			{{end}}
+			{{if .Badges}}
+			<li>
+				<ul class="user-badges">
+				{{range .Badges}}
+					<li>
+						<img width="64" height="64" src="{{.ImageURL}}" alt="{{.Description}}" data-tooltip-content="{{.Description}}">
+					</li>
+				{{end}}
+				</ul>
+			</li>
+			{{end}}
+			{{if and .IsSigned (ne .SignedUserID .ContextUser.ID)}}
+				{{if not .UserBlocking}}
+				<li class="follow" hx-target="#profile-avatar-card" hx-indicator="#profile-avatar-card">
+					{{if $.IsFollowing}}
+						<button hx-post="{{.ContextUser.HomeLink}}?action=unfollow" class="ui basic red button">
+							{{svg "octicon-person"}} {{ctx.Locale.Tr "user.unfollow"}}
+						</button>
+					{{else}}
+						<button hx-post="{{.ContextUser.HomeLink}}?action=follow" class="ui basic primary button">
+							{{svg "octicon-person"}} {{ctx.Locale.Tr "user.follow"}}
+						</button>
+					{{end}}
+				</li>
+				{{end}}
+				<li>
+					{{if not .UserBlocking}}
+						<a class="muted show-modal" href="#" data-modal="#block-user-modal" data-modal-modal-blockee="{{.ContextUser.Name}}" data-modal-modal-blockee-name="{{.ContextUser.GetDisplayName}}" data-modal-modal-form.action="{{AppSubUrl}}/user/settings/blocked_users">{{ctx.Locale.Tr "user.block.block.user"}}</a>
+					{{else}}
+						<a class="muted" href="{{AppSubUrl}}/user/settings/blocked_users">{{ctx.Locale.Tr "user.block.unblock"}}</a>
+					{{end}}
+				</li>
+			{{end}}
+		</ul>
+	</div>
+</div>
+
+{{template "shared/user/block_user_dialog" .}}
diff --git a/shared/variables/variable_list.tmpl b/shared/variables/variable_list.tmpl
new file mode 100644
index 0000000..7a0ab48
--- /dev/null
+++ b/shared/variables/variable_list.tmpl
@@ -0,0 +1,92 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "actions.variables.management"}}
+	<div class="ui right">
+		<button class="ui primary tiny button show-modal"
+			data-modal="#edit-variable-modal"
+			data-modal-form.action="{{.Link}}/new"
+			data-modal-header="{{ctx.Locale.Tr "actions.variables.creation"}}"
+			data-modal-dialog-variable-name=""
+			data-modal-dialog-variable-data=""
+		>
+			{{ctx.Locale.Tr "actions.variables.creation"}}
+		</button>
+	</div>
+</h4>
+<div class="ui attached segment">
+	{{if .Variables}}
+	<div class="flex-list">
+		{{range .Variables}}
+		<div class="flex-item tw-items-center">
+			<div class="flex-item-leading">
+				{{svg "octicon-pencil" 32}}
+			</div>
+			<div class="flex-item-main">
+				<div class="flex-item-title">
+					{{.Name}}
+				</div>
+				<div class="flex-item-body">
+					{{.Data}}
+				</div>
+			</div>
+			<div class="flex-item-trailing">
+				<span class="color-text-light-2">
+					{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}}
+				</span>
+				<button class="btn interact-bg tw-p-2 show-modal"
+					data-tooltip-content="{{ctx.Locale.Tr "actions.variables.edit"}}"
+					data-modal="#edit-variable-modal"
+					data-modal-form.action="{{$.Link}}/{{.ID}}/edit"
+					data-modal-header="{{ctx.Locale.Tr "actions.variables.edit"}}"
+					data-modal-dialog-variable-name="{{.Name}}"
+					data-modal-dialog-variable-data="{{.Data}}"
+				>
+					{{svg "octicon-pencil"}}
+				</button>
+				<button class="btn interact-bg tw-p-2 link-action"
+					data-tooltip-content="{{ctx.Locale.Tr "actions.variables.deletion"}}"
+					data-url="{{$.Link}}/{{.ID}}/delete"
+					data-modal-confirm="{{ctx.Locale.Tr "actions.variables.deletion.description"}}"
+				>
+					{{svg "octicon-trash"}}
+				</button>
+			</div>
+		</div>
+		{{end}}
+	</div>
+	{{else}}
+		{{ctx.Locale.Tr "actions.variables.none"}}
+	{{end}}
+</div>
+
+{{/** Edit variable dialog */}}
+<div class="ui small modal" id="edit-variable-modal">
+	<div class="header"></div>
+	<form class="ui form form-fetch-action" method="post">
+		<div class="content">
+			{{.CsrfTokenHtml}}
+			<div class="field">
+				{{ctx.Locale.Tr "actions.variables.description"}}
+			</div>
+			<div class="field">
+				<label for="dialog-variable-name">{{ctx.Locale.Tr "name"}}</label>
+				<input autofocus required
+					name="name"
+					id="dialog-variable-name"
+					value="{{.name}}"
+					pattern="^(?!GITEA_|GITHUB_)[a-zA-Z_][a-zA-Z0-9_]*$"
+					placeholder="{{ctx.Locale.Tr "secrets.creation.name_placeholder"}}"
+				>
+			</div>
+			<div class="field">
+				<label for="dialog-variable-data">{{ctx.Locale.Tr "value"}}</label>
+				<textarea required
+					name="data"
+					id="dialog-variable-data"
+					placeholder="{{ctx.Locale.Tr "secrets.creation.value_placeholder"}}"
+				></textarea>
+			</div>
+		</div>
+		{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+	</form>
+</div>
+
diff --git a/shared/webhook/icon.tmpl b/shared/webhook/icon.tmpl
new file mode 100644
index 0000000..0f80787
--- /dev/null
+++ b/shared/webhook/icon.tmpl
@@ -0,0 +1,27 @@
+{{$size := 26}}
+{{if .Size}}
+	{{$size = .Size}}
+{{end}}
+{{if eq .HookType "gitea"}}
+	{{svg "gitea-gitea" $size "img"}}
+{{else if eq .HookType "gogs"}}
+	<img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/gogs.ico">
+{{else if eq .HookType "slack"}}
+	<img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/slack.png">
+{{else if eq .HookType "discord"}}
+	<img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/discord.png">
+{{else if eq .HookType "dingtalk"}}
+	<img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/dingtalk.ico">
+{{else if eq .HookType "telegram"}}
+	<img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/telegram.png">
+{{else if eq .HookType "msteams"}}
+	<img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/msteams.png">
+{{else if eq .HookType "feishu"}}
+	<img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/feishu.png">
+{{else if eq .HookType "matrix"}}
+	{{svg "gitea-matrix" $size "img"}}
+{{else if eq .HookType "wechatwork"}}
+	<img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/wechatwork.png">
+{{else if eq .HookType "packagist"}}
+	<img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/packagist.png">
+{{end}}
diff --git a/status/404.tmpl b/status/404.tmpl
new file mode 100644
index 0000000..6cfc88a
--- /dev/null
+++ b/status/404.tmpl
@@ -0,0 +1,16 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content {{if .IsRepo}}repository{{end}}">
+	{{if .IsRepo}}{{template "repo/header" .}}{{end}}
+	<div class="ui container">
+		<div class="status-page-error">
+			<div class="status-page-error-title">404 Not Found</div>
+			<div class="tw-text-center">
+				<div class="tw-my-4">{{if .NotFoundPrompt}}{{.NotFoundPrompt}}{{else}}{{ctx.Locale.Tr "error404"}}{{end}}</div>
+				{{if .NotFoundGoBackURL}}
+					<a class="tw-block tw-my-4" href="{{.NotFoundGoBackURL}}">{{ctx.Locale.Tr "go_back"}}</a>
+				{{end}}
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/status/500.tmpl b/status/500.tmpl
new file mode 100644
index 0000000..198f1ea
--- /dev/null
+++ b/status/500.tmpl
@@ -0,0 +1,69 @@
+{{/* This page should only depend the minimal template functions/variables, to avoid triggering new panics.
+* base template functions: AppName, AssetUrlPrefix, AssetVersion, AppSubUrl, UserThemeName
+* ctx.Locale
+* .Flash
+* .ErrorMsg
+* .SignedUser (optional)
+*/}}
+<!DOCTYPE html>
+<html lang="{{ctx.Locale.Lang}}" data-theme="{{UserThemeName .SignedUser}}">
+<head>
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+	<title>Internal Server Error - {{AppName}}</title>
+	<link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml">
+	<link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
+	{{template "base/head_style" .}}
+</head>
+<body>
+	<div class="full height">
+		<nav class="ui secondary menu">
+			<div class="ui container tw-flex">
+				<div class="item tw-flex-1">
+					<a href="{{AppSubUrl}}/" aria-label="{{ctx.Locale.Tr "home"}}">
+						<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
+					</a>
+				</div>
+				<div class="item">
+					<button class="ui icon button disabled">{{svg "octicon-three-bars"}}</button>{{/* a fake button to make the UI looks better*/}}
+				</div>
+			</div>
+		</nav>
+		<div class="divider tw-my-0"></div>
+		<div role="main" class="page-content status-page-500">
+			<div class="ui container" >
+				<style> .ui.message.flash-message { text-align: left; } </style>
+				{{template "base/alert" .}}
+				<div class="status-page-error">
+					<div class="status-page-error-title">500 Internal Server Error</div>
+					{{if .ErrorMsg}}
+					<div class="tw-mt-8">
+						<p>{{ctx.Locale.Tr "error.occurred"}}:</p>
+						<pre class="tw-whitespace-pre-wrap tw-break-all">{{.ErrorMsg}}</pre>
+					</div>
+					{{end}}
+					<div class="tw-mt-8 tw-text-center">
+						{{if or .SignedUser.IsAdmin .ShowFooterVersion}}<p>{{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
+						{{if .SignedUser.IsAdmin}}<p>{{ctx.Locale.Tr "error.report_message" "https://github.com/go-gitea/gitea/issues"}}</p>{{end}}
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	{{/* When a sub-template triggers an 500 error, its parent template has been partially rendered, then the 500 page
+		will be rendered after that partially rendered page, the HTML/JS are totally broken. Use this inline script to try to move it to main viewport.
+		And this page shouldn't include any other JS file, avoid duplicate JS execution (still due to the partial rendering).*/}}
+	<script type="module">
+		const embedded = document.querySelector('.page-content .page-content.status-page-500');
+		if (embedded) {
+			// move the 500 error page content to main view
+			const embeddedParent = embedded.parentNode;
+			let main = document.querySelector('.page-content');
+			main = main ?? document.querySelector('body');
+			main.prepend(document.createElement('hr'));
+			main.prepend(embedded);
+			embeddedParent.remove(); // remove the unrelated 500-page elements (eg: the duplicate nav bar)
+		}
+	</script>
+</body>
+</html>
diff --git a/swagger/ui.tmpl b/swagger/ui.tmpl
new file mode 100644
index 0000000..9935ab9
--- /dev/null
+++ b/swagger/ui.tmpl
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<title>Gitea API</title>
+		<link href="{{AssetUrlPrefix}}/css/swagger.css?v={{AssetVersion}}" rel="stylesheet">
+	</head>
+	<body>
+		<a class="swagger-back-link" href="{{AppSubUrl}}/">{{svg "octicon-reply"}}{{ctx.Locale.Tr "return_to_gitea"}}</a>
+		<div id="swagger-ui" data-source="{{AppSubUrl}}/swagger.{{.APIJSONVersion}}.json"></div>
+		<script src="{{AssetUrlPrefix}}/js/swagger.js?v={{AssetVersion}}"></script>
+	</body>
+</html>
diff --git a/swagger/v1_json.tmpl b/swagger/v1_json.tmpl
new file mode 100644
index 0000000..fb37d45
--- /dev/null
+++ b/swagger/v1_json.tmpl
@@ -0,0 +1,26721 @@
+{
+  "consumes": [
+    "application/json",
+    "text/plain"
+  ],
+  "produces": [
+    "application/json",
+    "text/html"
+  ],
+  "schemes": [
+    "https",
+    "http"
+  ],
+  "swagger": "2.0",
+  "info": {
+    "description": "This documentation describes the Gitea API.",
+    "title": "Gitea API",
+    "license": {
+      "name": "MIT",
+      "url": "http://opensource.org/licenses/MIT"
+    },
+    "version": "{{AppVer | JSEscape}}"
+  },
+  "basePath": "{{AppSubUrl | JSEscape}}/api/v1",
+  "paths": {
+    "/activitypub/user-id/{user-id}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "activitypub"
+        ],
+        "summary": "Returns the Person actor for a user",
+        "operationId": "activitypubPerson",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "user ID of the user",
+            "name": "user-id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActivityPub"
+          }
+        }
+      }
+    },
+    "/activitypub/user-id/{user-id}/inbox": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "activitypub"
+        ],
+        "summary": "Send to the inbox",
+        "operationId": "activitypubPersonInbox",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "user ID of the user",
+            "name": "user-id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          }
+        }
+      }
+    },
+    "/admin/cron": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "List cron tasks",
+        "operationId": "adminCronList",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/CronList"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          }
+        }
+      }
+    },
+    "/admin/cron/{task}": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Run cron task",
+        "operationId": "adminCronRun",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "task to run",
+            "name": "task",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/admin/emails": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "List all emails",
+        "operationId": "adminGetAllEmails",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/EmailList"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          }
+        }
+      }
+    },
+    "/admin/emails/search": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Search all emails",
+        "operationId": "adminSearchEmails",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "keyword",
+            "name": "q",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/EmailList"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          }
+        }
+      }
+    },
+    "/admin/hooks": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "List system's webhooks",
+        "operationId": "adminListHooks",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/HookList"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Create a hook",
+        "operationId": "adminCreateHook",
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/CreateHookOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Hook"
+          }
+        }
+      }
+    },
+    "/admin/hooks/{id}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Get a hook",
+        "operationId": "adminGetHook",
+        "parameters": [
+          {
+            "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": [
+          "admin"
+        ],
+        "summary": "Delete a hook",
+        "operationId": "adminDeleteHook",
+        "parameters": [
+          {
+            "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": [
+          "admin"
+        ],
+        "summary": "Update a hook",
+        "operationId": "adminEditHook",
+        "parameters": [
+          {
+            "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"
+          }
+        }
+      }
+    },
+    "/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",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/OrganizationList"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          }
+        }
+      }
+    },
+    "/admin/runners/registration-token": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Get an global actions runner registration token",
+        "operationId": "adminGetRunnerRegistrationToken",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RegistrationToken"
+          }
+        }
+      }
+    },
+    "/admin/unadopted": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "List unadopted repositories",
+        "operationId": "adminUnadoptedList",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "pattern of repositories to search for",
+            "name": "pattern",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/StringSlice"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          }
+        }
+      }
+    },
+    "/admin/unadopted/{owner}/{repo}": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Adopt unadopted files as a repository",
+        "operationId": "adminAdoptRepository",
+        "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Delete unadopted files",
+        "operationId": "adminDeleteUnadoptedRepository",
+        "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          }
+        }
+      }
+    },
+    "/admin/users": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Search users according filter conditions",
+        "operationId": "adminSearchUsers",
+        "parameters": [
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "ID of the user's login source to search for",
+            "name": "source_id",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "user's login name to search for",
+            "name": "login_name",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "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
+          },
+          {
+            "type": "boolean",
+            "description": "purge the user from the system completely",
+            "name": "purge",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/admin/users/{username}/badges": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "List a user's badges",
+        "operationId": "adminListUserBadges",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "username of user",
+            "name": "username",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/BadgeList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Add a badge to a user",
+        "operationId": "adminAddUserBadges",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "username of user",
+            "name": "username",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/UserBadgeOption"
+            }
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Remove a badge from a user",
+        "operationId": "adminDeleteUserBadges",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "username of user",
+            "name": "username",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/UserBadgeOption"
+            }
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "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}/rename": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Rename a user",
+        "operationId": "adminRenameUser",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "existing username of user",
+            "name": "username",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/RenameUserOption"
+            }
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "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 of 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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/gitignore/templates": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "miscellaneous"
+        ],
+        "summary": "Returns a list of all gitignore templates",
+        "operationId": "listGitignoresTemplates",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/GitignoreTemplateList"
+          }
+        }
+      }
+    },
+    "/gitignore/templates/{name}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "miscellaneous"
+        ],
+        "summary": "Returns information about a gitignore template",
+        "operationId": "getGitignoreTemplateInfo",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the template",
+            "name": "name",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/GitignoreTemplateInfo"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/label/templates": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "miscellaneous"
+        ],
+        "summary": "Returns a list of all label templates",
+        "operationId": "listLabelTemplates",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/LabelTemplateList"
+          }
+        }
+      }
+    },
+    "/label/templates/{name}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "miscellaneous"
+        ],
+        "summary": "Returns all labels in a template",
+        "operationId": "getLabelTemplateInfo",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the template",
+            "name": "name",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/LabelTemplateInfo"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/licenses": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "miscellaneous"
+        ],
+        "summary": "Returns a list of all license templates",
+        "operationId": "listLicenseTemplates",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/LicenseTemplateList"
+          }
+        }
+      }
+    },
+    "/licenses/{name}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "miscellaneous"
+        ],
+        "summary": "Returns information about a license template",
+        "operationId": "getLicenseTemplateInfo",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the license",
+            "name": "name",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/LicenseTemplateInfo"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          }
+        }
+      }
+    },
+    "/markup": {
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "text/html"
+        ],
+        "tags": [
+          "miscellaneous"
+        ],
+        "summary": "Render a markup document as HTML",
+        "operationId": "renderMarkup",
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/MarkupOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/MarkupRender"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/nodeinfo": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "miscellaneous"
+        ],
+        "summary": "Returns the nodeinfo of the Gitea application",
+        "operationId": "getNodeInfo",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/NodeInfo"
+          }
+        }
+      }
+    },
+    "/notifications": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "notification"
+        ],
+        "summary": "List users's notification threads",
+        "operationId": "notifyGetList",
+        "parameters": [
+          {
+            "type": "boolean",
+            "description": "If true, show notifications marked as read. Default value is false",
+            "name": "all",
+            "in": "query"
+          },
+          {
+            "type": "array",
+            "items": {
+              "type": "string"
+            },
+            "collectionFormat": "multi",
+            "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned.",
+            "name": "status-types",
+            "in": "query"
+          },
+          {
+            "type": "array",
+            "items": {
+              "enum": [
+                "issue",
+                "pull",
+                "commit",
+                "repository"
+              ],
+              "type": "string"
+            },
+            "collectionFormat": "multi",
+            "description": "filter notifications by subject type",
+            "name": "subject-type",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
+            "name": "before",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/NotificationThreadList"
+          }
+        }
+      },
+      "put": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "notification"
+        ],
+        "summary": "Mark notification threads as read, pinned or unread",
+        "operationId": "notifyReadList",
+        "parameters": [
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
+            "name": "last_read_at",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "If true, mark all notifications on this repo. Default value is false",
+            "name": "all",
+            "in": "query"
+          },
+          {
+            "type": "array",
+            "items": {
+              "type": "string"
+            },
+            "collectionFormat": "multi",
+            "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
+            "name": "status-types",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Status to mark notifications as, Defaults to read.",
+            "name": "to-status",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "205": {
+            "$ref": "#/responses/NotificationThreadList"
+          }
+        }
+      }
+    },
+    "/notifications/new": {
+      "get": {
+        "tags": [
+          "notification"
+        ],
+        "summary": "Check if unread notifications exist",
+        "operationId": "notifyNewAvailable",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/NotificationCount"
+          }
+        }
+      }
+    },
+    "/notifications/threads/{id}": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "notification"
+        ],
+        "summary": "Get notification thread by ID",
+        "operationId": "notifyGetThread",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "id of notification thread",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/NotificationThread"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "patch": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "notification"
+        ],
+        "summary": "Mark notification thread as read by ID",
+        "operationId": "notifyReadThread",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "id of notification thread",
+            "name": "id",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "default": "read",
+            "description": "Status to mark notifications as",
+            "name": "to-status",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "205": {
+            "$ref": "#/responses/NotificationThread"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/org/{org}/repos": {
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Create a repository in an organization",
+        "operationId": "createOrgRepoDeprecated",
+        "deprecated": true,
+        "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/orgs": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Get list of organizations",
+        "operationId": "orgGetAll",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/OrganizationList"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/actions/runners/registration-token": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Get an organization's actions runner registration token",
+        "operationId": "orgGetRunnerRegistrationToken",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RegistrationToken"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/actions/secrets": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "List an organization's actions secrets",
+        "operationId": "orgListActionsSecrets",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/SecretList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/actions/secrets/{secretname}": {
+      "put": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Create or Update a secret value in an organization",
+        "operationId": "updateOrgSecret",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the secret",
+            "name": "secretname",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/CreateOrUpdateSecretOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when creating a secret"
+          },
+          "204": {
+            "description": "response when updating a secret"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Delete a secret in an organization",
+        "operationId": "deleteOrgSecret",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the secret",
+            "name": "secretname",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "description": "delete one secret of the organization"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/actions/variables": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Get an org-level variables list",
+        "operationId": "getOrgVariablesList",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/VariableList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/actions/variables/{variablename}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Get an org-level variable",
+        "operationId": "getOrgVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActionVariable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "put": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Update an org-level variable",
+        "operationId": "updateOrgVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/UpdateVariableOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when updating an org-level variable"
+          },
+          "204": {
+            "description": "response when updating an org-level variable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Create an org-level variable",
+        "operationId": "createOrgVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/CreateVariableOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when creating an org-level variable"
+          },
+          "204": {
+            "description": "response when creating an org-level variable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Delete an org-level variable",
+        "operationId": "deleteOrgVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActionVariable"
+          },
+          "201": {
+            "description": "response when deleting a variable"
+          },
+          "204": {
+            "description": "response when deleting a variable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/activities/feeds": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "List an organization's activity feeds",
+        "operationId": "orgListActivityFeeds",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the org",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "format": "date",
+            "description": "the date of the activities to be found",
+            "name": "date",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActivityFeedsList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/avatar": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Update Avatar",
+        "operationId": "orgUpdateAvatar",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/UpdateUserAvatarOption"
+            }
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Delete Avatar",
+        "operationId": "orgDeleteAvatar",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/blocks": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "List users blocked by the organization",
+        "operationId": "organizationListBlocks",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/blocks/{username}": {
+      "get": {
+        "tags": [
+          "organization"
+        ],
+        "summary": "Check if a user is blocked by the organization",
+        "operationId": "organizationCheckUserBlock",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "user to check",
+            "name": "username",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "put": {
+        "tags": [
+          "organization"
+        ],
+        "summary": "Block a user",
+        "operationId": "organizationBlockUser",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "user to block",
+            "name": "username",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "optional note for the block",
+            "name": "note",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "organization"
+        ],
+        "summary": "Unblock a user",
+        "operationId": "organizationUnblockUser",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "user to unblock",
+            "name": "username",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/HookList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/labels": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "List an organization's labels",
+        "operationId": "orgListLabels",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/LabelList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Create a label for an organization",
+        "operationId": "orgCreateLabel",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/CreateLabelOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Label"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/orgs/{org}/labels/{id}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Get a single label",
+        "operationId": "orgGetLabel",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "organization"
+        ],
+        "summary": "Delete a label",
+        "operationId": "orgDeleteLabel",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "patch": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Update a label",
+        "operationId": "orgEditLabel",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "303": {
+            "description": "redirection to /orgs/{org}/public_members/{username}"
+          },
+          "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RepositoryList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TeamList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "SearchResults of a successful search",
+            "schema": {
+              "type": "object",
+              "properties": {
+                "data": {
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/definitions/Team"
+                  }
+                },
+                "ok": {
+                  "type": "boolean"
+                }
+              }
+            }
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/packages/{owner}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "package"
+        ],
+        "summary": "Gets all packages of an owner",
+        "operationId": "listPackages",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the packages",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          },
+          {
+            "enum": [
+              "alpine",
+              "cargo",
+              "chef",
+              "composer",
+              "conan",
+              "conda",
+              "container",
+              "cran",
+              "debian",
+              "generic",
+              "go",
+              "helm",
+              "maven",
+              "npm",
+              "nuget",
+              "pub",
+              "pypi",
+              "rpm",
+              "rubygems",
+              "swift",
+              "vagrant"
+            ],
+            "type": "string",
+            "description": "package type filter",
+            "name": "type",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "name filter",
+            "name": "q",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PackageList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/packages/{owner}/{type}/{name}/{version}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "package"
+        ],
+        "summary": "Gets a package",
+        "operationId": "getPackage",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the package",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "type of the package",
+            "name": "type",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the package",
+            "name": "name",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "version of the package",
+            "name": "version",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Package"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "package"
+        ],
+        "summary": "Delete a package",
+        "operationId": "deletePackage",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the package",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "type of the package",
+            "name": "type",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the package",
+            "name": "name",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "version of the package",
+            "name": "version",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/packages/{owner}/{type}/{name}/{version}/files": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "package"
+        ],
+        "summary": "Gets all files of a package",
+        "operationId": "listPackageFiles",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the package",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "type of the package",
+            "name": "type",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the package",
+            "name": "name",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "version of the package",
+            "name": "version",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PackageFileList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/issues/search": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Search for issues across the repositories that the user has access to",
+        "operationId": "issueSearchIssues",
+        "parameters": [
+          {
+            "enum": [
+              "open",
+              "closed",
+              "all"
+            ],
+            "type": "string",
+            "default": "open",
+            "description": "State of the issue",
+            "name": "state",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded.",
+            "name": "labels",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded.",
+            "name": "milestones",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Search string",
+            "name": "q",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "Repository ID to prioritize in the results",
+            "name": "priority_repo_id",
+            "in": "query"
+          },
+          {
+            "enum": [
+              "issues",
+              "pulls"
+            ],
+            "type": "string",
+            "description": "Filter by issue type",
+            "name": "type",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show issues updated after the given time (RFC 3339 format)",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show issues updated before the given time (RFC 3339 format)",
+            "name": "before",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "default": false,
+            "description": "Filter issues or pulls assigned to the authenticated user",
+            "name": "assigned",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "default": false,
+            "description": "Filter issues or pulls created by the authenticated user",
+            "name": "created",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "default": false,
+            "description": "Filter issues or pulls mentioning the authenticated user",
+            "name": "mentioned",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "default": false,
+            "description": "Filter pull requests where the authenticated user's review was requested",
+            "name": "review_requested",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "default": false,
+            "description": "Filter pull requests reviewed by the authenticated user",
+            "name": "reviewed",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Filter by repository owner",
+            "name": "owner",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Filter by team (requires organization owner parameter)",
+            "name": "team",
+            "in": "query"
+          },
+          {
+            "minimum": 1,
+            "type": "integer",
+            "default": 1,
+            "description": "Page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "minimum": 0,
+            "type": "integer",
+            "description": "Number of items per page",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/IssueList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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/MigrateRepoOptions"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Repository"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "409": {
+            "description": "The repository with the same name already exists."
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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": "repo owner to prioritize in the results",
+            "name": "priority_owner_id",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "search only for repos that belong to the given team id",
+            "name": "team_id",
+            "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": "boolean",
+            "description": "show only pubic, private or all repositories (defaults to all)",
+            "name": "is_private",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "include template repositories this user has access to (defaults to true)",
+            "name": "template",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "show only archived, non-archived or all repositories (defaults to all)",
+            "name": "archived",
+            "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\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" 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"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/actions/runners/registration-token": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a repository's actions runner registration token",
+        "operationId": "repoGetRunnerRegistrationToken",
+        "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/RegistrationToken"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/actions/secrets": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List an repo's actions secrets",
+        "operationId": "repoListActionsSecrets",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the repository",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repository",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/SecretList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/actions/secrets/{secretname}": {
+      "put": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Create or Update a secret value in a repository",
+        "operationId": "updateRepoSecret",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the repository",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repository",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the secret",
+            "name": "secretname",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/CreateOrUpdateSecretOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when creating a secret"
+          },
+          "204": {
+            "description": "response when updating a secret"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a secret in a repository",
+        "operationId": "deleteRepoSecret",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the repository",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repository",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the secret",
+            "name": "secretname",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "description": "delete one secret of the organization"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/actions/tasks": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List a repository's action tasks",
+        "operationId": "ListActionTasks",
+        "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 of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results, default maximum page size is 50",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TasksList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "$ref": "#/responses/conflict"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/actions/variables": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get repo-level variables list",
+        "operationId": "getRepoVariablesList",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the owner",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repository",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/VariableList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/actions/variables/{variablename}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a repo-level variable",
+        "operationId": "getRepoVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the owner",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repository",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActionVariable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "put": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Update a repo-level variable",
+        "operationId": "updateRepoVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the owner",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repository",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/UpdateVariableOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when updating a repo-level variable"
+          },
+          "204": {
+            "description": "response when updating a repo-level variable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Create a repo-level variable",
+        "operationId": "createRepoVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the owner",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repository",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/CreateVariableOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when creating a repo-level variable"
+          },
+          "204": {
+            "description": "response when creating a repo-level variable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a repo-level variable",
+        "operationId": "deleteRepoVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the owner",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repository",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActionVariable"
+          },
+          "201": {
+            "description": "response when deleting a variable"
+          },
+          "204": {
+            "description": "response when deleting a variable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/activities/feeds": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List a repository's activity feeds",
+        "operationId": "repoListActivityFeeds",
+        "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",
+            "format": "date",
+            "description": "the date of the activities to be found",
+            "name": "date",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActivityFeedsList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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": "the git reference for download with attached archive format (e.g. master.zip)",
+            "name": "archive",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "success"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/assignees": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Return all users that have write access and can be assigned to issues",
+        "operationId": "repoGetAssignees",
+        "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/avatar": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Update avatar",
+        "operationId": "repoUpdateAvatar",
+        "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/UpdateRepoAvatarOption"
+            }
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete avatar",
+        "operationId": "repoDeleteAvatar",
+        "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"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/branch_protections": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List branch protections for a repository",
+        "operationId": "repoListBranchProtection",
+        "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/BranchProtectionList"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Create a branch protections for a repository",
+        "operationId": "repoCreateBranchProtection",
+        "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/CreateBranchProtectionOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/BranchProtection"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/branch_protections/priority": {
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Update the priorities of branch protections for a repository.",
+        "operationId": "repoUpdateBranchProtectionPriories",
+        "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/UpdateBranchProtectionPriories"
+            }
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/branch_protections/{name}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a specific branch protection for the repository",
+        "operationId": "repoGetBranchProtection",
+        "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 protected branch",
+            "name": "name",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/BranchProtection"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a specific branch protection for the repository",
+        "operationId": "repoDeleteBranchProtection",
+        "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 protected branch",
+            "name": "name",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "patch": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Edit a branch protections for a repository. Only fields that are set will be changed",
+        "operationId": "repoEditBranchProtection",
+        "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 protected branch",
+            "name": "name",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/EditBranchProtectionOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/BranchProtection"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/BranchList"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Create a branch",
+        "operationId": "repoCreateBranch",
+        "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/CreateBranchRepoOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Branch"
+          },
+          "403": {
+            "description": "The branch is archived or a mirror."
+          },
+          "404": {
+            "description": "The old branch does not exist."
+          },
+          "409": {
+            "description": "The branch with the same name already exists."
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/branches/{branch}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
+        "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a specific branch from a repository",
+        "operationId": "repoDeleteBranch",
+        "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 delete",
+            "name": "branch",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      },
+      "patch": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Update a branch",
+        "operationId": "repoUpdateBranch",
+        "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 branch",
+            "name": "branch",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/UpdateBranchRepoOption"
+            }
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      },
+      "put": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Add or Update 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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/collaborators/{collaborator}/permission": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get repository permissions for a user",
+        "operationId": "repoGetRepoPermissions",
+        "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": {
+          "200": {
+            "$ref": "#/responses/RepoCollaboratorPermission"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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": "string",
+            "description": "filepath of a file/dir",
+            "name": "path",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "include diff stats for every commit (disable for speedup, default 'true')",
+            "name": "stat",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "include verification for every commit (disable for speedup, default 'true')",
+            "name": "verification",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+            "name": "files",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results (ignored if used with 'path')",
+            "name": "limit",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "commits that match the given specifier will not be listed.",
+            "name": "not",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/CommitList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "$ref": "#/responses/EmptyRepository"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/commits/{ref}/status": {
+      "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 to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/CombinedStatus"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/commits/{ref}/statuses": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a commit's statuses, by branch/tag/commit reference",
+        "operationId": "repoListStatusesByRef",
+        "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
+          },
+          {
+            "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"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/CommitStatusList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/commits/{sha}/pull": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get the merged pull request of the commit",
+        "operationId": "repoGetCommitPullRequest",
+        "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 to get",
+            "name": "sha",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullRequest"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/compare/{basehead}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get commit comparison information",
+        "operationId": "repoCompareDiff",
+        "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": "compare two branches or commits",
+            "name": "basehead",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Compare"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Modify multiple files in a repository",
+        "operationId": "repoChangeFiles",
+        "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",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/ChangeFilesOptions"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/FilesResponse"
+          },
+          "403": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/error"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/error"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/error"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      },
+      "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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/diffpatch": {
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Apply diff patch to repository",
+        "operationId": "repoApplyDiffPatch",
+        "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",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/UpdateFileOptions"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/FileResponse"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "string",
+            "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
+            "name": "ref",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "success"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RepositoryList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "description": "The repository with the same name already exists."
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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": "a git ref or commit sha",
+            "name": "sha",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "boolean",
+            "description": "include diff stats for every commit (disable for speedup, default 'true')",
+            "name": "stat",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "include verification for every commit (disable for speedup, default 'true')",
+            "name": "verification",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+            "name": "files",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Commit"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/git/commits/{sha}.{diffType}": {
+      "get": {
+        "produces": [
+          "text/plain"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a commit's diff or patch",
+        "operationId": "repoDownloadCommitDiffOrPatch",
+        "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 to get",
+            "name": "sha",
+            "in": "path",
+            "required": true
+          },
+          {
+            "enum": [
+              "diff",
+              "patch"
+            ],
+            "type": "string",
+            "description": "whether the output is diff or patch",
+            "name": "diffType",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/string"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/git/notes/{sha}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a note corresponding to a single commit from a repository",
+        "operationId": "repoGetNote",
+        "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": "a git ref or commit sha",
+            "name": "sha",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "boolean",
+            "description": "include verification for every commit (disable for speedup, default 'true')",
+            "name": "verification",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+            "name": "files",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Note"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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": "GetAnnotatedTag",
+        "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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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",
+            "name": "per_page",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/GitTreeResponse"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/HookList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "string",
+            "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.",
+            "name": "ref",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issue_config": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Returns the issue config for a repo",
+        "operationId": "repoGetIssueConfig",
+        "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/RepoIssueConfig"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issue_config/validate": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Returns the validation information for a issue config",
+        "operationId": "repoValidateIssueConfig",
+        "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/RepoIssueConfigValidation"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issue_templates": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get available issue templates for a repository",
+        "operationId": "repoGetIssueTemplates",
+        "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/IssueTemplates"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "enum": [
+              "closed",
+              "open",
+              "all"
+            ],
+            "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": "string",
+            "description": "search string",
+            "name": "q",
+            "in": "query"
+          },
+          {
+            "enum": [
+              "issues",
+              "pulls"
+            ],
+            "type": "string",
+            "description": "filter by type (issues / pulls) if set",
+            "name": "type",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded",
+            "name": "milestones",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format",
+            "name": "before",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Only show items which were created by the given user",
+            "name": "created_by",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Only show items for which the given user is assigned",
+            "name": "assigned_by",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Only show items in which the given user was mentioned",
+            "name": "mentioned_by",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/IssueList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "412": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/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",
+            "format": "date-time",
+            "description": "if provided, only comments updated since the provided time are returned.",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "if provided, only comments updated before the provided time are returned.",
+            "name": "before",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/CommentList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/comments/{id}": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Get a comment",
+        "operationId": "issueGetComment",
+        "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",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Comment"
+          },
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/comments/{id}/assets": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "List comment's attachments",
+        "operationId": "issueListIssueCommentAttachments",
+        "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",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/AttachmentList"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "multipart/form-data"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Create a comment attachment",
+        "operationId": "issueCreateIssueCommentAttachment",
+        "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",
+            "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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Get a comment attachment",
+        "operationId": "issueGetIssueCommentAttachment",
+        "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",
+            "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"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Delete a comment attachment",
+        "operationId": "issueDeleteIssueCommentAttachment",
+        "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",
+            "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"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      },
+      "patch": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Edit a comment attachment",
+        "operationId": "issueEditIssueCommentAttachment",
+        "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",
+            "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"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/comments/{id}/reactions": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Get a list of reactions from a comment of an issue",
+        "operationId": "issueGetCommentReactions",
+        "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
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ReactionList"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Add a reaction to a comment of an issue",
+        "operationId": "issuePostCommentReaction",
+        "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": "content",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/EditReactionOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Reaction"
+          },
+          "201": {
+            "$ref": "#/responses/Reaction"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Remove a reaction from a comment of an issue",
+        "operationId": "issueDeleteCommentReaction",
+        "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": "content",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/EditReactionOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/pinned": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List a repo's pinned issues",
+        "operationId": "repoListPinnedIssues",
+        "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/IssueList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "issue"
+        ],
+        "summary": "Delete an issue",
+        "operationId": "issueDelete",
+        "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 issue to delete",
+            "name": "index",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "412": {
+            "$ref": "#/responses/error"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/assets": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "List issue's attachments",
+        "operationId": "issueListIssueAttachments",
+        "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/AttachmentList"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "multipart/form-data"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Create an issue attachment",
+        "operationId": "issueCreateIssueAttachment",
+        "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": "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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Get an issue attachment",
+        "operationId": "issueGetIssueAttachment",
+        "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 attachment to get",
+            "name": "attachment_id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Attachment"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Delete an issue attachment",
+        "operationId": "issueDeleteIssueAttachment",
+        "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 attachment to delete",
+            "name": "attachment_id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      },
+      "patch": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Edit an issue attachment",
+        "operationId": "issueEditIssueAttachment",
+        "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 attachment to edit",
+            "name": "attachment_id",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/EditAttachmentOptions"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Attachment"
+          },
+          "404": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/blocks": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "List issues that are blocked by this issue",
+        "operationId": "issueListBlocks",
+        "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": "index of the issue",
+            "name": "index",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/IssueList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Block the issue given in the body by the issue in path",
+        "operationId": "issueCreateIssueBlocking",
+        "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": "index of the issue",
+            "name": "index",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/IssueMeta"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Issue"
+          },
+          "404": {
+            "description": "the issue does not exist"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Unblock the issue given in the body by the issue in path",
+        "operationId": "issueRemoveIssueBlocking",
+        "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": "index of the issue",
+            "name": "index",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/IssueMeta"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Issue"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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",
+            "format": "date-time",
+            "description": "if provided, only comments updated since the specified time are returned.",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "if provided, only comments updated before the provided time are returned.",
+            "name": "before",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/CommentList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/dependencies": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "List an issue's dependencies, i.e all issues that block this issue.",
+        "operationId": "issueListIssueDependencies",
+        "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": "index of the issue",
+            "name": "index",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/IssueList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Make the issue in the url depend on the issue in the form.",
+        "operationId": "issueCreateIssueDependencies",
+        "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": "index of the issue",
+            "name": "index",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/IssueMeta"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Issue"
+          },
+          "404": {
+            "description": "the issue does not exist"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Remove an issue dependency",
+        "operationId": "issueRemoveIssueDependencies",
+        "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": "index of the issue",
+            "name": "index",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/IssueMeta"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Issue"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/pin": {
+      "post": {
+        "tags": [
+          "issue"
+        ],
+        "summary": "Pin an Issue",
+        "operationId": "pinIssue",
+        "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 issue to pin",
+            "name": "index",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "issue"
+        ],
+        "summary": "Unpin an Issue",
+        "operationId": "unpinIssue",
+        "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 issue to unpin",
+            "name": "index",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/pin/{position}": {
+      "patch": {
+        "tags": [
+          "issue"
+        ],
+        "summary": "Moves the Pin to the given Position",
+        "operationId": "moveIssuePin",
+        "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 issue",
+            "name": "index",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "the new position",
+            "name": "position",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/reactions": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Get a list reactions of an issue",
+        "operationId": "issueGetIssueReactions",
+        "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",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ReactionList"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Add a reaction to an issue",
+        "operationId": "issuePostIssueReaction",
+        "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": "content",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/EditReactionOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Reaction"
+          },
+          "201": {
+            "$ref": "#/responses/Reaction"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Remove a reaction from an issue",
+        "operationId": "issueDeleteIssueReaction",
+        "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": "content",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/EditReactionOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": {
+      "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Delete an issue's existing stopwatch.",
+        "operationId": "issueDeleteStopWatch",
+        "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": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "description": "Not repo writer, user does not have rights to toggle stopwatch"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "description": "Cannot cancel a non existent stopwatch"
+          }
+        }
+      }
+    },
+    "/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": {
+            "$ref": "#/responses/notFound"
+          },
+          "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": "issueStopStopWatch",
+        "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": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "description": "Cannot stop a non existent stopwatch"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Get users who subscribed on an issue.",
+        "operationId": "issueSubscriptions",
+        "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",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/subscriptions/check": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Check if user is subscribed to an issue",
+        "operationId": "issueCheckSubscription",
+        "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/WatchInfo"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
+      "put": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Subscribe user to issue",
+        "operationId": "issueAddSubscription",
+        "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": "user to subscribe",
+            "name": "user",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Already subscribed"
+          },
+          "201": {
+            "description": "Successfully Subscribed"
+          },
+          "304": {
+            "description": "User can only subscribe itself if he is no admin"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Unsubscribe user from issue",
+        "operationId": "issueDeleteSubscription",
+        "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": "user witch unsubscribe",
+            "name": "user",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Already unsubscribed"
+          },
+          "201": {
+            "description": "Successfully Unsubscribed"
+          },
+          "304": {
+            "description": "User can only subscribe itself if he is no admin"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/timeline": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "List all comments and events on an issue",
+        "operationId": "issueGetCommentsAndTimeline",
+        "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",
+            "format": "date-time",
+            "description": "if provided, only comments updated since the specified time are returned.",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "if provided, only comments updated before the provided time are returned.",
+            "name": "before",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TimelineList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/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": "index",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "optional filter by user (available for issue managers)",
+            "name": "user",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
+            "name": "before",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TrackedTimeList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Add 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",
+            "name": "index",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/AddTimeOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TrackedTime"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Reset a tracked time of an issue",
+        "operationId": "issueResetTime",
+        "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": "index",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/issues/{index}/times/{id}": {
+      "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "issue"
+        ],
+        "summary": "Delete specific tracked time",
+        "operationId": "issueDeleteTime",
+        "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 time to delete",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/DeployKeyList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/LabelList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/languages": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get languages and number of bytes of code written",
+        "operationId": "repoGetLanguages",
+        "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/LanguageStatistics"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/licenses": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get repo licenses",
+        "operationId": "repoGetLicenses",
+        "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/LicensesList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/media/{filepath}": {
+      "get": {
+        "produces": [
+          "application/octet-stream"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a file or it's LFS object from a repository",
+        "operationId": "repoGetRawFileOrLFS",
+        "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 get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch",
+            "name": "filepath",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "The name of the commit/branch/tag. Default the repository’s default branch",
+            "name": "ref",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Returns raw file content.",
+            "schema": {
+              "type": "file"
+            }
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/merge-upstream": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Merge a branch from upstream",
+        "operationId": "repoMergeUpstream",
+        "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/MergeUpstreamRequest"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/MergeUpstreamResponse"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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, Recognized values are open, closed and all. Defaults to \"open\"",
+            "name": "state",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "filter by milestone name",
+            "name": "name",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/MilestoneList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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": "string",
+            "description": "the milestone to get, identified by ID and if not available by name",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Milestone"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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": "string",
+            "description": "the milestone to delete, identified by ID and if not available by name",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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": "string",
+            "description": "the milestone to edit, identified by ID and if not available by name",
+            "name": "id",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/EditMilestoneOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Milestone"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/new_pin_allowed": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Returns if new Issue Pins are allowed",
+        "operationId": "repoNewPinAllowed",
+        "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/RepoNewIssuePinsAllowed"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/notifications": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "notification"
+        ],
+        "summary": "List users's notification threads on a specific repo",
+        "operationId": "notifyGetRepoList",
+        "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": "boolean",
+            "description": "If true, show notifications marked as read. Default value is false",
+            "name": "all",
+            "in": "query"
+          },
+          {
+            "type": "array",
+            "items": {
+              "type": "string"
+            },
+            "collectionFormat": "multi",
+            "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned",
+            "name": "status-types",
+            "in": "query"
+          },
+          {
+            "type": "array",
+            "items": {
+              "enum": [
+                "issue",
+                "pull",
+                "commit",
+                "repository"
+              ],
+              "type": "string"
+            },
+            "collectionFormat": "multi",
+            "description": "filter notifications by subject type",
+            "name": "subject-type",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
+            "name": "before",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/NotificationThreadList"
+          }
+        }
+      },
+      "put": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "notification"
+        ],
+        "summary": "Mark notification threads as read, pinned or unread on a specific repo",
+        "operationId": "notifyReadRepoList",
+        "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 true, mark all notifications on this repo. Default value is false",
+            "name": "all",
+            "in": "query"
+          },
+          {
+            "type": "array",
+            "items": {
+              "type": "string"
+            },
+            "collectionFormat": "multi",
+            "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
+            "name": "status-types",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "description": "Status to mark notifications as. Defaults to read.",
+            "name": "to-status",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
+            "name": "last_read_at",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "205": {
+            "$ref": "#/responses/NotificationThreadList"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "enum": [
+              "open",
+              "closed",
+              "all"
+            ],
+            "type": "string",
+            "default": "open",
+            "description": "State of pull request",
+            "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"
+          },
+          {
+            "type": "string",
+            "description": "Filter by pull request author",
+            "name": "poster",
+            "in": "query"
+          },
+          {
+            "minimum": 1,
+            "type": "integer",
+            "default": 1,
+            "description": "Page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "minimum": 0,
+            "type": "integer",
+            "description": "Page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullRequestList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "500": {
+            "$ref": "#/responses/error"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/pinned": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List a repo's pinned pull requests",
+        "operationId": "repoListPinnedPullRequests",
+        "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/PullRequestList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{base}/{head}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a pull request by base and head",
+        "operationId": "repoGetPullRequestByBaseHead",
+        "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": "base of the pull request to get",
+            "name": "base",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "head of the pull request to get",
+            "name": "head",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullRequest"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "patch": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
+        "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "$ref": "#/responses/error"
+          },
+          "412": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}.{diffType}": {
+      "get": {
+        "produces": [
+          "text/plain"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a pull request diff or patch",
+        "operationId": "repoDownloadPullDiffOrPatch",
+        "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
+          },
+          {
+            "enum": [
+              "diff",
+              "patch"
+            ],
+            "type": "string",
+            "description": "whether the output is diff or patch",
+            "name": "diffType",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "boolean",
+            "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`",
+            "name": "binary",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/string"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}/commits": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get commits for a pull request",
+        "operationId": "repoGetPullRequestCommits",
+        "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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "include verification for every commit (disable for speedup, default 'true')",
+            "name": "verification",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+            "name": "files",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/CommitList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}/files": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get changed files for a pull request",
+        "operationId": "repoGetPullRequestFiles",
+        "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
+          },
+          {
+            "type": "string",
+            "description": "skip to given file",
+            "name": "skip-to",
+            "in": "query"
+          },
+          {
+            "enum": [
+              "ignore-all",
+              "ignore-change",
+              "ignore-eol",
+              "show-all"
+            ],
+            "type": "string",
+            "description": "whitespace behavior",
+            "name": "whitespace",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ChangedFileList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "405": {
+            "$ref": "#/responses/empty"
+          },
+          "409": {
+            "$ref": "#/responses/error"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Cancel the scheduled auto merge for the given pull request",
+        "operationId": "repoCancelScheduledAutoMerge",
+        "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
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}/requested_reviewers": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "create review requests for a pull request",
+        "operationId": "repoCreatePullReviewRequests",
+        "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
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/PullReviewRequestOptions"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/PullReviewList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "cancel review requests for a pull request",
+        "operationId": "repoDeletePullReviewRequests",
+        "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
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/PullReviewRequestOptions"
+            }
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}/reviews": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List all reviews for a pull request",
+        "operationId": "repoListPullReviews",
+        "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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullReviewList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Create a review to an pull request",
+        "operationId": "repoCreatePullReview",
+        "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
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/CreatePullReviewOptions"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullReview"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a specific review for a pull request",
+        "operationId": "repoGetPullReview",
+        "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
+          },
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "id of the review",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullReview"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Submit a pending review to an pull request",
+        "operationId": "repoSubmitPullReview",
+        "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
+          },
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "id of the review",
+            "name": "id",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/SubmitPullReviewOptions"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullReview"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a specific review from a pull request",
+        "operationId": "repoDeletePullReview",
+        "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
+          },
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "id of the review",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a specific review for a pull request",
+        "operationId": "repoGetPullReviewComments",
+        "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
+          },
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "id of the review",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullReviewCommentList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Dismiss a review for a pull request",
+        "operationId": "repoDismissPullReview",
+        "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
+          },
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "id of the review",
+            "name": "id",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/DismissPullReviewOptions"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullReview"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Cancel to dismiss a review for a pull request",
+        "operationId": "repoUnDismissPullReview",
+        "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
+          },
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "id of the review",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PullReview"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/pulls/{index}/update": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Merge PR's baseBranch into headBranch",
+        "operationId": "repoUpdatePullRequest",
+        "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
+          },
+          {
+            "enum": [
+              "merge",
+              "rebase"
+            ],
+            "type": "string",
+            "description": "how to update pull request",
+            "name": "style",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/push_mirrors": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get all push mirrors of the repository",
+        "operationId": "repoListPushMirrors",
+        "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 of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PushMirrorList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "add a push mirror to the repository",
+        "operationId": "repoAddPushMirror",
+        "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/CreatePushMirrorOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PushMirror"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/push_mirrors-sync": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Sync all push mirrored repository",
+        "operationId": "repoPushMirrorSync",
+        "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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/push_mirrors/{name}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get push mirror of the repository by remoteName",
+        "operationId": "repoGetPushMirrorByRemoteName",
+        "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": "remote name of push mirror",
+            "name": "name",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PushMirror"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "deletes a push mirror from a repository by remoteName",
+        "operationId": "repoDeletePushMirror",
+        "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": "remote name of the pushMirror",
+            "name": "name",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/raw/{filepath}": {
+      "get": {
+        "produces": [
+          "application/octet-stream"
+        ],
+        "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": "path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch",
+            "name": "filepath",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "The name of the commit/branch/tag. Default the repository’s default branch",
+            "name": "ref",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Returns raw file content.",
+            "schema": {
+              "type": "file"
+            }
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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": "boolean",
+            "description": "filter (exclude / include) drafts, if you dont have repo write access none will show",
+            "name": "draft",
+            "in": "query"
+          },
+          {
+            "type": "boolean",
+            "description": "filter (exclude / include) pre-releases",
+            "name": "pre-release",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ReleaseList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/releases/latest": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at",
+        "operationId": "repoGetLatestRelease",
+        "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/Release"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/releases/tags/{tag}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a release by tag name",
+        "operationId": "repoGetReleaseByTag",
+        "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": "tag name of the release to get",
+            "name": "tag",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Release"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a release by tag name",
+        "operationId": "repoDeleteReleaseByTag",
+        "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": "tag name of the release to delete",
+            "name": "tag",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "multipart/form-data",
+          "application/octet-stream"
+        ],
+        "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"
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Attachment"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/reviewers": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Return all users that can be requested to review in this repo",
+        "operationId": "repoGetReviewers",
+        "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/signing-key.gpg": {
+      "get": {
+        "produces": [
+          "text/plain"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get signing-key.gpg for given repository",
+        "operationId": "repoSigningKey",
+        "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": {
+            "description": "GPG armored public key",
+            "schema": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "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"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/CommitStatusList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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/CommitStatus"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "description": "User is not watching this repo or repo do not exist"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/tag_protections": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List tag protections for a repository",
+        "operationId": "repoListTagProtection",
+        "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/TagProtectionList"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Create a tag protections for a repository",
+        "operationId": "repoCreateTagProtection",
+        "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/CreateTagProtectionOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/TagProtection"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/tag_protections/{id}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a specific tag protection for the repository",
+        "operationId": "repoGetTagProtection",
+        "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": "id of the tag protect to get",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TagProtection"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a specific tag protection for the repository",
+        "operationId": "repoDeleteTagProtection",
+        "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": "id of protected tag",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "patch": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Edit a tag protections for a repository. Only fields that are set will be changed",
+        "operationId": "repoEditTagProtection",
+        "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": "id of protected tag",
+            "name": "id",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/EditTagProtectionOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TagProtection"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results, default maximum page size is 50",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TagList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Create a new git tag in a repository",
+        "operationId": "repoCreateTag",
+        "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/CreateTagOption"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Tag"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "405": {
+            "$ref": "#/responses/empty"
+          },
+          "409": {
+            "$ref": "#/responses/conflict"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/tags/{tag}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get the tag of a repository by tag name",
+        "operationId": "repoGetTag",
+        "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 tag",
+            "name": "tag",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Tag"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a repository's tag by name",
+        "operationId": "repoDeleteTag",
+        "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 tag to delete",
+            "name": "tag",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "405": {
+            "$ref": "#/responses/empty"
+          },
+          "409": {
+            "$ref": "#/responses/conflict"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/teams": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List a repository's teams",
+        "operationId": "repoListTeams",
+        "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/TeamList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/teams/{team}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Check if a team is assigned to a repository",
+        "operationId": "repoCheckTeam",
+        "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": "team name",
+            "name": "team",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Team"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "405": {
+            "$ref": "#/responses/error"
+          }
+        }
+      },
+      "put": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Add a team to a repository",
+        "operationId": "repoAddTeam",
+        "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": "team name",
+            "name": "team",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "405": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a team from a repository",
+        "operationId": "repoDeleteTeam",
+        "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": "team name",
+            "name": "team",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "405": {
+            "$ref": "#/responses/error"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "string",
+            "description": "optional filter by user (available for issue managers)",
+            "name": "user",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
+            "name": "before",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TrackedTimeList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/times/{user}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "List a user's tracked times in a repo",
+        "operationId": "userTrackedTimes",
+        "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": "string",
+            "description": "username of user",
+            "name": "user",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TrackedTimeList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TopicNames"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/invalidTopicsError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/topics/{topic}": {
+      "put": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Add a topic to a repository",
+        "operationId": "repoAddTopic",
+        "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/invalidTopicsError"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/invalidTopicsError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/transfer": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Transfer a repo ownership",
+        "operationId": "repoTransfer",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the repo to transfer",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repo to transfer",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "description": "Transfer Options",
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/TransferRepoOption"
+            }
+          }
+        ],
+        "responses": {
+          "202": {
+            "$ref": "#/responses/Repository"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/transfer/accept": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Accept a repo transfer",
+        "operationId": "acceptRepoTransfer",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the repo to transfer",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repo to transfer",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "202": {
+            "$ref": "#/responses/Repository"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/transfer/reject": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Reject a repo transfer",
+        "operationId": "rejectRepoTransfer",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "owner of the repo to transfer",
+            "name": "owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repo to transfer",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Repository"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/wiki/new": {
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Create a wiki page",
+        "operationId": "repoCreateWikiPage",
+        "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/CreateWikiPageOptions"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/WikiPage"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/wiki/page/{pageName}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get a wiki page",
+        "operationId": "repoGetWikiPage",
+        "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 page",
+            "name": "pageName",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/WikiPage"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "repository"
+        ],
+        "summary": "Delete a wiki page",
+        "operationId": "repoDeleteWikiPage",
+        "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 page",
+            "name": "pageName",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      },
+      "patch": {
+        "consumes": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Edit a wiki page",
+        "operationId": "repoEditWikiPage",
+        "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 page",
+            "name": "pageName",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/CreateWikiPageOptions"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/WikiPage"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "423": {
+            "$ref": "#/responses/repoArchivedError"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/wiki/pages": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get all wiki pages",
+        "operationId": "repoGetWikiPages",
+        "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 of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/WikiPageList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{owner}/{repo}/wiki/revisions/{pageName}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Get revisions of a wiki page",
+        "operationId": "repoGetWikiPageRevisions",
+        "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 page",
+            "name": "pageName",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/WikiCommitList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/repos/{template_owner}/{template_repo}/generate": {
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "repository"
+        ],
+        "summary": "Create a repository using a template",
+        "operationId": "generateRepo",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the template repository owner",
+            "name": "template_owner",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the template repository",
+            "name": "template_repo",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/GenerateRepoOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Repository"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "409": {
+            "description": "The repository with the same name already exists."
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/settings/api": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "settings"
+        ],
+        "summary": "Get instance's global settings for api",
+        "operationId": "getGeneralAPISettings",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/GeneralAPISettings"
+          }
+        }
+      }
+    },
+    "/settings/attachment": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "settings"
+        ],
+        "summary": "Get instance's global settings for Attachment",
+        "operationId": "getGeneralAttachmentSettings",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/GeneralAttachmentSettings"
+          }
+        }
+      }
+    },
+    "/settings/repository": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "settings"
+        ],
+        "summary": "Get instance's global settings for repositories",
+        "operationId": "getGeneralRepositorySettings",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/GeneralRepoSettings"
+          }
+        }
+      }
+    },
+    "/settings/ui": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "settings"
+        ],
+        "summary": "Get instance's global settings for ui",
+        "operationId": "getGeneralUISettings",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/GeneralUISettings"
+          }
+        }
+      }
+    },
+    "/signing-key.gpg": {
+      "get": {
+        "produces": [
+          "text/plain"
+        ],
+        "tags": [
+          "miscellaneous"
+        ],
+        "summary": "Get default signing-key.gpg",
+        "operationId": "getSigningKey",
+        "responses": {
+          "200": {
+            "description": "GPG armored public key",
+            "schema": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/teams/{id}/activities/feeds": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "List a team's activity feeds",
+        "operationId": "orgListTeamActivityFeeds",
+        "parameters": [
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "id of the team",
+            "name": "id",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "format": "date",
+            "description": "the date of the activities to be found",
+            "name": "date",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActivityFeedsList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RepositoryList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/teams/{id}/repos/{org}/{repo}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "List a particular repo of team",
+        "operationId": "orgListTeamRepo",
+        "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 list",
+            "name": "org",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the repo to list",
+            "name": "repo",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/Repository"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TopicListResponse"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Get the authenticated user",
+        "operationId": "userGetCurrent",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/User"
+          }
+        }
+      }
+    },
+    "/user/actions/runners/registration-token": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Get an user's actions runner registration token",
+        "operationId": "userGetRunnerRegistrationToken",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RegistrationToken"
+          }
+        }
+      }
+    },
+    "/user/actions/secrets/{secretname}": {
+      "put": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Create or Update a secret value in a user scope",
+        "operationId": "updateUserSecret",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the secret",
+            "name": "secretname",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/CreateOrUpdateSecretOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when creating a secret"
+          },
+          "204": {
+            "description": "response when updating a secret"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Delete a secret in a user scope",
+        "operationId": "deleteUserSecret",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the secret",
+            "name": "secretname",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "description": "delete one secret of the user"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/actions/variables": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Get the user-level list of variables which is created by current doer",
+        "operationId": "getUserVariablesList",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/VariableList"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/actions/variables/{variablename}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Get a user-level variable which is created by current doer",
+        "operationId": "getUserVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActionVariable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "put": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Update a user-level variable which is created by current doer",
+        "operationId": "updateUserVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/UpdateVariableOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when updating a variable"
+          },
+          "204": {
+            "description": "response when updating a variable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Create a user-level variable",
+        "operationId": "createUserVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/CreateVariableOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when creating a variable"
+          },
+          "204": {
+            "description": "response when creating a variable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Delete a user-level variable which is created by current doer",
+        "operationId": "deleteUserVariable",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "name of the variable",
+            "name": "variablename",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "response when deleting a variable"
+          },
+          "204": {
+            "description": "response when deleting a variable"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/applications/oauth2": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List the authenticated user's oauth2 applications",
+        "operationId": "userGetOauth2Application",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/OAuth2ApplicationList"
+          }
+        }
+      },
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "creates a new OAuth2 application",
+        "operationId": "userCreateOAuth2Application",
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/OAuth2Application"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          }
+        }
+      }
+    },
+    "/user/applications/oauth2/{id}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "get an OAuth2 Application",
+        "operationId": "userGetOAuth2Application",
+        "parameters": [
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "Application ID to be found",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/OAuth2Application"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "delete an OAuth2 Application",
+        "operationId": "userDeleteOAuth2Application",
+        "parameters": [
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "token to be deleted",
+            "name": "id",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "patch": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "update an OAuth2 Application, this includes regenerating the client secret",
+        "operationId": "userUpdateOAuth2Application",
+        "parameters": [
+          {
+            "type": "integer",
+            "format": "int64",
+            "description": "application to be updated",
+            "name": "id",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/OAuth2Application"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/avatar": {
+      "post": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Update Avatar",
+        "operationId": "userUpdateAvatar",
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/UpdateUserAvatarOption"
+            }
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          }
+        }
+      },
+      "delete": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Delete Avatar",
+        "operationId": "userDeleteAvatar",
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          }
+        }
+      }
+    },
+    "/user/blocks": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List users blocked by the authenticated user",
+        "operationId": "userListBlocks",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          }
+        }
+      }
+    },
+    "/user/blocks/{username}": {
+      "get": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Check if a user is blocked by the authenticated user",
+        "operationId": "userCheckUserBlock",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "user to check",
+            "name": "username",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "put": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Block a user",
+        "operationId": "userBlockUser",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "user to block",
+            "name": "username",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "optional note for the block",
+            "name": "note",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Unblock a user",
+        "operationId": "userUnblockUser",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "user to unblock",
+            "name": "username",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/followers": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List the authenticated user's followers",
+        "operationId": "userCurrentListFollowers",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "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",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/gpg_key_token": {
+      "get": {
+        "produces": [
+          "text/plain"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Get a Token to verify",
+        "operationId": "getVerificationToken",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/string"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/gpg_key_verify": {
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Verify a GPG key",
+        "operationId": "userVerifyGPGKey",
+        "responses": {
+          "201": {
+            "$ref": "#/responses/GPGKey"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/user/gpg_keys": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List the authenticated user's GPG keys",
+        "operationId": "userCurrentListGPGKeys",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/hooks": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List the authenticated user's webhooks",
+        "operationId": "userListHooks",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/HookList"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Create a hook",
+        "operationId": "userCreateHook",
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/CreateHookOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/Hook"
+          }
+        }
+      }
+    },
+    "/user/hooks/{id}": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Get a hook",
+        "operationId": "userGetHook",
+        "parameters": [
+          {
+            "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": [
+          "user"
+        ],
+        "summary": "Delete a hook",
+        "operationId": "userDeleteHook",
+        "parameters": [
+          {
+            "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": [
+          "user"
+        ],
+        "summary": "Update a hook",
+        "operationId": "userEditHook",
+        "parameters": [
+          {
+            "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"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "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",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/OrganizationList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/repos": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List the repos that the authenticated user owns",
+        "operationId": "userCurrentListRepos",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "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"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "409": {
+            "description": "The repository with the same name already exists."
+          },
+          "422": {
+            "$ref": "#/responses/validationError"
+          }
+        }
+      }
+    },
+    "/user/settings": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Get user settings",
+        "operationId": "getUserSettings",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserSettings"
+          }
+        }
+      },
+      "patch": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Update user settings",
+        "operationId": "updateUserSettings",
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/UserSettingsOptions"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserSettings"
+          }
+        }
+      }
+    },
+    "/user/starred": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "The repos that the authenticated user has starred",
+        "operationId": "userCurrentListStarred",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "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"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      },
+      "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"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/user/stopwatches": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Get list of all existing stopwatches",
+        "operationId": "userGetStopWatches",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/StopWatchList"
+          }
+        }
+      }
+    },
+    "/user/subscriptions": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List repositories watched by the authenticated user",
+        "operationId": "userCurrentListSubscriptions",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RepositoryList"
+          }
+        }
+      }
+    },
+    "/user/teams": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List all the teams a user belongs to",
+        "operationId": "userListTeams",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/TeamList"
+          }
+        }
+      }
+    },
+    "/user/times": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List the current user's tracked times",
+        "operationId": "userCurrentTrackedTimes",
+        "parameters": [
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
+            "name": "since",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date-time",
+            "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
+            "name": "before",
+            "in": "query"
+          }
+        ],
+        "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": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "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/{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}/activities/feeds": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "List a user's activity feeds",
+        "operationId": "userListActivityFeeds",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "username of user",
+            "name": "username",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "boolean",
+            "description": "if true, only show actions performed by the requested user",
+            "name": "only-performed-by",
+            "in": "query"
+          },
+          {
+            "type": "string",
+            "format": "date",
+            "description": "the date of the activities to be found",
+            "name": "date",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/ActivityFeedsList"
+          },
+          "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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/UserList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/users/{username}/following/{target}": {
+      "get": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Check if one user is following another user",
+        "operationId": "userCheckFollowing",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "username of following user",
+            "name": "username",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "username of followed user",
+            "name": "target",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/GPGKeyList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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"
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/PublicKeyList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/OrganizationList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/users/{username}/orgs/{org}/permissions": {
+      "get": {
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "organization"
+        ],
+        "summary": "Get user permissions in organization",
+        "operationId": "orgGetUserPermissions",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "username of user",
+            "name": "username",
+            "in": "path",
+            "required": true
+          },
+          {
+            "type": "string",
+            "description": "name of the organization",
+            "name": "org",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/OrganizationPermissions"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RepositoryList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RepositoryList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/RepositoryList"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          }
+        }
+      }
+    },
+    "/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
+          },
+          {
+            "type": "integer",
+            "description": "page number of results to return (1-based)",
+            "name": "page",
+            "in": "query"
+          },
+          {
+            "type": "integer",
+            "description": "page size of results",
+            "name": "limit",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "$ref": "#/responses/AccessTokenList"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          }
+        }
+      },
+      "post": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "tags": [
+          "user"
+        ],
+        "summary": "Create an access token",
+        "operationId": "userCreateToken",
+        "parameters": [
+          {
+            "type": "string",
+            "description": "username of user",
+            "name": "username",
+            "in": "path",
+            "required": true
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "schema": {
+              "$ref": "#/definitions/CreateAccessTokenOption"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "$ref": "#/responses/AccessToken"
+          },
+          "400": {
+            "$ref": "#/responses/error"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          }
+        }
+      }
+    },
+    "/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": "string",
+            "description": "token to be deleted, identified by ID and if not available by name",
+            "name": "token",
+            "in": "path",
+            "required": true
+          }
+        ],
+        "responses": {
+          "204": {
+            "$ref": "#/responses/empty"
+          },
+          "403": {
+            "$ref": "#/responses/forbidden"
+          },
+          "404": {
+            "$ref": "#/responses/notFound"
+          },
+          "422": {
+            "$ref": "#/responses/error"
+          }
+        }
+      }
+    },
+    "/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"
+        },
+        "scopes": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Scopes"
+        },
+        "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"
+    },
+    "ActionTask": {
+      "description": "ActionTask represents a ActionTask",
+      "type": "object",
+      "properties": {
+        "created_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "CreatedAt"
+        },
+        "display_title": {
+          "type": "string",
+          "x-go-name": "DisplayTitle"
+        },
+        "event": {
+          "type": "string",
+          "x-go-name": "Event"
+        },
+        "head_branch": {
+          "type": "string",
+          "x-go-name": "HeadBranch"
+        },
+        "head_sha": {
+          "type": "string",
+          "x-go-name": "HeadSHA"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "run_number": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "RunNumber"
+        },
+        "run_started_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "RunStartedAt"
+        },
+        "status": {
+          "type": "string",
+          "x-go-name": "Status"
+        },
+        "updated_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "UpdatedAt"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        },
+        "workflow_id": {
+          "type": "string",
+          "x-go-name": "WorkflowID"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "ActionTaskResponse": {
+      "description": "ActionTaskResponse returns a ActionTask",
+      "type": "object",
+      "properties": {
+        "total_count": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "TotalCount"
+        },
+        "workflow_runs": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ActionTask"
+          },
+          "x-go-name": "Entries"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "ActionVariable": {
+      "description": "ActionVariable return value of the query API",
+      "type": "object",
+      "properties": {
+        "data": {
+          "description": "the value of the variable",
+          "type": "string",
+          "x-go-name": "Data"
+        },
+        "name": {
+          "description": "the name of the variable",
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "owner_id": {
+          "description": "the owner to which the variable belongs",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "OwnerID"
+        },
+        "repo_id": {
+          "description": "the repository to which the variable belongs",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "RepoID"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "Activity": {
+      "type": "object",
+      "properties": {
+        "act_user": {
+          "$ref": "#/definitions/User"
+        },
+        "act_user_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ActUserID"
+        },
+        "comment": {
+          "$ref": "#/definitions/Comment"
+        },
+        "comment_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "CommentID"
+        },
+        "content": {
+          "type": "string",
+          "x-go-name": "Content"
+        },
+        "created": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "is_private": {
+          "type": "boolean",
+          "x-go-name": "IsPrivate"
+        },
+        "op_type": {
+          "description": "the type of action",
+          "type": "string",
+          "enum": [
+            "create_repo",
+            "rename_repo",
+            "star_repo",
+            "watch_repo",
+            "commit_repo",
+            "create_issue",
+            "create_pull_request",
+            "transfer_repo",
+            "push_tag",
+            "comment_issue",
+            "merge_pull_request",
+            "close_issue",
+            "reopen_issue",
+            "close_pull_request",
+            "reopen_pull_request",
+            "delete_tag",
+            "delete_branch",
+            "mirror_sync_push",
+            "mirror_sync_create",
+            "mirror_sync_delete",
+            "approve_pull_request",
+            "reject_pull_request",
+            "comment_pull",
+            "publish_release",
+            "pull_review_dismissed",
+            "pull_request_ready_for_review",
+            "auto_merge_pull_request"
+          ],
+          "x-go-name": "OpType"
+        },
+        "ref_name": {
+          "type": "string",
+          "x-go-name": "RefName"
+        },
+        "repo": {
+          "$ref": "#/definitions/Repository"
+        },
+        "repo_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "RepoID"
+        },
+        "user_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "UserID"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "ActivityPub": {
+      "description": "ActivityPub type",
+      "type": "object",
+      "properties": {
+        "@context": {
+          "type": "string",
+          "x-go-name": "Context"
+        }
+      },
+      "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",
+          "enum": [
+            "read",
+            "write",
+            "admin"
+          ],
+          "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": {
+        "created": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "time": {
+          "description": "time in seconds",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Time"
+        },
+        "user_name": {
+          "description": "User who spent the time (optional)",
+          "type": "string",
+          "x-go-name": "User"
+        }
+      },
+      "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"
+    },
+    "Badge": {
+      "description": "Badge represents a user badge",
+      "type": "object",
+      "properties": {
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "image_url": {
+          "type": "string",
+          "x-go-name": "ImageURL"
+        },
+        "slug": {
+          "type": "string",
+          "x-go-name": "Slug"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "Branch": {
+      "description": "Branch represents a repository branch",
+      "type": "object",
+      "properties": {
+        "commit": {
+          "$ref": "#/definitions/PayloadCommit"
+        },
+        "effective_branch_protection_name": {
+          "type": "string",
+          "x-go-name": "EffectiveBranchProtectionName"
+        },
+        "enable_status_check": {
+          "type": "boolean",
+          "x-go-name": "EnableStatusCheck"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "protected": {
+          "type": "boolean",
+          "x-go-name": "Protected"
+        },
+        "required_approvals": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "RequiredApprovals"
+        },
+        "status_check_contexts": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "StatusCheckContexts"
+        },
+        "user_can_merge": {
+          "type": "boolean",
+          "x-go-name": "UserCanMerge"
+        },
+        "user_can_push": {
+          "type": "boolean",
+          "x-go-name": "UserCanPush"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "BranchProtection": {
+      "description": "BranchProtection represents a branch protection for a repository",
+      "type": "object",
+      "properties": {
+        "approvals_whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ApprovalsWhitelistTeams"
+        },
+        "approvals_whitelist_username": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ApprovalsWhitelistUsernames"
+        },
+        "block_admin_merge_override": {
+          "type": "boolean",
+          "x-go-name": "BlockAdminMergeOverride"
+        },
+        "block_on_official_review_requests": {
+          "type": "boolean",
+          "x-go-name": "BlockOnOfficialReviewRequests"
+        },
+        "block_on_outdated_branch": {
+          "type": "boolean",
+          "x-go-name": "BlockOnOutdatedBranch"
+        },
+        "block_on_rejected_reviews": {
+          "type": "boolean",
+          "x-go-name": "BlockOnRejectedReviews"
+        },
+        "branch_name": {
+          "description": "Deprecated: true",
+          "type": "string",
+          "x-go-name": "BranchName"
+        },
+        "created_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "dismiss_stale_approvals": {
+          "type": "boolean",
+          "x-go-name": "DismissStaleApprovals"
+        },
+        "enable_approvals_whitelist": {
+          "type": "boolean",
+          "x-go-name": "EnableApprovalsWhitelist"
+        },
+        "enable_force_push": {
+          "type": "boolean",
+          "x-go-name": "EnableForcePush"
+        },
+        "enable_force_push_allowlist": {
+          "type": "boolean",
+          "x-go-name": "EnableForcePushAllowlist"
+        },
+        "enable_merge_whitelist": {
+          "type": "boolean",
+          "x-go-name": "EnableMergeWhitelist"
+        },
+        "enable_push": {
+          "type": "boolean",
+          "x-go-name": "EnablePush"
+        },
+        "enable_push_whitelist": {
+          "type": "boolean",
+          "x-go-name": "EnablePushWhitelist"
+        },
+        "enable_status_check": {
+          "type": "boolean",
+          "x-go-name": "EnableStatusCheck"
+        },
+        "force_push_allowlist_deploy_keys": {
+          "type": "boolean",
+          "x-go-name": "ForcePushAllowlistDeployKeys"
+        },
+        "force_push_allowlist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ForcePushAllowlistTeams"
+        },
+        "force_push_allowlist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ForcePushAllowlistUsernames"
+        },
+        "ignore_stale_approvals": {
+          "type": "boolean",
+          "x-go-name": "IgnoreStaleApprovals"
+        },
+        "merge_whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "MergeWhitelistTeams"
+        },
+        "merge_whitelist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "MergeWhitelistUsernames"
+        },
+        "priority": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Priority"
+        },
+        "protected_file_patterns": {
+          "type": "string",
+          "x-go-name": "ProtectedFilePatterns"
+        },
+        "push_whitelist_deploy_keys": {
+          "type": "boolean",
+          "x-go-name": "PushWhitelistDeployKeys"
+        },
+        "push_whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "PushWhitelistTeams"
+        },
+        "push_whitelist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "PushWhitelistUsernames"
+        },
+        "require_signed_commits": {
+          "type": "boolean",
+          "x-go-name": "RequireSignedCommits"
+        },
+        "required_approvals": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "RequiredApprovals"
+        },
+        "rule_name": {
+          "type": "string",
+          "x-go-name": "RuleName"
+        },
+        "status_check_contexts": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "StatusCheckContexts"
+        },
+        "unprotected_file_patterns": {
+          "type": "string",
+          "x-go-name": "UnprotectedFilePatterns"
+        },
+        "updated_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Updated"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "ChangeFileOperation": {
+      "description": "ChangeFileOperation for creating, updating or deleting a file",
+      "type": "object",
+      "required": [
+        "operation",
+        "path"
+      ],
+      "properties": {
+        "content": {
+          "description": "new or updated file content, must be base64 encoded",
+          "type": "string",
+          "x-go-name": "ContentBase64"
+        },
+        "from_path": {
+          "description": "old path of the file to move",
+          "type": "string",
+          "x-go-name": "FromPath"
+        },
+        "operation": {
+          "description": "indicates what to do with the file",
+          "type": "string",
+          "enum": [
+            "create",
+            "update",
+            "delete"
+          ],
+          "x-go-name": "Operation"
+        },
+        "path": {
+          "description": "path to the existing or new file",
+          "type": "string",
+          "x-go-name": "Path"
+        },
+        "sha": {
+          "description": "sha is the SHA for the file that already exists, required for update or delete",
+          "type": "string",
+          "x-go-name": "SHA"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "ChangeFilesOptions": {
+      "description": "ChangeFilesOptions options for creating, updating or deleting multiple 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": [
+        "files"
+      ],
+      "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"
+        },
+        "dates": {
+          "$ref": "#/definitions/CommitDateOptions"
+        },
+        "files": {
+          "description": "list of file operations",
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ChangeFileOperation"
+          },
+          "x-go-name": "Files"
+        },
+        "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"
+        },
+        "signoff": {
+          "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.",
+          "type": "boolean",
+          "x-go-name": "Signoff"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "ChangedFile": {
+      "description": "ChangedFile store information about files affected by the pull request",
+      "type": "object",
+      "properties": {
+        "additions": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Additions"
+        },
+        "changes": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Changes"
+        },
+        "contents_url": {
+          "type": "string",
+          "x-go-name": "ContentsURL"
+        },
+        "deletions": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Deletions"
+        },
+        "filename": {
+          "type": "string",
+          "x-go-name": "Filename"
+        },
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "previous_filename": {
+          "type": "string",
+          "x-go-name": "PreviousFilename"
+        },
+        "raw_url": {
+          "type": "string",
+          "x-go-name": "RawURL"
+        },
+        "status": {
+          "type": "string",
+          "x-go-name": "Status"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CombinedStatus": {
+      "description": "CombinedStatus holds the combined state of several statuses for a single commit",
+      "type": "object",
+      "properties": {
+        "commit_url": {
+          "type": "string",
+          "x-go-name": "CommitURL"
+        },
+        "repository": {
+          "$ref": "#/definitions/Repository"
+        },
+        "sha": {
+          "type": "string",
+          "x-go-name": "SHA"
+        },
+        "state": {
+          "$ref": "#/definitions/CommitStatusState"
+        },
+        "statuses": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/CommitStatus"
+          },
+          "x-go-name": "Statuses"
+        },
+        "total_count": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "TotalCount"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "Comment": {
+      "description": "Comment represents a comment on a commit or issue",
+      "type": "object",
+      "properties": {
+        "assets": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/Attachment"
+          },
+          "x-go-name": "Attachments"
+        },
+        "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"
+        },
+        "created": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "files": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/CommitAffectedFiles"
+          },
+          "x-go-name": "Files"
+        },
+        "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"
+        },
+        "stats": {
+          "$ref": "#/definitions/CommitStats"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CommitAffectedFiles": {
+      "description": "CommitAffectedFiles store information about files affected by the commit",
+      "type": "object",
+      "properties": {
+        "filename": {
+          "type": "string",
+          "x-go-name": "Filename"
+        },
+        "status": {
+          "type": "string",
+          "x-go-name": "Status"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CommitDateOptions": {
+      "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE",
+      "type": "object",
+      "properties": {
+        "author": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Author"
+        },
+        "committer": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Committer"
+        }
+      },
+      "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": {
+        "created": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "sha": {
+          "type": "string",
+          "x-go-name": "SHA"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CommitStats": {
+      "description": "CommitStats is statistics for a RepoCommit",
+      "type": "object",
+      "properties": {
+        "additions": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Additions"
+        },
+        "deletions": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Deletions"
+        },
+        "total": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Total"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CommitStatus": {
+      "description": "CommitStatus 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/CommitStatusState"
+        },
+        "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"
+    },
+    "CommitStatusState": {
+      "description": "CommitStatusState holds the state of a CommitStatus\nIt can be \"pending\", \"success\", \"error\" and \"failure\"",
+      "type": "string",
+      "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"
+    },
+    "Compare": {
+      "type": "object",
+      "title": "Compare represents a comparison between two commits.",
+      "properties": {
+        "commits": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/Commit"
+          },
+          "x-go-name": "Commits"
+        },
+        "total_commits": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "TotalCommits"
+        }
+      },
+      "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"
+        },
+        "last_commit_sha": {
+          "type": "string",
+          "x-go-name": "LastCommitSHA"
+        },
+        "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"
+    },
+    "CreateAccessTokenOption": {
+      "description": "CreateAccessTokenOption options when create access token",
+      "type": "object",
+      "required": [
+        "name"
+      ],
+      "properties": {
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "scopes": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Scopes"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateBranchProtectionOption": {
+      "description": "CreateBranchProtectionOption options for creating a branch protection",
+      "type": "object",
+      "properties": {
+        "approvals_whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ApprovalsWhitelistTeams"
+        },
+        "approvals_whitelist_username": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ApprovalsWhitelistUsernames"
+        },
+        "block_admin_merge_override": {
+          "type": "boolean",
+          "x-go-name": "BlockAdminMergeOverride"
+        },
+        "block_on_official_review_requests": {
+          "type": "boolean",
+          "x-go-name": "BlockOnOfficialReviewRequests"
+        },
+        "block_on_outdated_branch": {
+          "type": "boolean",
+          "x-go-name": "BlockOnOutdatedBranch"
+        },
+        "block_on_rejected_reviews": {
+          "type": "boolean",
+          "x-go-name": "BlockOnRejectedReviews"
+        },
+        "branch_name": {
+          "description": "Deprecated: true",
+          "type": "string",
+          "x-go-name": "BranchName"
+        },
+        "dismiss_stale_approvals": {
+          "type": "boolean",
+          "x-go-name": "DismissStaleApprovals"
+        },
+        "enable_approvals_whitelist": {
+          "type": "boolean",
+          "x-go-name": "EnableApprovalsWhitelist"
+        },
+        "enable_force_push": {
+          "type": "boolean",
+          "x-go-name": "EnableForcePush"
+        },
+        "enable_force_push_allowlist": {
+          "type": "boolean",
+          "x-go-name": "EnableForcePushAllowlist"
+        },
+        "enable_merge_whitelist": {
+          "type": "boolean",
+          "x-go-name": "EnableMergeWhitelist"
+        },
+        "enable_push": {
+          "type": "boolean",
+          "x-go-name": "EnablePush"
+        },
+        "enable_push_whitelist": {
+          "type": "boolean",
+          "x-go-name": "EnablePushWhitelist"
+        },
+        "enable_status_check": {
+          "type": "boolean",
+          "x-go-name": "EnableStatusCheck"
+        },
+        "force_push_allowlist_deploy_keys": {
+          "type": "boolean",
+          "x-go-name": "ForcePushAllowlistDeployKeys"
+        },
+        "force_push_allowlist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ForcePushAllowlistTeams"
+        },
+        "force_push_allowlist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ForcePushAllowlistUsernames"
+        },
+        "ignore_stale_approvals": {
+          "type": "boolean",
+          "x-go-name": "IgnoreStaleApprovals"
+        },
+        "merge_whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "MergeWhitelistTeams"
+        },
+        "merge_whitelist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "MergeWhitelistUsernames"
+        },
+        "priority": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Priority"
+        },
+        "protected_file_patterns": {
+          "type": "string",
+          "x-go-name": "ProtectedFilePatterns"
+        },
+        "push_whitelist_deploy_keys": {
+          "type": "boolean",
+          "x-go-name": "PushWhitelistDeployKeys"
+        },
+        "push_whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "PushWhitelistTeams"
+        },
+        "push_whitelist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "PushWhitelistUsernames"
+        },
+        "require_signed_commits": {
+          "type": "boolean",
+          "x-go-name": "RequireSignedCommits"
+        },
+        "required_approvals": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "RequiredApprovals"
+        },
+        "rule_name": {
+          "type": "string",
+          "x-go-name": "RuleName"
+        },
+        "status_check_contexts": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "StatusCheckContexts"
+        },
+        "unprotected_file_patterns": {
+          "type": "string",
+          "x-go-name": "UnprotectedFilePatterns"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateBranchRepoOption": {
+      "description": "CreateBranchRepoOption options when creating a branch in a repository",
+      "type": "object",
+      "required": [
+        "new_branch_name"
+      ],
+      "properties": {
+        "new_branch_name": {
+          "description": "Name of the branch to create",
+          "type": "string",
+          "uniqueItems": true,
+          "x-go-name": "BranchName"
+        },
+        "old_branch_name": {
+          "description": "Deprecated: true\nName of the old branch to create from",
+          "type": "string",
+          "uniqueItems": true,
+          "x-go-name": "OldBranchName"
+        },
+        "old_ref_name": {
+          "description": "Name of the old branch/tag/commit to create from",
+          "type": "string",
+          "uniqueItems": true,
+          "x-go-name": "OldRefName"
+        }
+      },
+      "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": "ContentBase64"
+        },
+        "dates": {
+          "$ref": "#/definitions/CommitDateOptions"
+        },
+        "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"
+        },
+        "signoff": {
+          "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.",
+          "type": "boolean",
+          "x-go-name": "Signoff"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateForkOption": {
+      "description": "CreateForkOption options for creating a fork",
+      "type": "object",
+      "properties": {
+        "name": {
+          "description": "name of the forked repository",
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "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"
+        },
+        "armored_signature": {
+          "type": "string",
+          "x-go-name": "Signature"
+        }
+      },
+      "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"
+        },
+        "authorization_header": {
+          "type": "string",
+          "x-go-name": "AuthorizationHeader"
+        },
+        "branch_filter": {
+          "type": "string",
+          "x-go-name": "BranchFilter"
+        },
+        "config": {
+          "$ref": "#/definitions/CreateHookOptionConfig"
+        },
+        "events": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Events"
+        },
+        "type": {
+          "type": "string",
+          "enum": [
+            "dingtalk",
+            "discord",
+            "gitea",
+            "gogs",
+            "msteams",
+            "slack",
+            "telegram",
+            "feishu",
+            "wechatwork",
+            "packagist"
+          ],
+          "x-go-name": "Type"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateHookOptionConfig": {
+      "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required",
+      "type": "object",
+      "additionalProperties": {
+        "type": "string"
+      },
+      "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": "deprecated",
+          "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"
+        },
+        "ref": {
+          "type": "string",
+          "x-go-name": "Ref"
+        },
+        "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"
+        },
+        "exclusive": {
+          "type": "boolean",
+          "x-go-name": "Exclusive",
+          "example": false
+        },
+        "is_archived": {
+          "type": "boolean",
+          "x-go-name": "IsArchived",
+          "example": false
+        },
+        "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"
+        },
+        "state": {
+          "type": "string",
+          "enum": [
+            "open",
+            "closed"
+          ],
+          "x-go-name": "State"
+        },
+        "title": {
+          "type": "string",
+          "x-go-name": "Title"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateOAuth2ApplicationOptions": {
+      "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application",
+      "type": "object",
+      "properties": {
+        "confidential_client": {
+          "type": "boolean",
+          "x-go-name": "ConfidentialClient"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "redirect_uris": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "RedirectURIs"
+        },
+        "skip_secondary_authorization": {
+          "type": "boolean",
+          "x-go-name": "SkipSecondaryAuthorization"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateOrUpdateSecretOption": {
+      "description": "CreateOrUpdateSecretOption options when creating or updating secret",
+      "type": "object",
+      "required": [
+        "data"
+      ],
+      "properties": {
+        "data": {
+          "description": "Data of the secret to update",
+          "type": "string",
+          "x-go-name": "Data"
+        }
+      },
+      "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"
+        },
+        "email": {
+          "type": "string",
+          "x-go-name": "Email"
+        },
+        "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"
+        },
+        "reviewers": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Reviewers"
+        },
+        "team_reviewers": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "TeamReviewers"
+        },
+        "title": {
+          "type": "string",
+          "x-go-name": "Title"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreatePullReviewComment": {
+      "description": "CreatePullReviewComment represent a review comment for creation api",
+      "type": "object",
+      "properties": {
+        "body": {
+          "type": "string",
+          "x-go-name": "Body"
+        },
+        "new_position": {
+          "description": "if comment to new file line or 0",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "NewLineNum"
+        },
+        "old_position": {
+          "description": "if comment to old file line or 0",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "OldLineNum"
+        },
+        "path": {
+          "description": "the tree path",
+          "type": "string",
+          "x-go-name": "Path"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreatePullReviewOptions": {
+      "description": "CreatePullReviewOptions are options to create a pull review",
+      "type": "object",
+      "properties": {
+        "body": {
+          "type": "string",
+          "x-go-name": "Body"
+        },
+        "comments": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/CreatePullReviewComment"
+          },
+          "x-go-name": "Comments"
+        },
+        "commit_id": {
+          "type": "string",
+          "x-go-name": "CommitID"
+        },
+        "event": {
+          "$ref": "#/definitions/ReviewStateType"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreatePushMirrorOption": {
+      "type": "object",
+      "title": "CreatePushMirrorOption represents need information to create a push mirror of a repository.",
+      "properties": {
+        "interval": {
+          "type": "string",
+          "x-go-name": "Interval"
+        },
+        "remote_address": {
+          "type": "string",
+          "x-go-name": "RemoteAddress"
+        },
+        "remote_password": {
+          "type": "string",
+          "x-go-name": "RemotePassword"
+        },
+        "remote_username": {
+          "type": "string",
+          "x-go-name": "RemoteUsername"
+        },
+        "sync_on_commit": {
+          "type": "boolean",
+          "x-go-name": "SyncOnCommit"
+        }
+      },
+      "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-initialized?",
+          "type": "boolean",
+          "x-go-name": "AutoInit"
+        },
+        "default_branch": {
+          "description": "DefaultBranch of the repository (used when initializes and in template)",
+          "type": "string",
+          "x-go-name": "DefaultBranch"
+        },
+        "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": "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"
+        },
+        "object_format_name": {
+          "description": "ObjectFormatName of the underlying git repository",
+          "type": "string",
+          "enum": [
+            "sha1",
+            "sha256"
+          ],
+          "x-go-name": "ObjectFormatName"
+        },
+        "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"
+        },
+        "template": {
+          "description": "Whether the repository is template",
+          "type": "boolean",
+          "x-go-name": "Template"
+        },
+        "trust_model": {
+          "description": "TrustModel of the repository",
+          "type": "string",
+          "enum": [
+            "default",
+            "collaborator",
+            "committer",
+            "collaboratorcommitter"
+          ],
+          "x-go-name": "TrustModel"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateStatusOption": {
+      "description": "CreateStatusOption holds the information needed to create a new CommitStatus for a Commit",
+      "type": "object",
+      "properties": {
+        "context": {
+          "type": "string",
+          "x-go-name": "Context"
+        },
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "state": {
+          "$ref": "#/definitions/CommitStatusState"
+        },
+        "target_url": {
+          "type": "string",
+          "x-go-name": "TargetURL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateTagOption": {
+      "description": "CreateTagOption options when creating a tag",
+      "type": "object",
+      "required": [
+        "tag_name"
+      ],
+      "properties": {
+        "message": {
+          "type": "string",
+          "x-go-name": "Message"
+        },
+        "tag_name": {
+          "type": "string",
+          "x-go-name": "TagName"
+        },
+        "target": {
+          "type": "string",
+          "x-go-name": "Target"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateTagProtectionOption": {
+      "description": "CreateTagProtectionOption options for creating a tag protection",
+      "type": "object",
+      "properties": {
+        "name_pattern": {
+          "type": "string",
+          "x-go-name": "NamePattern"
+        },
+        "whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "WhitelistTeams"
+        },
+        "whitelist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "WhitelistUsernames"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateTeamOption": {
+      "description": "CreateTeamOption options for creating a team",
+      "type": "object",
+      "required": [
+        "name"
+      ],
+      "properties": {
+        "can_create_org_repo": {
+          "type": "boolean",
+          "x-go-name": "CanCreateOrgRepo"
+        },
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "includes_all_repositories": {
+          "type": "boolean",
+          "x-go-name": "IncludesAllRepositories"
+        },
+        "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.actions",
+            "repo.code",
+            "repo.issues",
+            "repo.ext_issues",
+            "repo.wiki",
+            "repo.ext_wiki",
+            "repo.pulls",
+            "repo.releases",
+            "repo.projects",
+            "repo.ext_wiki"
+          ]
+        },
+        "units_map": {
+          "type": "object",
+          "additionalProperties": {
+            "type": "string"
+          },
+          "x-go-name": "UnitsMap",
+          "example": "{\"repo.actions\",\"repo.packages\",\"repo.code\":\"read\",\"repo.issues\":\"write\",\"repo.ext_issues\":\"none\",\"repo.wiki\":\"admin\",\"repo.pulls\":\"owner\",\"repo.releases\":\"none\",\"repo.projects\":\"none\",\"repo.ext_wiki\":\"none\"}"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateUserOption": {
+      "description": "CreateUserOption create user options",
+      "type": "object",
+      "required": [
+        "username",
+        "email"
+      ],
+      "properties": {
+        "created_at": {
+          "description": "For explicitly setting the user creation timestamp. Useful when users are\nmigrated from other systems. When omitted, the user's creation timestamp\nwill be set to \"now\".",
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "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"
+        },
+        "restricted": {
+          "type": "boolean",
+          "x-go-name": "Restricted"
+        },
+        "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"
+        },
+        "visibility": {
+          "type": "string",
+          "x-go-name": "Visibility"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateVariableOption": {
+      "description": "CreateVariableOption the option when creating variable",
+      "type": "object",
+      "required": [
+        "value"
+      ],
+      "properties": {
+        "value": {
+          "description": "Value of the variable to create",
+          "type": "string",
+          "x-go-name": "Value"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "CreateWikiPageOptions": {
+      "description": "CreateWikiPageOptions form for creating wiki",
+      "type": "object",
+      "properties": {
+        "content_base64": {
+          "description": "content must be base64 encoded",
+          "type": "string",
+          "x-go-name": "ContentBase64"
+        },
+        "message": {
+          "description": "optional commit message summarizing the change",
+          "type": "string",
+          "x-go-name": "Message"
+        },
+        "title": {
+          "description": "page title. leave empty to keep unchanged",
+          "type": "string",
+          "x-go-name": "Title"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "Cron": {
+      "description": "Cron represents a Cron task",
+      "type": "object",
+      "properties": {
+        "exec_times": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ExecTimes"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "next": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Next"
+        },
+        "prev": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Prev"
+        },
+        "schedule": {
+          "type": "string",
+          "x-go-name": "Schedule"
+        }
+      },
+      "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"
+        },
+        "dates": {
+          "$ref": "#/definitions/CommitDateOptions"
+        },
+        "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"
+        },
+        "signoff": {
+          "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.",
+          "type": "boolean",
+          "x-go-name": "Signoff"
+        }
+      },
+      "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"
+    },
+    "DismissPullReviewOptions": {
+      "description": "DismissPullReviewOptions are options to dismiss a pull review",
+      "type": "object",
+      "properties": {
+        "message": {
+          "type": "string",
+          "x-go-name": "Message"
+        },
+        "priors": {
+          "type": "boolean",
+          "x-go-name": "Priors"
+        }
+      },
+      "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"
+    },
+    "EditBranchProtectionOption": {
+      "description": "EditBranchProtectionOption options for editing a branch protection",
+      "type": "object",
+      "properties": {
+        "approvals_whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ApprovalsWhitelistTeams"
+        },
+        "approvals_whitelist_username": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ApprovalsWhitelistUsernames"
+        },
+        "block_admin_merge_override": {
+          "type": "boolean",
+          "x-go-name": "BlockAdminMergeOverride"
+        },
+        "block_on_official_review_requests": {
+          "type": "boolean",
+          "x-go-name": "BlockOnOfficialReviewRequests"
+        },
+        "block_on_outdated_branch": {
+          "type": "boolean",
+          "x-go-name": "BlockOnOutdatedBranch"
+        },
+        "block_on_rejected_reviews": {
+          "type": "boolean",
+          "x-go-name": "BlockOnRejectedReviews"
+        },
+        "dismiss_stale_approvals": {
+          "type": "boolean",
+          "x-go-name": "DismissStaleApprovals"
+        },
+        "enable_approvals_whitelist": {
+          "type": "boolean",
+          "x-go-name": "EnableApprovalsWhitelist"
+        },
+        "enable_force_push": {
+          "type": "boolean",
+          "x-go-name": "EnableForcePush"
+        },
+        "enable_force_push_allowlist": {
+          "type": "boolean",
+          "x-go-name": "EnableForcePushAllowlist"
+        },
+        "enable_merge_whitelist": {
+          "type": "boolean",
+          "x-go-name": "EnableMergeWhitelist"
+        },
+        "enable_push": {
+          "type": "boolean",
+          "x-go-name": "EnablePush"
+        },
+        "enable_push_whitelist": {
+          "type": "boolean",
+          "x-go-name": "EnablePushWhitelist"
+        },
+        "enable_status_check": {
+          "type": "boolean",
+          "x-go-name": "EnableStatusCheck"
+        },
+        "force_push_allowlist_deploy_keys": {
+          "type": "boolean",
+          "x-go-name": "ForcePushAllowlistDeployKeys"
+        },
+        "force_push_allowlist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ForcePushAllowlistTeams"
+        },
+        "force_push_allowlist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "ForcePushAllowlistUsernames"
+        },
+        "ignore_stale_approvals": {
+          "type": "boolean",
+          "x-go-name": "IgnoreStaleApprovals"
+        },
+        "merge_whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "MergeWhitelistTeams"
+        },
+        "merge_whitelist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "MergeWhitelistUsernames"
+        },
+        "priority": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Priority"
+        },
+        "protected_file_patterns": {
+          "type": "string",
+          "x-go-name": "ProtectedFilePatterns"
+        },
+        "push_whitelist_deploy_keys": {
+          "type": "boolean",
+          "x-go-name": "PushWhitelistDeployKeys"
+        },
+        "push_whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "PushWhitelistTeams"
+        },
+        "push_whitelist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "PushWhitelistUsernames"
+        },
+        "require_signed_commits": {
+          "type": "boolean",
+          "x-go-name": "RequireSignedCommits"
+        },
+        "required_approvals": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "RequiredApprovals"
+        },
+        "status_check_contexts": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "StatusCheckContexts"
+        },
+        "unprotected_file_patterns": {
+          "type": "string",
+          "x-go-name": "UnprotectedFilePatterns"
+        }
+      },
+      "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"
+        },
+        "authorization_header": {
+          "type": "string",
+          "x-go-name": "AuthorizationHeader"
+        },
+        "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": {
+          "description": "deprecated",
+          "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"
+        },
+        "ref": {
+          "type": "string",
+          "x-go-name": "Ref"
+        },
+        "state": {
+          "type": "string",
+          "x-go-name": "State"
+        },
+        "title": {
+          "type": "string",
+          "x-go-name": "Title"
+        },
+        "unset_due_date": {
+          "type": "boolean",
+          "x-go-name": "RemoveDeadline"
+        }
+      },
+      "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",
+          "example": "#00aabb"
+        },
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "exclusive": {
+          "type": "boolean",
+          "x-go-name": "Exclusive",
+          "example": false
+        },
+        "is_archived": {
+          "type": "boolean",
+          "x-go-name": "IsArchived",
+          "example": false
+        },
+        "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"
+        },
+        "email": {
+          "type": "string",
+          "x-go-name": "Email"
+        },
+        "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": {
+        "allow_maintainer_edit": {
+          "type": "boolean",
+          "x-go-name": "AllowMaintainerEdit"
+        },
+        "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"
+        },
+        "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"
+        },
+        "unset_due_date": {
+          "type": "boolean",
+          "x-go-name": "RemoveDeadline"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "EditReactionOption": {
+      "description": "EditReactionOption contain the reaction type",
+      "type": "object",
+      "properties": {
+        "content": {
+          "type": "string",
+          "x-go-name": "Reaction"
+        }
+      },
+      "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_fast_forward_only_merge": {
+          "description": "either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.",
+          "type": "boolean",
+          "x-go-name": "AllowFastForwardOnly"
+        },
+        "allow_manual_merge": {
+          "description": "either `true` to allow mark pr as merged manually, or `false` to prevent it.",
+          "type": "boolean",
+          "x-go-name": "AllowManualMerge"
+        },
+        "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.",
+          "type": "boolean",
+          "x-go-name": "AllowMerge"
+        },
+        "allow_rebase": {
+          "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.",
+          "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.",
+          "type": "boolean",
+          "x-go-name": "AllowRebaseMerge"
+        },
+        "allow_rebase_update": {
+          "description": "either `true` to allow updating pull request branch by rebase, or `false` to prevent it.",
+          "type": "boolean",
+          "x-go-name": "AllowRebaseUpdate"
+        },
+        "allow_squash_merge": {
+          "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.",
+          "type": "boolean",
+          "x-go-name": "AllowSquash"
+        },
+        "archived": {
+          "description": "set to `true` to archive this repository.",
+          "type": "boolean",
+          "x-go-name": "Archived"
+        },
+        "autodetect_manual_merge": {
+          "description": "either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.",
+          "type": "boolean",
+          "x-go-name": "AutodetectManualMerge"
+        },
+        "default_allow_maintainer_edit": {
+          "description": "set to `true` to allow edits from maintainers by default",
+          "type": "boolean",
+          "x-go-name": "DefaultAllowMaintainerEdit"
+        },
+        "default_branch": {
+          "description": "sets the default branch for this repository.",
+          "type": "string",
+          "x-go-name": "DefaultBranch"
+        },
+        "default_delete_branch_after_merge": {
+          "description": "set to `true` to delete pr branch after merge by default",
+          "type": "boolean",
+          "x-go-name": "DefaultDeleteBranchAfterMerge"
+        },
+        "default_merge_style": {
+          "description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", or \"fast-forward-only\".",
+          "type": "string",
+          "x-go-name": "DefaultMergeStyle"
+        },
+        "description": {
+          "description": "a short description of the repository.",
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "enable_prune": {
+          "description": "enable prune - remove obsolete remote-tracking references when mirroring",
+          "type": "boolean",
+          "x-go-name": "EnablePrune"
+        },
+        "external_tracker": {
+          "$ref": "#/definitions/ExternalTracker"
+        },
+        "external_wiki": {
+          "$ref": "#/definitions/ExternalWiki"
+        },
+        "has_actions": {
+          "description": "either `true` to enable actions unit, or `false` to disable them.",
+          "type": "boolean",
+          "x-go-name": "HasActions"
+        },
+        "has_issues": {
+          "description": "either `true` to enable issues for this repository or `false` to disable them.",
+          "type": "boolean",
+          "x-go-name": "HasIssues"
+        },
+        "has_packages": {
+          "description": "either `true` to enable packages unit, or `false` to disable them.",
+          "type": "boolean",
+          "x-go-name": "HasPackages"
+        },
+        "has_projects": {
+          "description": "either `true` to enable project unit, or `false` to disable them.",
+          "type": "boolean",
+          "x-go-name": "HasProjects"
+        },
+        "has_pull_requests": {
+          "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
+          "type": "boolean",
+          "x-go-name": "HasPullRequests"
+        },
+        "has_releases": {
+          "description": "either `true` to enable releases unit, or `false` to disable them.",
+          "type": "boolean",
+          "x-go-name": "HasReleases"
+        },
+        "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.",
+          "type": "boolean",
+          "x-go-name": "IgnoreWhitespaceConflicts"
+        },
+        "internal_tracker": {
+          "$ref": "#/definitions/InternalTracker"
+        },
+        "mirror_interval": {
+          "description": "set to a string like `8h30m0s` to set the mirror interval time",
+          "type": "string",
+          "x-go-name": "MirrorInterval"
+        },
+        "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"
+        },
+        "projects_mode": {
+          "description": "`repo` to only allow repo-level projects, `owner` to only allow owner projects, `all` to allow both.",
+          "type": "string",
+          "x-go-name": "ProjectsMode"
+        },
+        "template": {
+          "description": "either `true` to make this repository a template or `false` to make it a normal repository",
+          "type": "boolean",
+          "x-go-name": "Template"
+        },
+        "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"
+    },
+    "EditTagProtectionOption": {
+      "description": "EditTagProtectionOption options for editing a tag protection",
+      "type": "object",
+      "properties": {
+        "name_pattern": {
+          "type": "string",
+          "x-go-name": "NamePattern"
+        },
+        "whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "WhitelistTeams"
+        },
+        "whitelist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "WhitelistUsernames"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "EditTeamOption": {
+      "description": "EditTeamOption options for editing a team",
+      "type": "object",
+      "required": [
+        "name"
+      ],
+      "properties": {
+        "can_create_org_repo": {
+          "type": "boolean",
+          "x-go-name": "CanCreateOrgRepo"
+        },
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "includes_all_repositories": {
+          "type": "boolean",
+          "x-go-name": "IncludesAllRepositories"
+        },
+        "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.projects",
+            "repo.ext_wiki"
+          ]
+        },
+        "units_map": {
+          "type": "object",
+          "additionalProperties": {
+            "type": "string"
+          },
+          "x-go-name": "UnitsMap",
+          "example": {
+            "repo.code": "read",
+            "repo.ext_issues": "none",
+            "repo.ext_wiki": "none",
+            "repo.issues": "write",
+            "repo.projects": "none",
+            "repo.pulls": "owner",
+            "repo.releases": "none",
+            "repo.wiki": "admin"
+          }
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "EditUserOption": {
+      "description": "EditUserOption edit user options",
+      "type": "object",
+      "required": [
+        "source_id",
+        "login_name"
+      ],
+      "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"
+        },
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "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"
+        },
+        "restricted": {
+          "type": "boolean",
+          "x-go-name": "Restricted"
+        },
+        "source_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "SourceID"
+        },
+        "visibility": {
+          "type": "string",
+          "x-go-name": "Visibility"
+        },
+        "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"
+        },
+        "user_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "UserID"
+        },
+        "username": {
+          "type": "string",
+          "x-go-name": "UserName"
+        },
+        "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_regexp_pattern": {
+          "description": "External Issue Tracker issue regular expression",
+          "type": "string",
+          "x-go-name": "ExternalTrackerRegexpPattern"
+        },
+        "external_tracker_style": {
+          "description": "External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp`",
+          "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"
+        },
+        "created": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "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": {
+          "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"
+    },
+    "FilesResponse": {
+      "description": "FilesResponse contains information about multiple files from a repo",
+      "type": "object",
+      "properties": {
+        "commit": {
+          "$ref": "#/definitions/FileCommitResponse"
+        },
+        "files": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ContentsResponse"
+          },
+          "x-go-name": "Files"
+        },
+        "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"
+        },
+        "verified": {
+          "type": "boolean",
+          "x-go-name": "Verified"
+        }
+      },
+      "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"
+    },
+    "GeneralAPISettings": {
+      "description": "GeneralAPISettings contains global api settings exposed by it",
+      "type": "object",
+      "properties": {
+        "default_git_trees_per_page": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "DefaultGitTreesPerPage"
+        },
+        "default_max_blob_size": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "DefaultMaxBlobSize"
+        },
+        "default_paging_num": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "DefaultPagingNum"
+        },
+        "max_response_items": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "MaxResponseItems"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "GeneralAttachmentSettings": {
+      "description": "GeneralAttachmentSettings contains global Attachment settings exposed by API",
+      "type": "object",
+      "properties": {
+        "allowed_types": {
+          "type": "string",
+          "x-go-name": "AllowedTypes"
+        },
+        "enabled": {
+          "type": "boolean",
+          "x-go-name": "Enabled"
+        },
+        "max_files": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "MaxFiles"
+        },
+        "max_size": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "MaxSize"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "GeneralRepoSettings": {
+      "description": "GeneralRepoSettings contains global repository settings exposed by API",
+      "type": "object",
+      "properties": {
+        "http_git_disabled": {
+          "type": "boolean",
+          "x-go-name": "HTTPGitDisabled"
+        },
+        "lfs_disabled": {
+          "type": "boolean",
+          "x-go-name": "LFSDisabled"
+        },
+        "migrations_disabled": {
+          "type": "boolean",
+          "x-go-name": "MigrationsDisabled"
+        },
+        "mirrors_disabled": {
+          "type": "boolean",
+          "x-go-name": "MirrorsDisabled"
+        },
+        "stars_disabled": {
+          "type": "boolean",
+          "x-go-name": "StarsDisabled"
+        },
+        "time_tracking_disabled": {
+          "type": "boolean",
+          "x-go-name": "TimeTrackingDisabled"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "GeneralUISettings": {
+      "description": "GeneralUISettings contains global ui settings exposed by API",
+      "type": "object",
+      "properties": {
+        "allowed_reactions": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "AllowedReactions"
+        },
+        "custom_emojis": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "CustomEmojis"
+        },
+        "default_theme": {
+          "type": "string",
+          "x-go-name": "DefaultTheme"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "GenerateRepoOption": {
+      "description": "GenerateRepoOption options when creating repository using a template",
+      "type": "object",
+      "required": [
+        "owner",
+        "name"
+      ],
+      "properties": {
+        "avatar": {
+          "description": "include avatar of the template repo",
+          "type": "boolean",
+          "x-go-name": "Avatar"
+        },
+        "default_branch": {
+          "description": "Default branch of the new repository",
+          "type": "string",
+          "x-go-name": "DefaultBranch"
+        },
+        "description": {
+          "description": "Description of the repository to create",
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "git_content": {
+          "description": "include git content of default branch in template repo",
+          "type": "boolean",
+          "x-go-name": "GitContent"
+        },
+        "git_hooks": {
+          "description": "include git hooks in template repo",
+          "type": "boolean",
+          "x-go-name": "GitHooks"
+        },
+        "labels": {
+          "description": "include labels in template repo",
+          "type": "boolean",
+          "x-go-name": "Labels"
+        },
+        "name": {
+          "description": "Name of the repository to create",
+          "type": "string",
+          "uniqueItems": true,
+          "x-go-name": "Name"
+        },
+        "owner": {
+          "description": "The organization or person who will own the new repository",
+          "type": "string",
+          "x-go-name": "Owner"
+        },
+        "private": {
+          "description": "Whether the repository is private",
+          "type": "boolean",
+          "x-go-name": "Private"
+        },
+        "protected_branch": {
+          "description": "include protected branches in template repo",
+          "type": "boolean",
+          "x-go-name": "ProtectedBranch"
+        },
+        "topics": {
+          "description": "include topics in template repo",
+          "type": "boolean",
+          "x-go-name": "Topics"
+        },
+        "webhooks": {
+          "description": "include webhooks in template repo",
+          "type": "boolean",
+          "x-go-name": "Webhooks"
+        }
+      },
+      "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"
+    },
+    "GitignoreTemplateInfo": {
+      "description": "GitignoreTemplateInfo name and text of a gitignore template",
+      "type": "object",
+      "properties": {
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "source": {
+          "type": "string",
+          "x-go-name": "Source"
+        }
+      },
+      "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"
+        },
+        "authorization_header": {
+          "type": "string",
+          "x-go-name": "AuthorizationHeader"
+        },
+        "branch_filter": {
+          "type": "string",
+          "x-go-name": "BranchFilter"
+        },
+        "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": {
+        "assets": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/Attachment"
+          },
+          "x-go-name": "Attachments"
+        },
+        "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"
+        },
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "is_locked": {
+          "type": "boolean",
+          "x-go-name": "IsLocked"
+        },
+        "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"
+        },
+        "pin_order": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "PinOrder"
+        },
+        "pull_request": {
+          "$ref": "#/definitions/PullRequestMeta"
+        },
+        "ref": {
+          "type": "string",
+          "x-go-name": "Ref"
+        },
+        "repository": {
+          "$ref": "#/definitions/RepositoryMeta"
+        },
+        "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"
+    },
+    "IssueConfig": {
+      "type": "object",
+      "properties": {
+        "blank_issues_enabled": {
+          "type": "boolean",
+          "x-go-name": "BlankIssuesEnabled"
+        },
+        "contact_links": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/IssueConfigContactLink"
+          },
+          "x-go-name": "ContactLinks"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "IssueConfigContactLink": {
+      "type": "object",
+      "properties": {
+        "about": {
+          "type": "string",
+          "x-go-name": "About"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "IssueConfigValidation": {
+      "type": "object",
+      "properties": {
+        "message": {
+          "type": "string",
+          "x-go-name": "Message"
+        },
+        "valid": {
+          "type": "boolean",
+          "x-go-name": "Valid"
+        }
+      },
+      "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"
+    },
+    "IssueFormField": {
+      "description": "IssueFormField represents a form field",
+      "type": "object",
+      "properties": {
+        "attributes": {
+          "type": "object",
+          "additionalProperties": {},
+          "x-go-name": "Attributes"
+        },
+        "id": {
+          "type": "string",
+          "x-go-name": "ID"
+        },
+        "type": {
+          "$ref": "#/definitions/IssueFormFieldType"
+        },
+        "validations": {
+          "type": "object",
+          "additionalProperties": {},
+          "x-go-name": "Validations"
+        },
+        "visible": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/IssueFormFieldVisible"
+          },
+          "x-go-name": "Visible"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "IssueFormFieldType": {
+      "type": "string",
+      "title": "IssueFormFieldType defines issue form field type, can be \"markdown\", \"textarea\", \"input\", \"dropdown\" or \"checkboxes\"",
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "IssueFormFieldVisible": {
+      "description": "IssueFormFieldVisible defines issue form field visible",
+      "type": "string",
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "IssueLabelsOption": {
+      "description": "IssueLabelsOption a collection of labels",
+      "type": "object",
+      "properties": {
+        "labels": {
+          "description": "Labels can be a list of integers representing label IDs\nor a list of strings representing label names",
+          "type": "array",
+          "items": {},
+          "x-go-name": "Labels"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "IssueMeta": {
+      "description": "IssueMeta basic issue information",
+      "type": "object",
+      "properties": {
+        "index": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Index"
+        },
+        "owner": {
+          "type": "string",
+          "x-go-name": "Owner"
+        },
+        "repo": {
+          "type": "string",
+          "x-go-name": "Name"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "IssueTemplate": {
+      "description": "IssueTemplate represents an issue template for a repository",
+      "type": "object",
+      "properties": {
+        "about": {
+          "type": "string",
+          "x-go-name": "About"
+        },
+        "assignees": {
+          "$ref": "#/definitions/IssueTemplateStringSlice"
+        },
+        "body": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/IssueFormField"
+          },
+          "x-go-name": "Fields"
+        },
+        "content": {
+          "type": "string",
+          "x-go-name": "Content"
+        },
+        "file_name": {
+          "type": "string",
+          "x-go-name": "FileName"
+        },
+        "labels": {
+          "$ref": "#/definitions/IssueTemplateStringSlice"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "ref": {
+          "type": "string",
+          "x-go-name": "Ref"
+        },
+        "title": {
+          "type": "string",
+          "x-go-name": "Title"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "IssueTemplateStringSlice": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      },
+      "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"
+        },
+        "exclusive": {
+          "type": "boolean",
+          "x-go-name": "Exclusive",
+          "example": false
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "is_archived": {
+          "type": "boolean",
+          "x-go-name": "IsArchived",
+          "example": false
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "LabelTemplate": {
+      "description": "LabelTemplate info of a Label template",
+      "type": "object",
+      "properties": {
+        "color": {
+          "type": "string",
+          "x-go-name": "Color",
+          "example": "00aabb"
+        },
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "exclusive": {
+          "type": "boolean",
+          "x-go-name": "Exclusive",
+          "example": false
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "LicenseTemplateInfo": {
+      "description": "LicensesInfo contains information about a License",
+      "type": "object",
+      "properties": {
+        "body": {
+          "type": "string",
+          "x-go-name": "Body"
+        },
+        "implementation": {
+          "type": "string",
+          "x-go-name": "Implementation"
+        },
+        "key": {
+          "type": "string",
+          "x-go-name": "Key"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "LicensesTemplateListEntry": {
+      "description": "LicensesListEntry is used for the API",
+      "type": "object",
+      "properties": {
+        "key": {
+          "type": "string",
+          "x-go-name": "Key"
+        },
+        "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": "URL path for rendering issue, media and file links\nExpected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}\n\nin: body",
+          "type": "string"
+        },
+        "Mode": {
+          "description": "Mode to render (markdown, comment, wiki, file)\n\nin: body",
+          "type": "string"
+        },
+        "Text": {
+          "description": "Text markdown to render\n\nin: body",
+          "type": "string"
+        },
+        "Wiki": {
+          "description": "Is it a wiki page? (use mode=wiki instead)\n\nDeprecated: true\nin: body",
+          "type": "boolean"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "MarkupOption": {
+      "description": "MarkupOption markup options",
+      "type": "object",
+      "properties": {
+        "Context": {
+          "description": "URL path for rendering issue, media and file links\nExpected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}\n\nin: body",
+          "type": "string"
+        },
+        "FilePath": {
+          "description": "File path for detecting extension in file mode\n\nin: body",
+          "type": "string"
+        },
+        "Mode": {
+          "description": "Mode to render (markdown, comment, wiki, file)\n\nin: body",
+          "type": "string"
+        },
+        "Text": {
+          "description": "Text markup to render\n\nin: body",
+          "type": "string"
+        },
+        "Wiki": {
+          "description": "Is it a wiki page? (use mode=wiki instead)\n\nDeprecated: true\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",
+            "fast-forward-only",
+            "manually-merged"
+          ]
+        },
+        "MergeCommitID": {
+          "type": "string"
+        },
+        "MergeMessageField": {
+          "type": "string"
+        },
+        "MergeTitleField": {
+          "type": "string"
+        },
+        "delete_branch_after_merge": {
+          "type": "boolean",
+          "x-go-name": "DeleteBranchAfterMerge"
+        },
+        "force_merge": {
+          "type": "boolean",
+          "x-go-name": "ForceMerge"
+        },
+        "head_commit_id": {
+          "type": "string",
+          "x-go-name": "HeadCommitID"
+        },
+        "merge_when_checks_succeed": {
+          "type": "boolean",
+          "x-go-name": "MergeWhenChecksSucceed"
+        }
+      },
+      "x-go-name": "MergePullRequestForm",
+      "x-go-package": "code.gitea.io/gitea/services/forms"
+    },
+    "MergeUpstreamRequest": {
+      "type": "object",
+      "properties": {
+        "branch": {
+          "type": "string",
+          "x-go-name": "Branch"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "MergeUpstreamResponse": {
+      "type": "object",
+      "properties": {
+        "merge_type": {
+          "type": "string",
+          "x-go-name": "MergeStyle"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "MigrateRepoOptions": {
+      "description": "MigrateRepoOptions options for migrating repository's\nthis is used to interact with api v1",
+      "type": "object",
+      "required": [
+        "clone_addr",
+        "repo_name"
+      ],
+      "properties": {
+        "auth_password": {
+          "type": "string",
+          "x-go-name": "AuthPassword"
+        },
+        "auth_token": {
+          "type": "string",
+          "x-go-name": "AuthToken"
+        },
+        "auth_username": {
+          "type": "string",
+          "x-go-name": "AuthUsername"
+        },
+        "aws_access_key_id": {
+          "type": "string",
+          "x-go-name": "AWSAccessKeyID"
+        },
+        "aws_secret_access_key": {
+          "type": "string",
+          "x-go-name": "AWSSecretAccessKey"
+        },
+        "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"
+        },
+        "lfs": {
+          "type": "boolean",
+          "x-go-name": "LFS"
+        },
+        "lfs_endpoint": {
+          "type": "string",
+          "x-go-name": "LFSEndpoint"
+        },
+        "milestones": {
+          "type": "boolean",
+          "x-go-name": "Milestones"
+        },
+        "mirror": {
+          "type": "boolean",
+          "x-go-name": "Mirror"
+        },
+        "mirror_interval": {
+          "type": "string",
+          "x-go-name": "MirrorInterval"
+        },
+        "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"
+        },
+        "repo_owner": {
+          "description": "Name of User or Organisation who will own Repo after migration",
+          "type": "string",
+          "x-go-name": "RepoOwner"
+        },
+        "service": {
+          "type": "string",
+          "enum": [
+            "git",
+            "github",
+            "gitea",
+            "gitlab",
+            "gogs",
+            "onedev",
+            "gitbucket",
+            "codebase"
+          ],
+          "x-go-name": "Service"
+        },
+        "uid": {
+          "description": "deprecated (only for backwards compatibility)",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "RepoOwnerID"
+        },
+        "wiki": {
+          "type": "boolean",
+          "x-go-name": "Wiki"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "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"
+        },
+        "created_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "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"
+        },
+        "updated_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Updated"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NewIssuePinsAllowed": {
+      "description": "NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed",
+      "type": "object",
+      "properties": {
+        "issues": {
+          "type": "boolean",
+          "x-go-name": "Issues"
+        },
+        "pull_requests": {
+          "type": "boolean",
+          "x-go-name": "PullRequests"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NodeInfo": {
+      "description": "NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks",
+      "type": "object",
+      "properties": {
+        "metadata": {
+          "type": "object",
+          "x-go-name": "Metadata"
+        },
+        "openRegistrations": {
+          "type": "boolean",
+          "x-go-name": "OpenRegistrations"
+        },
+        "protocols": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Protocols"
+        },
+        "services": {
+          "$ref": "#/definitions/NodeInfoServices"
+        },
+        "software": {
+          "$ref": "#/definitions/NodeInfoSoftware"
+        },
+        "usage": {
+          "$ref": "#/definitions/NodeInfoUsage"
+        },
+        "version": {
+          "type": "string",
+          "x-go-name": "Version"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NodeInfoServices": {
+      "description": "NodeInfoServices contains the third party sites this server can connect to via their application API",
+      "type": "object",
+      "properties": {
+        "inbound": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Inbound"
+        },
+        "outbound": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Outbound"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NodeInfoSoftware": {
+      "description": "NodeInfoSoftware contains Metadata about server software in use",
+      "type": "object",
+      "properties": {
+        "homepage": {
+          "type": "string",
+          "x-go-name": "Homepage"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "repository": {
+          "type": "string",
+          "x-go-name": "Repository"
+        },
+        "version": {
+          "type": "string",
+          "x-go-name": "Version"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NodeInfoUsage": {
+      "description": "NodeInfoUsage contains usage statistics for this server",
+      "type": "object",
+      "properties": {
+        "localComments": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "LocalComments"
+        },
+        "localPosts": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "LocalPosts"
+        },
+        "users": {
+          "$ref": "#/definitions/NodeInfoUsageUsers"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NodeInfoUsageUsers": {
+      "description": "NodeInfoUsageUsers contains statistics about the users of this server",
+      "type": "object",
+      "properties": {
+        "activeHalfyear": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ActiveHalfyear"
+        },
+        "activeMonth": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ActiveMonth"
+        },
+        "total": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Total"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "Note": {
+      "description": "Note contains information related to a git note",
+      "type": "object",
+      "properties": {
+        "commit": {
+          "$ref": "#/definitions/Commit"
+        },
+        "message": {
+          "type": "string",
+          "x-go-name": "Message"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NotificationCount": {
+      "description": "NotificationCount number of unread notifications",
+      "type": "object",
+      "properties": {
+        "new": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "New"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NotificationSubject": {
+      "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)",
+      "type": "object",
+      "properties": {
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "latest_comment_html_url": {
+          "type": "string",
+          "x-go-name": "LatestCommentHTMLURL"
+        },
+        "latest_comment_url": {
+          "type": "string",
+          "x-go-name": "LatestCommentURL"
+        },
+        "state": {
+          "$ref": "#/definitions/StateType"
+        },
+        "title": {
+          "type": "string",
+          "x-go-name": "Title"
+        },
+        "type": {
+          "$ref": "#/definitions/NotifySubjectType"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NotificationThread": {
+      "description": "NotificationThread expose Notification on API",
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "pinned": {
+          "type": "boolean",
+          "x-go-name": "Pinned"
+        },
+        "repository": {
+          "$ref": "#/definitions/Repository"
+        },
+        "subject": {
+          "$ref": "#/definitions/NotificationSubject"
+        },
+        "unread": {
+          "type": "boolean",
+          "x-go-name": "Unread"
+        },
+        "updated_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "UpdatedAt"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "NotifySubjectType": {
+      "description": "NotifySubjectType represent type of notification subject",
+      "type": "string",
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "OAuth2Application": {
+      "type": "object",
+      "title": "OAuth2Application represents an OAuth2 application.",
+      "properties": {
+        "client_id": {
+          "type": "string",
+          "x-go-name": "ClientID"
+        },
+        "client_secret": {
+          "type": "string",
+          "x-go-name": "ClientSecret"
+        },
+        "confidential_client": {
+          "type": "boolean",
+          "x-go-name": "ConfidentialClient"
+        },
+        "created": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "redirect_uris": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "RedirectURIs"
+        },
+        "skip_secondary_authorization": {
+          "type": "boolean",
+          "x-go-name": "SkipSecondaryAuthorization"
+        }
+      },
+      "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"
+        },
+        "email": {
+          "type": "string",
+          "x-go-name": "Email"
+        },
+        "full_name": {
+          "type": "string",
+          "x-go-name": "FullName"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "location": {
+          "type": "string",
+          "x-go-name": "Location"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "repo_admin_change_team_access": {
+          "type": "boolean",
+          "x-go-name": "RepoAdminChangeTeamAccess"
+        },
+        "username": {
+          "description": "deprecated",
+          "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"
+    },
+    "OrganizationPermissions": {
+      "description": "OrganizationPermissions list different users permissions on an organization",
+      "type": "object",
+      "properties": {
+        "can_create_repository": {
+          "type": "boolean",
+          "x-go-name": "CanCreateRepository"
+        },
+        "can_read": {
+          "type": "boolean",
+          "x-go-name": "CanRead"
+        },
+        "can_write": {
+          "type": "boolean",
+          "x-go-name": "CanWrite"
+        },
+        "is_admin": {
+          "type": "boolean",
+          "x-go-name": "IsAdmin"
+        },
+        "is_owner": {
+          "type": "boolean",
+          "x-go-name": "IsOwner"
+        }
+      },
+      "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"
+    },
+    "Package": {
+      "description": "Package represents a package",
+      "type": "object",
+      "properties": {
+        "created_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "CreatedAt"
+        },
+        "creator": {
+          "$ref": "#/definitions/User"
+        },
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "owner": {
+          "$ref": "#/definitions/User"
+        },
+        "repository": {
+          "$ref": "#/definitions/Repository"
+        },
+        "type": {
+          "type": "string",
+          "x-go-name": "Type"
+        },
+        "version": {
+          "type": "string",
+          "x-go-name": "Version"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "PackageFile": {
+      "description": "PackageFile represents a package file",
+      "type": "object",
+      "properties": {
+        "Size": {
+          "type": "integer",
+          "format": "int64"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "md5": {
+          "type": "string",
+          "x-go-name": "HashMD5"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "sha1": {
+          "type": "string",
+          "x-go-name": "HashSHA1"
+        },
+        "sha256": {
+          "type": "string",
+          "x-go-name": "HashSHA256"
+        },
+        "sha512": {
+          "type": "string",
+          "x-go-name": "HashSHA512"
+        }
+      },
+      "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"
+        },
+        "signer": {
+          "$ref": "#/definitions/PayloadUser"
+        },
+        "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": {
+        "additions": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Additions"
+        },
+        "allow_maintainer_edit": {
+          "type": "boolean",
+          "x-go-name": "AllowMaintainerEdit"
+        },
+        "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"
+        },
+        "changed_files": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ChangedFiles"
+        },
+        "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"
+        },
+        "deletions": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Deletions"
+        },
+        "diff_url": {
+          "type": "string",
+          "x-go-name": "DiffURL"
+        },
+        "draft": {
+          "type": "boolean",
+          "x-go-name": "Draft"
+        },
+        "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"
+        },
+        "is_locked": {
+          "type": "boolean",
+          "x-go-name": "IsLocked"
+        },
+        "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"
+        },
+        "pin_order": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "PinOrder"
+        },
+        "requested_reviewers": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/User"
+          },
+          "x-go-name": "RequestedReviewers"
+        },
+        "requested_reviewers_teams": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/Team"
+          },
+          "x-go-name": "RequestedReviewersTeams"
+        },
+        "review_comments": {
+          "description": "number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR)",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ReviewComments"
+        },
+        "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": {
+        "draft": {
+          "type": "boolean",
+          "x-go-name": "IsWorkInProgress"
+        },
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "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"
+    },
+    "PullReview": {
+      "description": "PullReview represents a pull request review",
+      "type": "object",
+      "properties": {
+        "body": {
+          "type": "string",
+          "x-go-name": "Body"
+        },
+        "comments_count": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "CodeCommentsCount"
+        },
+        "commit_id": {
+          "type": "string",
+          "x-go-name": "CommitID"
+        },
+        "dismissed": {
+          "type": "boolean",
+          "x-go-name": "Dismissed"
+        },
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "official": {
+          "type": "boolean",
+          "x-go-name": "Official"
+        },
+        "pull_request_url": {
+          "type": "string",
+          "x-go-name": "HTMLPullURL"
+        },
+        "stale": {
+          "type": "boolean",
+          "x-go-name": "Stale"
+        },
+        "state": {
+          "$ref": "#/definitions/ReviewStateType"
+        },
+        "submitted_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Submitted"
+        },
+        "team": {
+          "$ref": "#/definitions/Team"
+        },
+        "updated_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Updated"
+        },
+        "user": {
+          "$ref": "#/definitions/User"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "PullReviewComment": {
+      "description": "PullReviewComment represents a comment on a pull request review",
+      "type": "object",
+      "properties": {
+        "body": {
+          "type": "string",
+          "x-go-name": "Body"
+        },
+        "commit_id": {
+          "type": "string",
+          "x-go-name": "CommitID"
+        },
+        "created_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "diff_hunk": {
+          "type": "string",
+          "x-go-name": "DiffHunk"
+        },
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "original_commit_id": {
+          "type": "string",
+          "x-go-name": "OrigCommitID"
+        },
+        "original_position": {
+          "type": "integer",
+          "format": "uint64",
+          "x-go-name": "OldLineNum"
+        },
+        "path": {
+          "type": "string",
+          "x-go-name": "Path"
+        },
+        "position": {
+          "type": "integer",
+          "format": "uint64",
+          "x-go-name": "LineNum"
+        },
+        "pull_request_review_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ReviewID"
+        },
+        "pull_request_url": {
+          "type": "string",
+          "x-go-name": "HTMLPullURL"
+        },
+        "resolver": {
+          "$ref": "#/definitions/User"
+        },
+        "updated_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Updated"
+        },
+        "user": {
+          "$ref": "#/definitions/User"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "PullReviewRequestOptions": {
+      "description": "PullReviewRequestOptions are options to add or remove pull review requests",
+      "type": "object",
+      "properties": {
+        "reviewers": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Reviewers"
+        },
+        "team_reviewers": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "TeamReviewers"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "PushMirror": {
+      "description": "PushMirror represents information of a push mirror",
+      "type": "object",
+      "properties": {
+        "created": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "CreatedUnix"
+        },
+        "interval": {
+          "type": "string",
+          "x-go-name": "Interval"
+        },
+        "last_error": {
+          "type": "string",
+          "x-go-name": "LastError"
+        },
+        "last_update": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "LastUpdateUnix"
+        },
+        "remote_address": {
+          "type": "string",
+          "x-go-name": "RemoteAddress"
+        },
+        "remote_name": {
+          "type": "string",
+          "x-go-name": "RemoteName"
+        },
+        "repo_name": {
+          "type": "string",
+          "x-go-name": "RepoName"
+        },
+        "sync_on_commit": {
+          "type": "boolean",
+          "x-go-name": "SyncOnCommit"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "Reaction": {
+      "description": "Reaction contain one reaction",
+      "type": "object",
+      "properties": {
+        "content": {
+          "type": "string",
+          "x-go-name": "Reaction"
+        },
+        "created_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "user": {
+          "$ref": "#/definitions/User"
+        }
+      },
+      "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"
+        },
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "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"
+        },
+        "upload_url": {
+          "type": "string",
+          "x-go-name": "UploadURL"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        },
+        "zipball_url": {
+          "type": "string",
+          "x-go-name": "ZipURL"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "RenameUserOption": {
+      "description": "RenameUserOption options when renaming a user",
+      "type": "object",
+      "required": [
+        "new_username"
+      ],
+      "properties": {
+        "new_username": {
+          "description": "New username for this user. This name cannot be in use yet by any other user.",
+          "type": "string",
+          "uniqueItems": true,
+          "x-go-name": "NewName"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "RepoCollaboratorPermission": {
+      "description": "RepoCollaboratorPermission to get repository permission for a collaborator",
+      "type": "object",
+      "properties": {
+        "permission": {
+          "type": "string",
+          "x-go-name": "Permission"
+        },
+        "role_name": {
+          "type": "string",
+          "x-go-name": "RoleName"
+        },
+        "user": {
+          "$ref": "#/definitions/User"
+        }
+      },
+      "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"
+        },
+        "verification": {
+          "$ref": "#/definitions/PayloadCommitVerification"
+        }
+      },
+      "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"
+    },
+    "RepoTransfer": {
+      "description": "RepoTransfer represents a pending repo transfer",
+      "type": "object",
+      "properties": {
+        "doer": {
+          "$ref": "#/definitions/User"
+        },
+        "recipient": {
+          "$ref": "#/definitions/User"
+        },
+        "teams": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/Team"
+          },
+          "x-go-name": "Teams"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "Repository": {
+      "description": "Repository represents a repository",
+      "type": "object",
+      "properties": {
+        "allow_fast_forward_only_merge": {
+          "type": "boolean",
+          "x-go-name": "AllowFastForwardOnly"
+        },
+        "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_rebase_update": {
+          "type": "boolean",
+          "x-go-name": "AllowRebaseUpdate"
+        },
+        "allow_squash_merge": {
+          "type": "boolean",
+          "x-go-name": "AllowSquash"
+        },
+        "archived": {
+          "type": "boolean",
+          "x-go-name": "Archived"
+        },
+        "archived_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "ArchivedAt"
+        },
+        "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_allow_maintainer_edit": {
+          "type": "boolean",
+          "x-go-name": "DefaultAllowMaintainerEdit"
+        },
+        "default_branch": {
+          "type": "string",
+          "x-go-name": "DefaultBranch"
+        },
+        "default_delete_branch_after_merge": {
+          "type": "boolean",
+          "x-go-name": "DefaultDeleteBranchAfterMerge"
+        },
+        "default_merge_style": {
+          "type": "string",
+          "x-go-name": "DefaultMergeStyle"
+        },
+        "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_actions": {
+          "type": "boolean",
+          "x-go-name": "HasActions"
+        },
+        "has_issues": {
+          "type": "boolean",
+          "x-go-name": "HasIssues"
+        },
+        "has_packages": {
+          "type": "boolean",
+          "x-go-name": "HasPackages"
+        },
+        "has_projects": {
+          "type": "boolean",
+          "x-go-name": "HasProjects"
+        },
+        "has_pull_requests": {
+          "type": "boolean",
+          "x-go-name": "HasPullRequests"
+        },
+        "has_releases": {
+          "type": "boolean",
+          "x-go-name": "HasReleases"
+        },
+        "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": {
+          "type": "boolean",
+          "x-go-name": "Internal"
+        },
+        "internal_tracker": {
+          "$ref": "#/definitions/InternalTracker"
+        },
+        "language": {
+          "type": "string",
+          "x-go-name": "Language"
+        },
+        "languages_url": {
+          "type": "string",
+          "x-go-name": "LanguagesURL"
+        },
+        "licenses": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Licenses"
+        },
+        "link": {
+          "type": "string",
+          "x-go-name": "Link"
+        },
+        "mirror": {
+          "type": "boolean",
+          "x-go-name": "Mirror"
+        },
+        "mirror_interval": {
+          "type": "string",
+          "x-go-name": "MirrorInterval"
+        },
+        "mirror_updated": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "MirrorUpdated"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "object_format_name": {
+          "description": "ObjectFormatName of the underlying git repository",
+          "type": "string",
+          "enum": [
+            "sha1",
+            "sha256"
+          ],
+          "x-go-name": "ObjectFormatName"
+        },
+        "open_issues_count": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "OpenIssues"
+        },
+        "open_pr_counter": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "OpenPulls"
+        },
+        "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"
+        },
+        "projects_mode": {
+          "type": "string",
+          "x-go-name": "ProjectsMode"
+        },
+        "release_counter": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Releases"
+        },
+        "repo_transfer": {
+          "$ref": "#/definitions/RepoTransfer"
+        },
+        "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"
+        },
+        "template": {
+          "type": "boolean",
+          "x-go-name": "Template"
+        },
+        "topics": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "Topics"
+        },
+        "updated_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Updated"
+        },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        },
+        "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"
+    },
+    "RepositoryMeta": {
+      "description": "RepositoryMeta basic repository information",
+      "type": "object",
+      "properties": {
+        "full_name": {
+          "type": "string",
+          "x-go-name": "FullName"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "name": {
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "owner": {
+          "type": "string",
+          "x-go-name": "Owner"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "ReviewStateType": {
+      "description": "ReviewStateType review state type",
+      "type": "string",
+      "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"
+    },
+    "Secret": {
+      "description": "Secret represents a secret",
+      "type": "object",
+      "properties": {
+        "created_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "name": {
+          "description": "the secret's name",
+          "type": "string",
+          "x-go-name": "Name"
+        }
+      },
+      "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"
+    },
+    "StopWatch": {
+      "description": "StopWatch represent a running stopwatch",
+      "type": "object",
+      "properties": {
+        "created": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "duration": {
+          "type": "string",
+          "x-go-name": "Duration"
+        },
+        "issue_index": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "IssueIndex"
+        },
+        "issue_title": {
+          "type": "string",
+          "x-go-name": "IssueTitle"
+        },
+        "repo_name": {
+          "type": "string",
+          "x-go-name": "RepoName"
+        },
+        "repo_owner_name": {
+          "type": "string",
+          "x-go-name": "RepoOwnerName"
+        },
+        "seconds": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Seconds"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "SubmitPullReviewOptions": {
+      "description": "SubmitPullReviewOptions are options to submit a pending pull review",
+      "type": "object",
+      "properties": {
+        "body": {
+          "type": "string",
+          "x-go-name": "Body"
+        },
+        "event": {
+          "$ref": "#/definitions/ReviewStateType"
+        }
+      },
+      "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"
+        },
+        "message": {
+          "type": "string",
+          "x-go-name": "Message"
+        },
+        "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"
+    },
+    "TagProtection": {
+      "description": "TagProtection represents a tag protection",
+      "type": "object",
+      "properties": {
+        "created_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "name_pattern": {
+          "type": "string",
+          "x-go-name": "NamePattern"
+        },
+        "updated_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Updated"
+        },
+        "whitelist_teams": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "WhitelistTeams"
+        },
+        "whitelist_usernames": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "WhitelistUsernames"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "Team": {
+      "description": "Team represents a team in an organization",
+      "type": "object",
+      "properties": {
+        "can_create_org_repo": {
+          "type": "boolean",
+          "x-go-name": "CanCreateOrgRepo"
+        },
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ID"
+        },
+        "includes_all_repositories": {
+          "type": "boolean",
+          "x-go-name": "IncludesAllRepositories"
+        },
+        "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.projects",
+            "repo.ext_wiki"
+          ]
+        },
+        "units_map": {
+          "type": "object",
+          "additionalProperties": {
+            "type": "string"
+          },
+          "x-go-name": "UnitsMap",
+          "example": {
+            "repo.code": "read",
+            "repo.ext_issues": "none",
+            "repo.ext_wiki": "none",
+            "repo.issues": "write",
+            "repo.projects": "none",
+            "repo.pulls": "owner",
+            "repo.releases": "none",
+            "repo.wiki": "admin"
+          }
+        }
+      },
+      "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"
+    },
+    "TimelineComment": {
+      "description": "TimelineComment represents a timeline comment (comment of any type) on a commit or issue",
+      "type": "object",
+      "properties": {
+        "assignee": {
+          "$ref": "#/definitions/User"
+        },
+        "assignee_team": {
+          "$ref": "#/definitions/Team"
+        },
+        "body": {
+          "type": "string",
+          "x-go-name": "Body"
+        },
+        "created_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Created"
+        },
+        "dependent_issue": {
+          "$ref": "#/definitions/Issue"
+        },
+        "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"
+        },
+        "label": {
+          "$ref": "#/definitions/Label"
+        },
+        "milestone": {
+          "$ref": "#/definitions/Milestone"
+        },
+        "new_ref": {
+          "type": "string",
+          "x-go-name": "NewRef"
+        },
+        "new_title": {
+          "type": "string",
+          "x-go-name": "NewTitle"
+        },
+        "old_milestone": {
+          "$ref": "#/definitions/Milestone"
+        },
+        "old_project_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "OldProjectID"
+        },
+        "old_ref": {
+          "type": "string",
+          "x-go-name": "OldRef"
+        },
+        "old_title": {
+          "type": "string",
+          "x-go-name": "OldTitle"
+        },
+        "project_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ProjectID"
+        },
+        "pull_request_url": {
+          "type": "string",
+          "x-go-name": "PRURL"
+        },
+        "ref_action": {
+          "type": "string",
+          "x-go-name": "RefAction"
+        },
+        "ref_comment": {
+          "$ref": "#/definitions/Comment"
+        },
+        "ref_commit_sha": {
+          "description": "commit SHA where issue/PR was referenced",
+          "type": "string",
+          "x-go-name": "RefCommitSHA"
+        },
+        "ref_issue": {
+          "$ref": "#/definitions/Issue"
+        },
+        "removed_assignee": {
+          "description": "whether the assignees were removed or added",
+          "type": "boolean",
+          "x-go-name": "RemovedAssignee"
+        },
+        "resolve_doer": {
+          "$ref": "#/definitions/User"
+        },
+        "review_id": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "ReviewID"
+        },
+        "tracked_time": {
+          "$ref": "#/definitions/TrackedTime"
+        },
+        "type": {
+          "type": "string",
+          "x-go-name": "Type"
+        },
+        "updated_at": {
+          "type": "string",
+          "format": "date-time",
+          "x-go-name": "Updated"
+        },
+        "user": {
+          "$ref": "#/definitions/User"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "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": {
+          "$ref": "#/definitions/Issue"
+        },
+        "issue_id": {
+          "description": "deprecated (only for backwards compatibility)",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "IssueID"
+        },
+        "time": {
+          "description": "Time in seconds",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Time"
+        },
+        "user_id": {
+          "description": "deprecated (only for backwards compatibility)",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "UserID"
+        },
+        "user_name": {
+          "type": "string",
+          "x-go-name": "UserName"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "TransferRepoOption": {
+      "description": "TransferRepoOption options when transfer a repository's ownership",
+      "type": "object",
+      "required": [
+        "new_owner"
+      ],
+      "properties": {
+        "new_owner": {
+          "type": "string",
+          "x-go-name": "NewOwner"
+        },
+        "team_ids": {
+          "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.",
+          "type": "array",
+          "items": {
+            "type": "integer",
+            "format": "int64"
+          },
+          "x-go-name": "TeamIDs"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "UpdateBranchProtectionPriories": {
+      "description": "UpdateBranchProtectionPriories a list to update the branch protection rule priorities",
+      "type": "object",
+      "properties": {
+        "ids": {
+          "type": "array",
+          "items": {
+            "type": "integer",
+            "format": "int64"
+          },
+          "x-go-name": "IDs"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "UpdateBranchRepoOption": {
+      "description": "UpdateBranchRepoOption options when updating a branch in a repository",
+      "type": "object",
+      "required": [
+        "name"
+      ],
+      "properties": {
+        "name": {
+          "description": "New branch name",
+          "type": "string",
+          "uniqueItems": true,
+          "x-go-name": "Name"
+        }
+      },
+      "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": "ContentBase64"
+        },
+        "dates": {
+          "$ref": "#/definitions/CommitDateOptions"
+        },
+        "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"
+        },
+        "signoff": {
+          "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.",
+          "type": "boolean",
+          "x-go-name": "Signoff"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "UpdateRepoAvatarOption": {
+      "description": "UpdateRepoAvatarUserOption options when updating the repo avatar",
+      "type": "object",
+      "properties": {
+        "image": {
+          "description": "image must be base64 encoded",
+          "type": "string",
+          "x-go-name": "Image"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "UpdateUserAvatarOption": {
+      "description": "UpdateUserAvatarUserOption options when updating the user avatar",
+      "type": "object",
+      "properties": {
+        "image": {
+          "description": "image must be base64 encoded",
+          "type": "string",
+          "x-go-name": "Image"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "UpdateVariableOption": {
+      "description": "UpdateVariableOption the option when updating variable",
+      "type": "object",
+      "required": [
+        "value"
+      ],
+      "properties": {
+        "name": {
+          "description": "New name for the variable. If the field is empty, the variable name won't be updated.",
+          "type": "string",
+          "x-go-name": "Name"
+        },
+        "value": {
+          "description": "Value of the variable to update",
+          "type": "string",
+          "x-go-name": "Value"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "User": {
+      "description": "User represents a user",
+      "type": "object",
+      "properties": {
+        "active": {
+          "description": "Is user active",
+          "type": "boolean",
+          "x-go-name": "IsActive"
+        },
+        "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"
+        },
+        "description": {
+          "description": "the user's description",
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "email": {
+          "type": "string",
+          "format": "email",
+          "x-go-name": "Email"
+        },
+        "followers_count": {
+          "description": "user counts",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Followers"
+        },
+        "following_count": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Following"
+        },
+        "full_name": {
+          "description": "the user's full name",
+          "type": "string",
+          "x-go-name": "FullName"
+        },
+        "html_url": {
+          "description": "URL to the user's gitea page",
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "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"
+        },
+        "location": {
+          "description": "the user's location",
+          "type": "string",
+          "x-go-name": "Location"
+        },
+        "login": {
+          "description": "the user's username",
+          "type": "string",
+          "x-go-name": "UserName"
+        },
+        "login_name": {
+          "description": "the user's authentication sign-in name.",
+          "type": "string",
+          "default": "empty",
+          "x-go-name": "LoginName"
+        },
+        "prohibit_login": {
+          "description": "Is user login prohibited",
+          "type": "boolean",
+          "x-go-name": "ProhibitLogin"
+        },
+        "restricted": {
+          "description": "Is user restricted",
+          "type": "boolean",
+          "x-go-name": "Restricted"
+        },
+        "source_id": {
+          "description": "The ID of the user's Authentication Source",
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "SourceID"
+        },
+        "starred_repos_count": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "StarredRepos"
+        },
+        "visibility": {
+          "description": "User visibility level option: public, limited, private",
+          "type": "string",
+          "x-go-name": "Visibility"
+        },
+        "website": {
+          "description": "the user's website",
+          "type": "string",
+          "x-go-name": "Website"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "UserBadgeOption": {
+      "description": "UserBadgeOption options for link between users and badges",
+      "type": "object",
+      "properties": {
+        "badge_slugs": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "x-go-name": "BadgeSlugs",
+          "example": [
+            "badge1",
+            "badge2"
+          ]
+        }
+      },
+      "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/activities"
+    },
+    "UserSettings": {
+      "description": "UserSettings represents user settings",
+      "type": "object",
+      "properties": {
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "diff_view_style": {
+          "type": "string",
+          "x-go-name": "DiffViewStyle"
+        },
+        "full_name": {
+          "type": "string",
+          "x-go-name": "FullName"
+        },
+        "hide_activity": {
+          "type": "boolean",
+          "x-go-name": "HideActivity"
+        },
+        "hide_email": {
+          "description": "Privacy",
+          "type": "boolean",
+          "x-go-name": "HideEmail"
+        },
+        "language": {
+          "type": "string",
+          "x-go-name": "Language"
+        },
+        "location": {
+          "type": "string",
+          "x-go-name": "Location"
+        },
+        "theme": {
+          "type": "string",
+          "x-go-name": "Theme"
+        },
+        "website": {
+          "type": "string",
+          "x-go-name": "Website"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "UserSettingsOptions": {
+      "description": "UserSettingsOptions represents options to change user settings",
+      "type": "object",
+      "properties": {
+        "description": {
+          "type": "string",
+          "x-go-name": "Description"
+        },
+        "diff_view_style": {
+          "type": "string",
+          "x-go-name": "DiffViewStyle"
+        },
+        "full_name": {
+          "type": "string",
+          "x-go-name": "FullName"
+        },
+        "hide_activity": {
+          "type": "boolean",
+          "x-go-name": "HideActivity"
+        },
+        "hide_email": {
+          "description": "Privacy",
+          "type": "boolean",
+          "x-go-name": "HideEmail"
+        },
+        "language": {
+          "type": "string",
+          "x-go-name": "Language"
+        },
+        "location": {
+          "type": "string",
+          "x-go-name": "Location"
+        },
+        "theme": {
+          "type": "string",
+          "x-go-name": "Theme"
+        },
+        "website": {
+          "type": "string",
+          "x-go-name": "Website"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "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": {
+          "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"
+    },
+    "WikiCommit": {
+      "description": "WikiCommit page commit/revision",
+      "type": "object",
+      "properties": {
+        "author": {
+          "$ref": "#/definitions/CommitUser"
+        },
+        "commiter": {
+          "$ref": "#/definitions/CommitUser"
+        },
+        "message": {
+          "type": "string",
+          "x-go-name": "Message"
+        },
+        "sha": {
+          "type": "string",
+          "x-go-name": "ID"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "WikiCommitList": {
+      "description": "WikiCommitList commit/revision list",
+      "type": "object",
+      "properties": {
+        "commits": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/WikiCommit"
+          },
+          "x-go-name": "WikiCommits"
+        },
+        "count": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "Count"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "WikiPage": {
+      "description": "WikiPage a wiki page",
+      "type": "object",
+      "properties": {
+        "commit_count": {
+          "type": "integer",
+          "format": "int64",
+          "x-go-name": "CommitCount"
+        },
+        "content_base64": {
+          "description": "Page content, base64 encoded",
+          "type": "string",
+          "x-go-name": "ContentBase64"
+        },
+        "footer": {
+          "type": "string",
+          "x-go-name": "Footer"
+        },
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "last_commit": {
+          "$ref": "#/definitions/WikiCommit"
+        },
+        "sidebar": {
+          "type": "string",
+          "x-go-name": "Sidebar"
+        },
+        "sub_url": {
+          "type": "string",
+          "x-go-name": "SubURL"
+        },
+        "title": {
+          "type": "string",
+          "x-go-name": "Title"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    },
+    "WikiPageMetaData": {
+      "description": "WikiPageMetaData wiki page meta information",
+      "type": "object",
+      "properties": {
+        "html_url": {
+          "type": "string",
+          "x-go-name": "HTMLURL"
+        },
+        "last_commit": {
+          "$ref": "#/definitions/WikiCommit"
+        },
+        "sub_url": {
+          "type": "string",
+          "x-go-name": "SubURL"
+        },
+        "title": {
+          "type": "string",
+          "x-go-name": "Title"
+        }
+      },
+      "x-go-package": "code.gitea.io/gitea/modules/structs"
+    }
+  },
+  "responses": {
+    "AccessToken": {
+      "description": "AccessToken represents an API access token.",
+      "schema": {
+        "$ref": "#/definitions/AccessToken"
+      }
+    },
+    "AccessTokenList": {
+      "description": "AccessTokenList represents a list of API access token.",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/AccessToken"
+        }
+      }
+    },
+    "ActionVariable": {
+      "description": "ActionVariable",
+      "schema": {
+        "$ref": "#/definitions/ActionVariable"
+      }
+    },
+    "ActivityFeedsList": {
+      "description": "ActivityFeedsList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Activity"
+        }
+      }
+    },
+    "ActivityPub": {
+      "description": "ActivityPub",
+      "schema": {
+        "$ref": "#/definitions/ActivityPub"
+      }
+    },
+    "AnnotatedTag": {
+      "description": "AnnotatedTag",
+      "schema": {
+        "$ref": "#/definitions/AnnotatedTag"
+      }
+    },
+    "Attachment": {
+      "description": "Attachment",
+      "schema": {
+        "$ref": "#/definitions/Attachment"
+      }
+    },
+    "AttachmentList": {
+      "description": "AttachmentList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Attachment"
+        }
+      }
+    },
+    "BadgeList": {
+      "description": "BadgeList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Badge"
+        }
+      }
+    },
+    "Branch": {
+      "description": "Branch",
+      "schema": {
+        "$ref": "#/definitions/Branch"
+      }
+    },
+    "BranchList": {
+      "description": "BranchList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Branch"
+        }
+      }
+    },
+    "BranchProtection": {
+      "description": "BranchProtection",
+      "schema": {
+        "$ref": "#/definitions/BranchProtection"
+      }
+    },
+    "BranchProtectionList": {
+      "description": "BranchProtectionList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/BranchProtection"
+        }
+      }
+    },
+    "ChangedFileList": {
+      "description": "ChangedFileList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/ChangedFile"
+        }
+      },
+      "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"
+        }
+      }
+    },
+    "CombinedStatus": {
+      "description": "CombinedStatus",
+      "schema": {
+        "$ref": "#/definitions/CombinedStatus"
+      }
+    },
+    "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"
+        }
+      }
+    },
+    "CommitStatus": {
+      "description": "CommitStatus",
+      "schema": {
+        "$ref": "#/definitions/CommitStatus"
+      }
+    },
+    "CommitStatusList": {
+      "description": "CommitStatusList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/CommitStatus"
+        }
+      }
+    },
+    "Compare": {
+      "description": "",
+      "schema": {
+        "$ref": "#/definitions/Compare"
+      }
+    },
+    "ContentsListResponse": {
+      "description": "ContentsListResponse",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/ContentsResponse"
+        }
+      }
+    },
+    "ContentsResponse": {
+      "description": "ContentsResponse",
+      "schema": {
+        "$ref": "#/definitions/ContentsResponse"
+      }
+    },
+    "CronList": {
+      "description": "CronList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Cron"
+        }
+      }
+    },
+    "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"
+      }
+    },
+    "FilesResponse": {
+      "description": "FilesResponse",
+      "schema": {
+        "$ref": "#/definitions/FilesResponse"
+      }
+    },
+    "GPGKey": {
+      "description": "GPGKey",
+      "schema": {
+        "$ref": "#/definitions/GPGKey"
+      }
+    },
+    "GPGKeyList": {
+      "description": "GPGKeyList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/GPGKey"
+        }
+      }
+    },
+    "GeneralAPISettings": {
+      "description": "GeneralAPISettings",
+      "schema": {
+        "$ref": "#/definitions/GeneralAPISettings"
+      }
+    },
+    "GeneralAttachmentSettings": {
+      "description": "GeneralAttachmentSettings",
+      "schema": {
+        "$ref": "#/definitions/GeneralAttachmentSettings"
+      }
+    },
+    "GeneralRepoSettings": {
+      "description": "GeneralRepoSettings",
+      "schema": {
+        "$ref": "#/definitions/GeneralRepoSettings"
+      }
+    },
+    "GeneralUISettings": {
+      "description": "GeneralUISettings",
+      "schema": {
+        "$ref": "#/definitions/GeneralUISettings"
+      }
+    },
+    "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"
+      }
+    },
+    "GitignoreTemplateInfo": {
+      "description": "GitignoreTemplateInfo",
+      "schema": {
+        "$ref": "#/definitions/GitignoreTemplateInfo"
+      }
+    },
+    "GitignoreTemplateList": {
+      "description": "GitignoreTemplateList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "type": "string"
+        }
+      }
+    },
+    "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"
+        }
+      }
+    },
+    "IssueTemplates": {
+      "description": "IssueTemplates",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/IssueTemplate"
+        }
+      }
+    },
+    "Label": {
+      "description": "Label",
+      "schema": {
+        "$ref": "#/definitions/Label"
+      }
+    },
+    "LabelList": {
+      "description": "LabelList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Label"
+        }
+      }
+    },
+    "LabelTemplateInfo": {
+      "description": "LabelTemplateInfo",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/LabelTemplate"
+        }
+      }
+    },
+    "LabelTemplateList": {
+      "description": "LabelTemplateList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "type": "string"
+        }
+      }
+    },
+    "LanguageStatistics": {
+      "description": "LanguageStatistics",
+      "schema": {
+        "type": "object",
+        "additionalProperties": {
+          "type": "integer",
+          "format": "int64"
+        }
+      }
+    },
+    "LicenseTemplateInfo": {
+      "description": "LicenseTemplateInfo",
+      "schema": {
+        "$ref": "#/definitions/LicenseTemplateInfo"
+      }
+    },
+    "LicenseTemplateList": {
+      "description": "LicenseTemplateList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/LicensesTemplateListEntry"
+        }
+      }
+    },
+    "LicensesList": {
+      "description": "LicensesList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "type": "string"
+        }
+      }
+    },
+    "MarkdownRender": {
+      "description": "MarkdownRender is a rendered markdown document",
+      "schema": {
+        "type": "string"
+      }
+    },
+    "MarkupRender": {
+      "description": "MarkupRender is a rendered markup document",
+      "schema": {
+        "type": "string"
+      }
+    },
+    "MergeUpstreamRequest": {
+      "description": "",
+      "schema": {
+        "$ref": "#/definitions/MergeUpstreamRequest"
+      }
+    },
+    "MergeUpstreamResponse": {
+      "description": "",
+      "schema": {
+        "$ref": "#/definitions/MergeUpstreamResponse"
+      }
+    },
+    "Milestone": {
+      "description": "Milestone",
+      "schema": {
+        "$ref": "#/definitions/Milestone"
+      }
+    },
+    "MilestoneList": {
+      "description": "MilestoneList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Milestone"
+        }
+      }
+    },
+    "NodeInfo": {
+      "description": "NodeInfo",
+      "schema": {
+        "$ref": "#/definitions/NodeInfo"
+      }
+    },
+    "Note": {
+      "description": "Note",
+      "schema": {
+        "$ref": "#/definitions/Note"
+      }
+    },
+    "NotificationCount": {
+      "description": "Number of unread notifications",
+      "schema": {
+        "$ref": "#/definitions/NotificationCount"
+      }
+    },
+    "NotificationThread": {
+      "description": "NotificationThread",
+      "schema": {
+        "$ref": "#/definitions/NotificationThread"
+      }
+    },
+    "NotificationThreadList": {
+      "description": "NotificationThreadList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/NotificationThread"
+        }
+      }
+    },
+    "OAuth2Application": {
+      "description": "OAuth2Application",
+      "schema": {
+        "$ref": "#/definitions/OAuth2Application"
+      }
+    },
+    "OAuth2ApplicationList": {
+      "description": "OAuth2ApplicationList represents a list of OAuth2 applications.",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/OAuth2Application"
+        }
+      }
+    },
+    "Organization": {
+      "description": "Organization",
+      "schema": {
+        "$ref": "#/definitions/Organization"
+      }
+    },
+    "OrganizationList": {
+      "description": "OrganizationList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Organization"
+        }
+      }
+    },
+    "OrganizationPermissions": {
+      "description": "OrganizationPermissions",
+      "schema": {
+        "$ref": "#/definitions/OrganizationPermissions"
+      }
+    },
+    "Package": {
+      "description": "Package",
+      "schema": {
+        "$ref": "#/definitions/Package"
+      }
+    },
+    "PackageFileList": {
+      "description": "PackageFileList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/PackageFile"
+        }
+      }
+    },
+    "PackageList": {
+      "description": "PackageList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Package"
+        }
+      }
+    },
+    "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"
+        }
+      }
+    },
+    "PullReview": {
+      "description": "PullReview",
+      "schema": {
+        "$ref": "#/definitions/PullReview"
+      }
+    },
+    "PullReviewComment": {
+      "description": "PullComment",
+      "schema": {
+        "$ref": "#/definitions/PullReviewComment"
+      }
+    },
+    "PullReviewCommentList": {
+      "description": "PullCommentList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/PullReviewComment"
+        }
+      }
+    },
+    "PullReviewList": {
+      "description": "PullReviewList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/PullReview"
+        }
+      }
+    },
+    "PushMirror": {
+      "description": "PushMirror",
+      "schema": {
+        "$ref": "#/definitions/PushMirror"
+      }
+    },
+    "PushMirrorList": {
+      "description": "PushMirrorList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/PushMirror"
+        }
+      }
+    },
+    "Reaction": {
+      "description": "Reaction",
+      "schema": {
+        "$ref": "#/definitions/Reaction"
+      }
+    },
+    "ReactionList": {
+      "description": "ReactionList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Reaction"
+        }
+      }
+    },
+    "Reference": {
+      "description": "Reference",
+      "schema": {
+        "$ref": "#/definitions/Reference"
+      }
+    },
+    "ReferenceList": {
+      "description": "ReferenceList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Reference"
+        }
+      }
+    },
+    "RegistrationToken": {
+      "description": "RegistrationToken is response related to registration token",
+      "headers": {
+        "token": {
+          "type": "string"
+        }
+      }
+    },
+    "Release": {
+      "description": "Release",
+      "schema": {
+        "$ref": "#/definitions/Release"
+      }
+    },
+    "ReleaseList": {
+      "description": "ReleaseList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Release"
+        }
+      }
+    },
+    "RepoCollaboratorPermission": {
+      "description": "RepoCollaboratorPermission",
+      "schema": {
+        "$ref": "#/definitions/RepoCollaboratorPermission"
+      }
+    },
+    "RepoIssueConfig": {
+      "description": "RepoIssueConfig",
+      "schema": {
+        "$ref": "#/definitions/IssueConfig"
+      }
+    },
+    "RepoIssueConfigValidation": {
+      "description": "RepoIssueConfigValidation",
+      "schema": {
+        "$ref": "#/definitions/IssueConfigValidation"
+      }
+    },
+    "RepoNewIssuePinsAllowed": {
+      "description": "RepoNewIssuePinsAllowed",
+      "schema": {
+        "$ref": "#/definitions/NewIssuePinsAllowed"
+      }
+    },
+    "Repository": {
+      "description": "Repository",
+      "schema": {
+        "$ref": "#/definitions/Repository"
+      }
+    },
+    "RepositoryList": {
+      "description": "RepositoryList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Repository"
+        }
+      }
+    },
+    "SearchResults": {
+      "description": "SearchResults",
+      "schema": {
+        "$ref": "#/definitions/SearchResults"
+      }
+    },
+    "Secret": {
+      "description": "Secret",
+      "schema": {
+        "$ref": "#/definitions/Secret"
+      }
+    },
+    "SecretList": {
+      "description": "SecretList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Secret"
+        }
+      }
+    },
+    "ServerVersion": {
+      "description": "ServerVersion",
+      "schema": {
+        "$ref": "#/definitions/ServerVersion"
+      }
+    },
+    "StopWatch": {
+      "description": "StopWatch",
+      "schema": {
+        "$ref": "#/definitions/StopWatch"
+      }
+    },
+    "StopWatchList": {
+      "description": "StopWatchList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/StopWatch"
+        }
+      }
+    },
+    "StringSlice": {
+      "description": "StringSlice",
+      "schema": {
+        "type": "array",
+        "items": {
+          "type": "string"
+        }
+      }
+    },
+    "Tag": {
+      "description": "Tag",
+      "schema": {
+        "$ref": "#/definitions/Tag"
+      }
+    },
+    "TagList": {
+      "description": "TagList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Tag"
+        }
+      }
+    },
+    "TagProtection": {
+      "description": "TagProtection",
+      "schema": {
+        "$ref": "#/definitions/TagProtection"
+      }
+    },
+    "TagProtectionList": {
+      "description": "TagProtectionList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/TagProtection"
+        }
+      }
+    },
+    "TasksList": {
+      "description": "TasksList",
+      "schema": {
+        "$ref": "#/definitions/ActionTaskResponse"
+      }
+    },
+    "Team": {
+      "description": "Team",
+      "schema": {
+        "$ref": "#/definitions/Team"
+      }
+    },
+    "TeamList": {
+      "description": "TeamList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/Team"
+        }
+      }
+    },
+    "TimelineList": {
+      "description": "TimelineList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/TimelineComment"
+        }
+      }
+    },
+    "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"
+        }
+      }
+    },
+    "UserSettings": {
+      "description": "UserSettings",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/UserSettings"
+        }
+      }
+    },
+    "VariableList": {
+      "description": "VariableList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/ActionVariable"
+        }
+      }
+    },
+    "WatchInfo": {
+      "description": "WatchInfo",
+      "schema": {
+        "$ref": "#/definitions/WatchInfo"
+      }
+    },
+    "WikiCommitList": {
+      "description": "WikiCommitList",
+      "schema": {
+        "$ref": "#/definitions/WikiCommitList"
+      }
+    },
+    "WikiPage": {
+      "description": "WikiPage",
+      "schema": {
+        "$ref": "#/definitions/WikiPage"
+      }
+    },
+    "WikiPageList": {
+      "description": "WikiPageList",
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/definitions/WikiPageMetaData"
+        }
+      }
+    },
+    "conflict": {
+      "description": "APIConflict is a conflict empty response"
+    },
+    "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"
+        }
+      }
+    },
+    "invalidTopicsError": {
+      "description": "APIInvalidTopicsError is error format response to invalid topics",
+      "headers": {
+        "invalidTopics": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        },
+        "message": {
+          "type": "string"
+        }
+      }
+    },
+    "notFound": {
+      "description": "APINotFound is a not found empty response"
+    },
+    "parameterBodies": {
+      "description": "parameterBodies",
+      "schema": {
+        "$ref": "#/definitions/UpdateVariableOption"
+      }
+    },
+    "redirect": {
+      "description": "APIRedirect is a redirect response"
+    },
+    "repoArchivedError": {
+      "description": "APIRepoArchivedError is an error that is raised when an archived repo should be modified",
+      "headers": {
+        "message": {
+          "type": "string"
+        },
+        "url": {
+          "type": "string"
+        }
+      }
+    },
+    "string": {
+      "description": "APIString is a string response",
+      "schema": {
+        "type": "string"
+      }
+    },
+    "validationError": {
+      "description": "APIValidationError is error format response related to input validation",
+      "headers": {
+        "message": {
+          "type": "string"
+        },
+        "url": {
+          "type": "string"
+        }
+      }
+    }
+  },
+  "securityDefinitions": {
+    "AccessToken": {
+      "description": "This authentication option is deprecated for removal in Gitea 1.23. Please use AuthorizationHeaderToken instead.",
+      "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"
+    },
+    "TOTPHeader": {
+      "description": "Must be used in combination with BasicAuth if two-factor authentication is enabled.",
+      "type": "apiKey",
+      "name": "X-GITEA-OTP",
+      "in": "header"
+    },
+    "Token": {
+      "description": "This authentication option is deprecated for removal in Gitea 1.23. Please use AuthorizationHeaderToken instead.",
+      "type": "apiKey",
+      "name": "token",
+      "in": "query"
+    }
+  },
+  "security": [
+    {
+      "BasicAuth": []
+    },
+    {
+      "Token": []
+    },
+    {
+      "AccessToken": []
+    },
+    {
+      "AuthorizationHeaderToken": []
+    },
+    {
+      "SudoParam": []
+    },
+    {
+      "SudoHeader": []
+    },
+    {
+      "TOTPHeader": []
+    }
+  ]
+}
diff --git a/user/auth/activate.tmpl b/user/auth/activate.tmpl
new file mode 100644
index 0000000..7f8ff0e
--- /dev/null
+++ b/user/auth/activate.tmpl
@@ -0,0 +1,40 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user activate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form ignore-dirty tw-max-w-2xl tw-m-auto" action="{{AppSubUrl}}/user/activate" method="post">
+				{{.CsrfTokenHtml}}
+				<h2 class="ui top attached header">
+					{{ctx.Locale.Tr "auth.active_your_account"}}
+				</h2>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					{{if .NeedVerifyLocalPassword}}
+						<div class="required field">
+							<label for="verify-password">{{ctx.Locale.Tr "password"}}</label>
+							<input id="verify-password" name="password" type="password" autocomplete="off" required>
+						</div>
+						<div class="inline field">
+							<button class="ui primary button">{{ctx.Locale.Tr "install.confirm_password"}}</button>
+						</div>
+						<input name="code" type="hidden" value="{{.ActivationCode}}">
+					{{else}}
+						<p>{{ctx.Locale.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email}}</p>
+						<details>
+							<summary>{{ctx.Locale.Tr "auth.change_unconfirmed_mail_address"}}</summary>
+							<div class="tw-py-2">
+								<label for="change-email">{{ctx.Locale.Tr "email"}}</label>
+								<input id="change-email" name="change_email" type="email" value="{{.SignedUser.Email}}">
+							</div>
+						</details>
+						<div class="divider"></div>
+						<div class="text">
+							<button class="ui primary button">{{ctx.Locale.Tr "auth.resend_mail"}}</button>
+						</div>
+					{{end}}
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/activate_prompt.tmpl b/user/auth/activate_prompt.tmpl
new file mode 100644
index 0000000..237244d
--- /dev/null
+++ b/user/auth/activate_prompt.tmpl
@@ -0,0 +1,15 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user activate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<h2 class="ui top attached header">
+				{{ctx.Locale.Tr "auth.active_your_account"}}
+			</h2>
+			<div class="ui attached segment">
+				{{template "base/alert" .}}
+				<p>{{.ActivationPromptMessage}}</p>
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/captcha.tmpl b/user/auth/captcha.tmpl
new file mode 100644
index 0000000..8dd4d1c
--- /dev/null
+++ b/user/auth/captcha.tmpl
@@ -0,0 +1,29 @@
+{{if .EnableCaptcha}}{{if eq .CaptchaType "image"}}
+	<div class="inline field tw-text-center">
+		{{.Captcha.CreateHTML}}
+	</div>
+	<div class="required field {{if .Err_Captcha}}error{{end}}">
+		<label for="captcha">{{ctx.Locale.Tr "captcha"}}</label>
+		<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
+	</div>
+{{else if eq .CaptchaType "recaptcha"}}
+	<div class="inline field tw-text-center required">
+		<div id="captcha" data-captcha-type="g-recaptcha" class="g-recaptcha-style" data-sitekey="{{.RecaptchaSitekey}}"></div>
+	</div>
+	<script src='{{URLJoin .RecaptchaURL "api.js"}}'></script>
+{{else if eq .CaptchaType "hcaptcha"}}
+	<div class="inline field tw-text-center required">
+		<div id="captcha" data-captcha-type="h-captcha" class="h-captcha-style" data-sitekey="{{.HcaptchaSitekey}}"></div>
+	</div>
+	<script src='https://hcaptcha.com/1/api.js'></script>
+{{else if eq .CaptchaType "mcaptcha"}}
+	<div class="inline field tw-text-center">
+		<div class="m-captcha-style" id="mcaptcha__widget-container"></div>
+		<div id="captcha" data-captcha-type="m-captcha" data-sitekey="{{.McaptchaSitekey}}" data-instance-url="{{.McaptchaURL}}"></div>
+	</div>
+{{else if eq .CaptchaType "cfturnstile"}}
+	<div class="inline field tw-text-center">
+		<div id="captcha" data-captcha-type="cf-turnstile" data-sitekey="{{.CfTurnstileSitekey}}"></div>
+	</div>
+	<script src='https://challenges.cloudflare.com/turnstile/v0/api.js'></script>
+{{end}}{{end}}
diff --git a/user/auth/change_passwd.tmpl b/user/auth/change_passwd.tmpl
new file mode 100644
index 0000000..e05f46f
--- /dev/null
+++ b/user/auth/change_passwd.tmpl
@@ -0,0 +1,7 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signin{{if .LinkAccountMode}} icon{{end}}">
+	<div class="ui container">
+		{{template "user/auth/change_passwd_inner" .}}
+	</div>
+</div>
+{{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..01bbf50
--- /dev/null
+++ b/user/auth/change_passwd_inner.tmpl
@@ -0,0 +1,22 @@
+		{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}}
+		{{template "base/alert" .}}
+		{{end}}
+		<h4 class="ui top attached header center">
+			{{ctx.Locale.Tr "settings.change_password"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form tw-max-w-2xl tw-m-auto" action="{{.ChangePasscodeLink}}" method="post">
+			{{.CsrfTokenHtml}}
+			<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
+				<label for="password">{{ctx.Locale.Tr "password"}}</label>
+				<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
+			</div>
+			<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
+				<label for="retype">{{ctx.Locale.Tr "re_type"}}</label>
+				<input id="retype" name="retype" type="password" autocomplete="new-password" required>
+			</div>
+			<div class="inline field">
+				<button class="ui primary button">{{ctx.Locale.Tr "settings.change_password"}}</button>
+			</div>
+			</form>
+		</div>
diff --git a/user/auth/finalize_openid.tmpl b/user/auth/finalize_openid.tmpl
new file mode 100644
index 0000000..1c1dcdb
--- /dev/null
+++ b/user/auth/finalize_openid.tmpl
@@ -0,0 +1,47 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signin">
+	<div class="ui container">
+		<div class="ui grid">
+			{{template "user/auth/finalize_openid_navbar" .}}
+			<div class="twelve wide column content">
+				{{template "base/alert" .}}
+				<h4 class="ui top attached header">
+					{{ctx.Locale.Tr "auth.login_userpass"}}
+				</h4>
+				<div class="ui attached segment">
+					<form class="ui form" action="{{.Link}}" method="post">
+					{{.CsrfTokenHtml}}
+					<div class="required inline field {{if .Err_UserName}}error{{end}}">
+						<label for="user_name">{{ctx.Locale.Tr "home.uname_holder"}}</label>
+						<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
+					</div>
+					<div class="required inline field {{if .Err_Password}}error{{end}}">
+						<label for="password">{{ctx.Locale.Tr "password"}}</label>
+						<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
+					</div>
+					<div class="inline field">
+						<label></label>
+						<div class="ui checkbox">
+							<label>{{ctx.Locale.Tr "auth.remember_me"}}</label>
+							<input name="remember" type="checkbox">
+						</div>
+					</div>
+
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">{{ctx.Locale.Tr "sign_in"}}</button>
+						<a href="{{AppSubUrl}}/user/forget_password">{{ctx.Locale.Tr "auth.forget_password"}}</a>
+					</div>
+					{{if .ShowRegistrationButton}}
+						<div class="inline field">
+							<label></label>
+							<a href="{{AppSubUrl}}/user/sign_up">{{ctx.Locale.Tr "auth.sign_up_now"}}</a>
+						</div>
+					{{end}}
+					</form>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/forgot_passwd.tmpl b/user/auth/forgot_passwd.tmpl
new file mode 100644
index 0000000..55bcf63
--- /dev/null
+++ b/user/auth/forgot_passwd.tmpl
@@ -0,0 +1,39 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user forgot password">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form ignore-dirty" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h2 class="ui top attached header">
+					{{ctx.Locale.Tr "auth.forgot_password_title"}}
+				</h2>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					{{if .IsResetSent}}
+						<p>{{ctx.Locale.Tr "auth.reset_password_mail_sent_prompt" .Email .ResetPwdCodeLives}}</p>
+					{{else if .IsResetRequest}}
+						<div class="required field {{if .Err_Email}}error{{end}}">
+							<label for="email">{{ctx.Locale.Tr "email"}}</label>
+							<input id="email" name="email" type="email"  value="{{.Email}}" autofocus required>
+						</div>
+						<div class="divider"></div>
+						<div class="inline field">
+							<button class="ui primary button">{{ctx.Locale.Tr "auth.send_reset_mail"}}</button>
+						</div>
+					{{else if .IsResetDisable}}
+						<p class="center">
+							{{if $.IsAdmin}}
+								{{ctx.Locale.Tr "auth.disable_forgot_password_mail_admin"}}
+							{{else}}
+								{{ctx.Locale.Tr "auth.disable_forgot_password_mail"}}
+							{{end}}
+						</p>
+					{{else if .ResendLimited}}
+						<p class="center">{{ctx.Locale.Tr "auth.resent_limit_prompt"}}</p>
+					{{end}}
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/grant.tmpl b/user/auth/grant.tmpl
new file mode 100644
index 0000000..4031dd7
--- /dev/null
+++ b/user/auth/grant.tmpl
@@ -0,0 +1,36 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content ui one column stackable center aligned page grid oauth2-authorize-application-box">
+	<div class="column seven wide">
+		<div class="ui middle centered raised segments">
+			<h3 class="ui top attached header">
+				{{ctx.Locale.Tr "auth.authorize_title" .Application.Name}}
+			</h3>
+			<div class="ui attached segment">
+				{{template "base/alert" .}}
+				<p>
+					{{if not .AdditionalScopes}}
+					<b>{{ctx.Locale.Tr "auth.authorize_application_description"}}</b><br>
+					{{end}}
+					{{ctx.Locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML}}<br>
+					{{ctx.Locale.Tr "auth.authorize_application_with_scopes" (HTMLFormat "<b>%s</b>" .Scope)}}
+				</p>
+			</div>
+			<div class="ui attached segment">
+				<p>{{ctx.Locale.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML}}</p>
+			</div>
+			<div class="ui attached segment">
+				<form method="post" action="{{AppSubUrl}}/login/oauth/grant">
+					{{.CsrfTokenHtml}}
+					<input type="hidden" name="client_id" value="{{.Application.ClientID}}">
+					<input type="hidden" name="state" value="{{.State}}">
+					<input type="hidden" name="scope" value="{{.Scope}}">
+					<input type="hidden" name="nonce" value="{{.Nonce}}">
+					<input type="hidden" name="redirect_uri" value="{{.RedirectURI}}">
+					<button type="submit" id="authorize-app" name="granted" value="true" class="ui red inline button">{{ctx.Locale.Tr "auth.authorize_application"}}</button>
+					<button type="submit" name="granted" value="false" class="ui basic primary inline button">{{ctx.Locale.Tr "cancel"}}</button>
+				</form>
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/grant_error.tmpl b/user/auth/grant_error.tmpl
new file mode 100644
index 0000000..b2e0779
--- /dev/null
+++ b/user/auth/grant_error.tmpl
@@ -0,0 +1,16 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content ui one column stackable center aligned page grid oauth2-authorize-application-box {{if .IsRepo}}repository{{end}}">
+	{{if .IsRepo}}{{template "repo/header" .}}{{end}}
+	<div class="column seven wide">
+		<div class="ui middle centered raised segments">
+			<h1 class="ui top attached header">
+				{{ctx.Locale.Tr "auth.authorization_failed"}}
+			</h1>
+			<h3 class="ui attached segment">{{.Error.ErrorDescription}}</h3>
+			<div class="ui attached segment">
+				<p>{{ctx.Locale.Tr "auth.authorization_failed_desc"}}</p>
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/link_account.tmpl b/user/auth/link_account.tmpl
new file mode 100644
index 0000000..d244ce3
--- /dev/null
+++ b/user/auth/link_account.tmpl
@@ -0,0 +1,36 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user link-account">
+	<overflow-menu class="ui secondary pointing tabular top attached borderless menu secondary-nav">
+		<div class="overflow-menu-items tw-justify-center">
+			<!-- TODO handle .ShowRegistrationButton once other login bugs are fixed -->
+			{{if not .AllowOnlyInternalRegistration}}
+				<a class="item {{if not .user_exists}}active{{end}}"
+					data-tab="auth-link-signup-tab">
+					{{ctx.Locale.Tr "auth.oauth_signup_tab"}}
+				</a>
+			{{end}}
+			<a class="item {{if .user_exists}}active{{end}}"
+				data-tab="auth-link-signin-tab">
+				{{ctx.Locale.Tr "auth.oauth_signin_tab"}}
+			</a>
+		</div>
+	</overflow-menu>
+	<div class="ui middle very relaxed page grid">
+		<div class="column tw-my-5">
+			{{/* these styles are quite tricky but it needs to be the same as the signin page */}}
+			<div class="ui tab {{if not .user_exists}}active{{end}}" data-tab="auth-link-signup-tab">
+				<div class="tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
+				{{if .AutoRegistrationFailedPrompt}}<div class="ui message">{{.AutoRegistrationFailedPrompt}}</div>{{end}}
+				{{template "user/auth/signup_inner" .}}
+				</div>
+			</div>
+			<div class="ui tab {{if .user_exists}}active{{end}}" data-tab="auth-link-signin-tab">
+				<div class="tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
+				{{template "user/auth/signin_inner" .}}
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+
+{{template "base/footer" .}}
diff --git a/user/auth/oauth_container.tmpl b/user/auth/oauth_container.tmpl
new file mode 100644
index 0000000..d01aaef
--- /dev/null
+++ b/user/auth/oauth_container.tmpl
@@ -0,0 +1,24 @@
+<div id="oauth2-login-navigator" class="tw-py-1">
+	<div class="tw-flex tw-flex-col tw-justify-center">
+		<div id="oauth2-login-navigator-inner" class="tw-flex tw-flex-col tw-flex-wrap tw-items-center tw-gap-2">
+			{{range $provider := .OAuth2Providers}}
+				<a class="{{$provider.Name}} ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}">
+					{{$provider.IconHTML 28}}
+					{{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}}
+				</a>
+			{{end}}
+			{{if .EnableOpenIDSignIn}}
+				<a class="openid ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full" href="{{AppSubUrl}}/user/login/openid">
+				{{svg "fontawesome-openid" 28 "tw-mr-2"}}
+				{{ctx.Locale.Tr "sign_in_with_provider" "OpenID"}}
+				</a>
+			{{end}}
+			{{if .EnableSSPI}}
+				<a class="ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full" rel="nofollow" href="{{AppSubUrl}}/user/login?auth_with_sspi=1">
+					{{svg "fontawesome-windows"}}
+					&nbsp;SSPI
+				</a>
+			{{end}}
+		</div>
+	</div>
+</div>
diff --git a/user/auth/oidc_wellknown.tmpl b/user/auth/oidc_wellknown.tmpl
new file mode 100644
index 0000000..54bb4a7
--- /dev/null
+++ b/user/auth/oidc_wellknown.tmpl
@@ -0,0 +1,49 @@
+{
+    "issuer": "{{AppUrl | JSEscape}}",
+    "authorization_endpoint": "{{AppUrl | JSEscape}}login/oauth/authorize",
+    "token_endpoint": "{{AppUrl | JSEscape}}login/oauth/access_token",
+    "jwks_uri": "{{AppUrl | JSEscape}}login/oauth/keys",
+    "userinfo_endpoint": "{{AppUrl | JSEscape}}login/oauth/userinfo",
+    "introspection_endpoint": "{{AppUrl | JSEscape}}login/oauth/introspect",
+    "response_types_supported": [
+        "code",
+        "id_token"
+    ],
+    "id_token_signing_alg_values_supported": [
+        "{{.SigningKey.SigningMethod.Alg | JSEscape}}"
+    ],
+    "subject_types_supported": [
+        "public"
+    ],
+    "scopes_supported": [
+        "openid",
+        "profile",
+        "email",
+        "groups"
+    ],
+    "claims_supported": [
+        "aud",
+        "exp",
+        "iat",
+        "iss",
+        "sub",
+        "name",
+        "preferred_username",
+        "profile",
+        "picture",
+        "website",
+        "locale",
+        "updated_at",
+        "email",
+        "email_verified",
+        "groups"
+    ],
+    "code_challenge_methods_supported": [
+        "plain",
+        "S256"
+    ],
+    "grant_types_supported": [
+        "authorization_code",
+        "refresh_token"
+    ]
+}
diff --git a/user/auth/prohibit_login.tmpl b/user/auth/prohibit_login.tmpl
new file mode 100644
index 0000000..962ddfa
--- /dev/null
+++ b/user/auth/prohibit_login.tmpl
@@ -0,0 +1,16 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user activate">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form tw-max-w-2xl tw-m-auto">
+				<h2 class="ui top attached header">
+					{{ctx.Locale.Tr "auth.prohibit_login"}}
+				</h2>
+				<div class="ui attached segment">
+					<p>{{ctx.Locale.Tr "auth.prohibit_login_desc"}}</p>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/reset_passwd.tmpl b/user/auth/reset_passwd.tmpl
new file mode 100644
index 0000000..f8303fe
--- /dev/null
+++ b/user/auth/reset_passwd.tmpl
@@ -0,0 +1,65 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user reset password">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form ignore-dirty" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<input name="code" type="hidden" value="{{.Code}}">
+				<h2 class="ui top attached header">
+					{{ctx.Locale.Tr "auth.reset_password"}}
+				</h2>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					{{if .user_email}}
+						<div class="inline field">
+							<label for="user_name">{{ctx.Locale.Tr "email"}}</label>
+							<input id="user_name" type="text" value="{{.user_email}}" disabled>
+						</div>
+					{{end}}
+					{{if .IsResetForm}}
+						<div class="required field {{if .Err_Password}}error{{end}}">
+							<label for="password">{{ctx.Locale.Tr "settings.new_password"}}</label>
+							<input id="password" name="password" type="password"  value="{{.password}}" autocomplete="new-password" autofocus required>
+						</div>
+						{{if not .user_signed_in}}
+						<div class="inline field">
+							<div class="ui checkbox">
+								<label>{{ctx.Locale.Tr "auth.remember_me"}}</label>
+								<input name="remember" type="checkbox">
+							</div>
+						</div>
+						{{end}}
+						{{if .has_two_factor}}
+						<h4 class="ui dividing header">
+							{{ctx.Locale.Tr "twofa"}}
+						</h4>
+						<div class="ui warning visible message">{{ctx.Locale.Tr "settings.twofa_is_enrolled"}}</div>
+						{{if .scratch_code}}
+						<div class="required inline field {{if .Err_Token}}error{{end}}">
+							<label for="token">{{ctx.Locale.Tr "auth.scratch_code"}}</label>
+							<input id="token" name="token" type="text" autocomplete="off" autofocus required>
+						</div>
+						<input type="hidden" name="scratch_code" value="true">
+						{{else}}
+						<div class="required field {{if .Err_Passcode}}error{{end}}">
+							<label for="passcode">{{ctx.Locale.Tr "passcode"}}</label>
+							<input id="passcode" name="passcode" type="number" autocomplete="off" autofocus required>
+						</div>
+						{{end}}
+						{{end}}
+						<div class="divider"></div>
+						<div class="inline field">
+							<button class="ui primary button">{{ctx.Locale.Tr "auth.reset_password_helper"}}</button>
+							{{if and .has_two_factor (not .scratch_code)}}
+								<a href="?code={{.Code}}&scratch_code=true">{{ctx.Locale.Tr "auth.use_scratch_code"}}</a>
+							{{end}}
+						</div>
+					{{else}}
+						<p class="center">{{ctx.Locale.Tr "auth.invalid_code_forgot_password" (printf "%s/user/forgot_password" AppSubUrl)}}</p>
+					{{end}}
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/signin.tmpl b/user/auth/signin.tmpl
new file mode 100644
index 0000000..75e1bb2
--- /dev/null
+++ b/user/auth/signin.tmpl
@@ -0,0 +1,10 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signin{{if .LinkAccountMode}} icon{{end}}">
+	<div class="ui middle very relaxed page grid">
+		{{/* these styles are quite tricky and should also apply to the signup and link_account pages */}}
+		<div class="column tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
+			{{template "user/auth/signin_inner" .}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/signin_inner.tmpl b/user/auth/signin_inner.tmpl
new file mode 100644
index 0000000..28a85dd
--- /dev/null
+++ b/user/auth/signin_inner.tmpl
@@ -0,0 +1,78 @@
+<div class="ui container fluid">
+	{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}}
+	{{template "base/alert" .}}
+	{{end}}
+	<h4 class="ui top attached header center">
+		{{if .LinkAccountMode}}
+			{{ctx.Locale.Tr "auth.oauth_signin_title"}}
+		{{else}}
+			{{ctx.Locale.Tr "auth.login_userpass"}}
+		{{end}}
+	</h4>
+	<div class="ui attached segment">
+		{{if .EnablePasswordSignInForm}}
+		<form class="ui form" action="{{.SignInLink}}" method="post">
+			{{.CsrfTokenHtml}}
+			<div class="required field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
+				<label for="user_name">{{ctx.Locale.Tr "home.uname_holder"}}</label>
+				<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required tabindex="1">
+			</div>
+			{{if or (not .DisablePassword) .LinkAccountMode}}
+			<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}} form-field-content-aside-label">
+				<label for="password">{{ctx.Locale.Tr "password"}}</label>
+				<div>
+					<a href="{{AppSubUrl}}/user/forgot_password" tabindex="4">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
+				</div>
+				<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required tabindex="2">
+			</div>
+			{{end}}
+			{{if not .LinkAccountMode}}
+			<div class="inline field">
+				<div class="ui checkbox">
+					<label>{{ctx.Locale.Tr "auth.remember_me"}}</label>
+					<input name="remember" type="checkbox" tabindex="5">
+				</div>
+			</div>
+			{{end}}
+
+			{{template "user/auth/captcha" .}}
+
+			<div class="field">
+				<button class="ui primary button tw-w-full" tabindex="3">
+					{{if .LinkAccountMode}}
+						{{ctx.Locale.Tr "auth.oauth_signin_submit"}}
+					{{else}}
+						{{ctx.Locale.Tr "sign_in"}}
+					{{end}}
+				</button>
+			</div>
+		</form>
+		{{end}}{{/*if .EnablePasswordSignInForm*/}}
+		{{/* "oauth_container" contains not only "oauth2" methods, but also "OIDC" and "SSPI" methods */}}
+		{{$showOAuth2Methods := or .OAuth2Providers .EnableOpenIDSignIn .EnableSSPI}}
+		{{if and $showOAuth2Methods .EnablePasswordSignInForm}}
+			<div class="divider divider-text">{{ctx.Locale.Tr "sign_in_or"}}</div>
+		{{end}}
+		{{if $showOAuth2Methods}}
+			{{template "user/auth/oauth_container" .}}
+		{{end}}
+	</div>
+</div>
+
+{{if or .EnablePasskeyAuth .ShowRegistrationButton}}
+<div class="ui container fluid">
+	<div class="ui attached segment header top tw-max-w-2xl tw-m-auto tw-flex tw-flex-col tw-items-center">
+		{{if .EnablePasskeyAuth}}
+			{{template "user/auth/webauthn_error" .}}
+			<a class="signin-passkey">{{ctx.Locale.Tr "auth.signin_passkey"}}</a>
+		{{end}}
+
+		{{if .ShowRegistrationButton}}
+			<div class="field">
+				<span>{{ctx.Locale.Tr "auth.need_account"}}</span>
+				<a href="{{AppSubUrl}}/user/sign_up">{{ctx.Locale.Tr "auth.sign_up_now"}}</a>
+			</div>
+		{{end}}
+	</div>
+</div>
+{{end}}
diff --git a/user/auth/signin_openid.tmpl b/user/auth/signin_openid.tmpl
new file mode 100644
index 0000000..20c7bdc
--- /dev/null
+++ b/user/auth/signin_openid.tmpl
@@ -0,0 +1,51 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signin openid">
+	<div class="ui middle very relaxed page grid">
+		<div class="column tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
+			<a href="{{AppSubUrl}}/user/login" class="tw-mx-auto">
+				<img width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
+			</a>
+
+			<div class="ui container fluid">
+				{{template "base/alert" .}}
+				<h4 class="ui top attached header center">
+					{{svg "fontawesome-openid"}}
+					OpenID
+				</h4>
+				<div class="ui attached segment">
+					<form class="ui form tw-m-auto" action="{{.Link}}" method="post">
+						{{.CsrfTokenHtml}}
+						<div class="inline field">
+							{{ctx.Locale.Tr "auth.openid_signin_desc"}}
+						</div>
+						<div class="required field {{if .Err_OpenID}}error{{end}}">
+							<label for="openid">
+							{{svg "fontawesome-openid"}}
+							OpenID URI
+							</label>
+							<input id="openid" name="openid" value="{{.openid}}" autofocus required>
+						</div>
+						<div class="inline field">
+							<div class="ui checkbox">
+								<label>{{ctx.Locale.Tr "auth.remember_me"}}</label>
+								<input name="remember" type="checkbox">
+							</div>
+						</div>
+						<div class="inline field">
+							<button class="ui primary button tw-w-full">{{ctx.Locale.Tr "sign_in"}}</button>
+						</div>
+					</form>
+				</div>
+			</div>
+
+			<div class="ui container fluid">
+				{{template "user/auth/webauthn_error" .}}
+
+				<div class="ui attached segment header top tw-flex tw-flex-col tw-items-center">
+					<a href="{{AppSubUrl}}/user/login">{{ctx.Locale.Tr "auth.back_to_sign_in"}}</a>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/signup.tmpl b/user/auth/signup.tmpl
new file mode 100644
index 0000000..1ce3934
--- /dev/null
+++ b/user/auth/signup.tmpl
@@ -0,0 +1,9 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signin{{if .LinkAccountMode}} icon{{end}}">
+	<div class="ui middle very relaxed page grid">
+		<div class="column tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
+			{{template "user/auth/signup_inner" .}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/signup_inner.tmpl b/user/auth/signup_inner.tmpl
new file mode 100644
index 0000000..d665681
--- /dev/null
+++ b/user/auth/signup_inner.tmpl
@@ -0,0 +1,70 @@
+<div class="ui container fluid{{if .LinkAccountMode}} icon{{end}}">
+	<h4 class="ui top attached header center">
+		{{if .LinkAccountMode}}
+			{{ctx.Locale.Tr "auth.oauth_signup_title"}}
+		{{else}}
+			{{ctx.Locale.Tr "sign_up"}}
+		{{end}}
+	</h4>
+	<div class="ui attached segment">
+		<form class="ui form" action="{{.SignUpLink}}" method="post">
+			{{.CsrfTokenHtml}}
+			{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}}
+			{{template "base/alert" .}}
+			{{end}}
+			{{if .DisableRegistration}}
+				<p>{{ctx.Locale.Tr "auth.disable_register_prompt"}}</p>
+			{{else}}
+				<div class="required field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
+					<label for="user_name">{{ctx.Locale.Tr "username"}}</label>
+					<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
+				</div>
+				<div class="required field {{if .Err_Email}}error{{end}}">
+					<label for="email">{{ctx.Locale.Tr "email"}}</label>
+					<input id="email" name="email" type="email" value="{{.email}}" required>
+				</div>
+
+				{{if not .DisablePassword}}
+					<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
+						<label for="password">{{ctx.Locale.Tr "password"}}</label>
+						<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
+					</div>
+					<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
+						<label for="retype">{{ctx.Locale.Tr "re_type"}}</label>
+						<input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="new-password" required>
+					</div>
+				{{end}}
+
+				{{template "user/auth/captcha" .}}
+
+				<div class="inline field">
+					<button class="ui primary button tw-w-full">
+						{{if .LinkAccountMode}}
+							{{ctx.Locale.Tr "auth.oauth_signup_submit"}}
+						{{else}}
+							{{ctx.Locale.Tr "auth.create_new_account"}}
+						{{end}}
+					</button>
+				</div>
+			{{end}}
+			{{/* "oauth_container" contains not only "oauth2" methods, but also "OIDC" and "SSPI" methods */}}
+			{{/* TODO: it seems that "EnableSSPI" is only set in "sign-in" handlers, but it should use the same logic to control its display */}}
+			{{$showOAuth2Methods := or .OAuth2Providers .EnableOpenIDSignIn .EnableSSPI}}
+			{{if $showOAuth2Methods}}
+				<div class="divider divider-text">{{ctx.Locale.Tr "sign_in_or"}}</div>
+				{{template "user/auth/oauth_container" .}}
+			{{end}}
+		</form>
+	</div>
+</div>
+
+<div class="ui container fluid">
+	{{if not .LinkAccountMode}}
+	<div class="ui attached segment header top tw-flex tw-flex-col tw-items-center">
+		<div class="field">
+			<span>{{ctx.Locale.Tr "auth.already_have_account"}}</span>
+			<a href="{{AppSubUrl}}/user/login">{{ctx.Locale.Tr "auth.sign_in_now"}}</a>
+		</div>
+	</div>
+	{{end}}
+</div>
diff --git a/user/auth/signup_openid_connect.tmpl b/user/auth/signup_openid_connect.tmpl
new file mode 100644
index 0000000..e4b7936
--- /dev/null
+++ b/user/auth/signup_openid_connect.tmpl
@@ -0,0 +1,36 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signup">
+	{{template "user/auth/signup_openid_navbar" .}}
+	<div class="ui container">
+				{{template "base/alert" .}}
+				<h4 class="ui top attached header">
+					{{ctx.Locale.Tr "auth.openid_connect_title"}}
+				</h4>
+				<div class="ui attached segment">
+					<p>
+						{{ctx.Locale.Tr "auth.openid_connect_desc"}}
+					</p>
+					<form class="ui form" action="{{.Link}}" method="post">
+					{{.CsrfTokenHtml}}
+					<div class="required inline field {{if .Err_UserName}}error{{end}}">
+						<label for="user_name">{{ctx.Locale.Tr "home.uname_holder"}}</label>
+						<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
+					</div>
+					<div class="required inline field {{if .Err_Password}}error{{end}}">
+						<label for="password">{{ctx.Locale.Tr "password"}}</label>
+						<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
+					</div>
+					<div class="inline field">
+						<label for="openid">OpenID URI</label>
+						<input id="openid" value="{{.OpenID}}" readonly>
+					</div>
+					<div class="inline field">
+						<label></label>
+						<button class="ui primary button">{{ctx.Locale.Tr "auth.openid_connect_submit"}}</button>
+						<a href="{{AppSubUrl}}/user/forgot_password">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
+					</div>
+					</form>
+				</div>
+	</div>
+</div>
+{{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..89068dd
--- /dev/null
+++ b/user/auth/signup_openid_navbar.tmpl
@@ -0,0 +1,12 @@
+<overflow-menu class="ui secondary pointing tabular top attached borderless menu secondary-nav">
+	<div class="overflow-menu-items tw-justify-center">
+		<a class="{{if .PageIsOpenIDConnect}}active {{end}}item" href="{{AppSubUrl}}/user/openid/connect">
+			{{ctx.Locale.Tr "auth.openid_connect_title"}}
+		</a>
+		{{if and .EnableOpenIDSignUp (not .AllowOnlyInternalRegistration)}}
+			<a class="{{if .PageIsOpenIDRegister}}active {{end}}item" href="{{AppSubUrl}}/user/openid/register">
+				{{ctx.Locale.Tr "auth.openid_register_title"}}
+			</a>
+		{{end}}
+	</div>
+</overflow-menu>
diff --git a/user/auth/signup_openid_register.tmpl b/user/auth/signup_openid_register.tmpl
new file mode 100644
index 0000000..c017a0e
--- /dev/null
+++ b/user/auth/signup_openid_register.tmpl
@@ -0,0 +1,37 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signup">
+	{{template "user/auth/signup_openid_navbar" .}}
+	<div class="ui container">
+				{{template "base/alert" .}}
+				<h4 class="ui top attached header">
+					{{ctx.Locale.Tr "auth.openid_register_title"}}
+				</h4>
+				<div class="ui attached segment">
+					<p class="tw-max-w-2xl tw-mx-auto">
+						{{ctx.Locale.Tr "auth.openid_register_desc"}}
+					</p>
+					<form class="ui form" action="{{.Link}}" method="post">
+					{{.CsrfTokenHtml}}
+					<div class="required field {{if .Err_UserName}}error{{end}}">
+						<label for="user_name">{{ctx.Locale.Tr "username"}}</label>
+						<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
+					</div>
+					<div class="required field {{if .Err_Email}}error{{end}}">
+						<label for="email">{{ctx.Locale.Tr "email"}}</label>
+						<input id="email" name="email" type="email" value="{{.email}}" required>
+					</div>
+
+					{{template "user/auth/captcha" .}}
+
+					<div class="field">
+						<label for="openid">OpenID URI</label>
+						<input id="openid" value="{{.OpenID}}" readonly>
+					</div>
+					<div class="inline field">
+						<button class="ui primary button">{{ctx.Locale.Tr "auth.create_new_account"}}</button>
+					</div>
+					</form>
+				</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/twofa.tmpl b/user/auth/twofa.tmpl
new file mode 100644
index 0000000..d245239
--- /dev/null
+++ b/user/auth/twofa.tmpl
@@ -0,0 +1,26 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signin">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form tw-max-w-2xl tw-m-auto" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "twofa"}}
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="required field">
+						<label for="passcode">{{ctx.Locale.Tr "passcode"}}</label>
+						<input id="passcode" name="passcode" type="text" autocomplete="one-time-code" inputmode="numeric" pattern="[0-9]*" autofocus required>
+					</div>
+
+					<div class="inline field">
+						<button class="ui primary button">{{ctx.Locale.Tr "auth.verify"}}</button>
+						<a href="{{AppSubUrl}}/user/two_factor/scratch">{{ctx.Locale.Tr "auth.use_scratch_code"}}</a>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/twofa_scratch.tmpl b/user/auth/twofa_scratch.tmpl
new file mode 100644
index 0000000..23ad77f
--- /dev/null
+++ b/user/auth/twofa_scratch.tmpl
@@ -0,0 +1,25 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signin">
+	<div class="ui middle very relaxed page grid">
+		<div class="column">
+			<form class="ui form tw-max-w-2xl tw-m-auto" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<h3 class="ui top attached header">
+					{{ctx.Locale.Tr "twofa_scratch"}}
+				</h3>
+				<div class="ui attached segment">
+					{{template "base/alert" .}}
+					<div class="required field">
+						<label for="token">{{ctx.Locale.Tr "auth.scratch_code"}}</label>
+						<input id="token" name="token" type="text" autocomplete="off" autofocus required>
+					</div>
+
+					<div class="inline field">
+						<button class="ui primary button">{{ctx.Locale.Tr "auth.verify"}}</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/webauthn.tmpl b/user/auth/webauthn.tmpl
new file mode 100644
index 0000000..1b84765
--- /dev/null
+++ b/user/auth/webauthn.tmpl
@@ -0,0 +1,25 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user signin webauthn-prompt">
+	<div class="ui page grid">
+		<div class="column center aligned">
+			{{template "user/auth/webauthn_error" .}}
+			<h3 class="ui top attached header">{{ctx.Locale.Tr "twofa"}}</h3>
+			<div class="ui attached segment">
+				{{svg "octicon-key" 56}}
+				<h3>{{ctx.Locale.Tr "webauthn_insert_key"}}</h3>
+				{{template "base/alert" .}}
+				<p>{{ctx.Locale.Tr "webauthn_sign_in"}}</p>
+			</div>
+			<div class="ui attached segment tw-flex tw-items-center tw-justify-center tw-gap-1 tw-py-2">
+				<div class="is-loading tw-w-[40px] tw-h-[40px]"></div>
+				{{ctx.Locale.Tr "webauthn_press_button"}}
+			</div>
+			{{if .HasTwoFactor}}
+				<div class="ui attached segment">
+					<a href="{{AppSubUrl}}/user/two_factor">{{ctx.Locale.Tr "webauthn_use_twofa"}}</a>
+				</div>
+			{{end}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/auth/webauthn_error.tmpl b/user/auth/webauthn_error.tmpl
new file mode 100644
index 0000000..511ff7c
--- /dev/null
+++ b/user/auth/webauthn_error.tmpl
@@ -0,0 +1,13 @@
+<div id="webauthn-error" class="ui negative message tw-hidden">
+	<div class="header">{{ctx.Locale.Tr "webauthn_error"}}</div>
+	<div id="webauthn-error-msg" class="tw-pt-2"></div>
+	<div class="tw-hidden">
+		<div data-webauthn-error-msg="browser">{{ctx.Locale.Tr "webauthn_unsupported_browser"}}</div>
+		<div data-webauthn-error-msg="unknown">{{ctx.Locale.Tr "webauthn_error_unknown"}}</div>
+		<div data-webauthn-error-msg="insecure">{{ctx.Locale.Tr "webauthn_error_insecure"}}</div>
+		<div data-webauthn-error-msg="unable-to-process">{{ctx.Locale.Tr "webauthn_error_unable_to_process"}}</div>
+		<div data-webauthn-error-msg="duplicated">{{ctx.Locale.Tr "webauthn_error_duplicated"}}</div>
+		<div data-webauthn-error-msg="empty">{{ctx.Locale.Tr "webauthn_error_empty"}}</div>
+		<div data-webauthn-error-msg="timeout">{{ctx.Locale.Tr "webauthn_error_timeout"}}</div>
+	</div>
+</div>
diff --git a/user/code.tmpl b/user/code.tmpl
new file mode 100644
index 0000000..ff6c69d
--- /dev/null
+++ b/user/code.tmpl
@@ -0,0 +1,24 @@
+{{template "base/head" .}}
+{{if .ContextUser.IsOrganization}}
+	<div role="main" aria-label="{{.Title}}" class="page-content organization code">
+		{{template "org/header" .}}
+		<div class="ui container">
+			{{template "shared/search/code/search" .}}
+		</div>
+	</div>
+{{else}}
+	<div role="main" aria-label="{{.Title}}" class="page-content user profile">
+		<div class="ui container">
+			<div class="ui stackable grid">
+				<div class="ui four wide column">
+					{{template "shared/user/profile_big_avatar" .}}
+				</div>
+				<div class="ui twelve wide column">
+					{{template "user/overview/header" .}}
+					{{template "shared/search/code/search" .}}
+				</div>
+			</div>
+		</div>
+	</div>
+{{end}}
+{{template "base/footer" .}}
diff --git a/user/dashboard/dashboard.tmpl b/user/dashboard/dashboard.tmpl
new file mode 100644
index 0000000..5dc46dc
--- /dev/null
+++ b/user/dashboard/dashboard.tmpl
@@ -0,0 +1,13 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content dashboard feeds">
+	{{template "user/dashboard/navbar" .}}
+	<div class="ui container flex-container">
+		<div class="flex-container-main">
+			{{template "base/alert" .}}
+			{{template "user/heatmap" .}}
+			{{template "user/dashboard/feeds" .}}
+		</div>
+		{{template "user/dashboard/repolist" .}}
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/dashboard/feeds.tmpl b/user/dashboard/feeds.tmpl
new file mode 100644
index 0000000..739be58
--- /dev/null
+++ b/user/dashboard/feeds.tmpl
@@ -0,0 +1,130 @@
+<div id="activity-feed" class="flex-list">
+	{{range .Feeds}}
+		<div class="flex-item">
+			<div class="flex-item-leading">
+				{{ctx.AvatarUtils.AvatarByAction .}}
+			</div>
+			<div class="flex-item-main tw-gap-2">
+				<div>
+					{{if gt .ActUser.ID 0}}
+						<a href="{{AppSubUrl}}/{{(.GetActUserName ctx) | PathEscape}}" title="{{.GetActDisplayNameTitle ctx}}">{{.GetActDisplayName ctx}}</a>
+					{{else}}
+						{{.ShortActUserName ctx}}
+					{{end}}
+					{{if .GetOpType.InActions "create_repo"}}
+						{{ctx.Locale.Tr "action.create_repo" (.GetRepoLink ctx) (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "rename_repo"}}
+						{{ctx.Locale.Tr "action.rename_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "commit_repo"}}
+						{{if .Content}}
+							{{ctx.Locale.Tr "action.commit_repo" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}}
+						{{else}}
+							{{ctx.Locale.Tr "action.create_branch" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}}
+						{{end}}
+					{{else if .GetOpType.InActions "create_issue"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.create_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "create_pull_request"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.create_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "transfer_repo"}}
+						{{ctx.Locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "push_tag"}}
+						{{ctx.Locale.Tr "action.push_tag" (.GetRepoLink ctx) (.GetRefLink ctx) .GetTag (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "comment_issue"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.comment_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "merge_pull_request"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.merge_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "close_issue"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.close_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "reopen_issue"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.reopen_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "close_pull_request"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.close_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "reopen_pull_request"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.reopen_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "delete_tag"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.delete_tag" (.GetRepoLink ctx) .GetTag (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "delete_branch"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.delete_branch" (.GetRepoLink ctx) .GetBranch (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "mirror_sync_push"}}
+						{{ctx.Locale.Tr "action.mirror_sync_push" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "mirror_sync_create"}}
+						{{ctx.Locale.Tr "action.mirror_sync_create" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "mirror_sync_delete"}}
+						{{ctx.Locale.Tr "action.mirror_sync_delete" (.GetRepoLink ctx) .GetBranch (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "approve_pull_request"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.approve_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "reject_pull_request"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.reject_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "comment_pull"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.comment_pull" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{else if .GetOpType.InActions "publish_release"}}
+						{{$linkText := .Content | ctx.RenderUtils.RenderEmoji}}
+						{{ctx.Locale.Tr "action.publish_release" (.GetRepoLink ctx) (printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag) (.ShortRepoPath ctx) $linkText}}
+					{{else if .GetOpType.InActions "pull_review_dismissed"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{$reviewer := index .GetIssueInfos 1}}
+						{{ctx.Locale.Tr "action.review_dismissed" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx) $reviewer}}
+					{{else if .GetOpType.InActions "auto_merge_pull_request"}}
+						{{$index := index .GetIssueInfos 0}}
+						{{ctx.Locale.Tr "action.auto_merge_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
+					{{end}}
+					{{DateUtils.TimeSince .GetCreate}}
+				</div>
+				{{if .GetOpType.InActions "commit_repo" "mirror_sync_push"}}
+					{{$push := ActionContent2Commits .}}
+					{{$repoLink := (.GetRepoLink ctx)}}
+					{{$repo := .Repo}}
+					<div class="tw-flex tw-flex-col tw-gap-1">
+						{{range $push.Commits}}
+							{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
+							<div class="flex-text-block">
+								<img class="ui avatar" src="{{$push.AvatarLink ctx .AuthorEmail}}" title="{{.AuthorName}}" width="16" height="16">
+								<a class="ui sha label" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
+								<span class="text truncate">
+									{{ctx.RenderUtils.RenderCommitMessage .Message ($repo.ComposeMetas ctx)}}
+								</span>
+							</div>
+						{{end}}
+					</div>
+					{{if and (gt $push.Len 1) $push.CompareURL}}
+						<a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{ctx.Locale.Tr "action.compare_commits" $push.Len}} »</a>
+					{{end}}
+				{{else if .GetOpType.InActions "create_issue"}}
+					<span class="text truncate issue title">{{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}}</span>
+				{{else if .GetOpType.InActions "create_pull_request"}}
+					<span class="text truncate issue title">{{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}}</span>
+				{{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}}
+					<a href="{{.GetCommentLink ctx}}" class="text truncate issue title">{{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
+					{{$comment := index .GetIssueInfos 1}}
+					{{if $comment}}
+						<div class="markup tw-text-14">{{ctx.RenderUtils.MarkdownToHtml $comment}}</div>
+					{{end}}
+				{{else if .GetOpType.InActions "merge_pull_request"}}
+					<div class="flex-item-body text black">{{index .GetIssueInfos 1}}</div>
+				{{else if .GetOpType.InActions "close_issue" "reopen_issue" "close_pull_request" "reopen_pull_request"}}
+					<span class="text truncate issue title">{{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}}</span>
+				{{else if .GetOpType.InActions "pull_review_dismissed"}}
+				<div class="flex-item-body text black">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</div>
+				<div class="flex-item-body text black">{{index .GetIssueInfos 2 | ctx.RenderUtils.RenderEmoji}}</div>
+				{{end}}
+			</div>
+			<div class="flex-item-trailing">
+				{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey tw-mr-1"}}
+			</div>
+		</div>
+	{{end}}
+	{{template "base/paginate" .}}
+</div>
diff --git a/user/dashboard/issues.tmpl b/user/dashboard/issues.tmpl
new file mode 100644
index 0000000..7924dd2
--- /dev/null
+++ b/user/dashboard/issues.tmpl
@@ -0,0 +1,108 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content dashboard issues">
+	{{template "user/dashboard/navbar" .}}
+	<div class="ui container">
+		{{template "base/alert" .}}
+		<div class="flex-container">
+			{{$queryLink := QueryBuild "?" "type" $.ViewType "sort" $.SortType "state" $.State "q" $.Keyword "labels" .SelectLabels "fuzzy" $.IsFuzzy}}
+			<div class="flex-container-nav">
+				<div class="ui secondary vertical filter menu tw-bg-transparent">
+					<a class="{{if eq .ViewType "your_repositories"}}active{{end}} item" href="{{QueryBuild $queryLink "type" "your_repositories"}}">
+						{{ctx.Locale.Tr "home.issues.in_your_repos"}}
+						<strong>{{CountFmt .IssueStats.YourRepositoriesCount}}</strong>
+					</a>
+					<a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{QueryBuild $queryLink "type" "assigned"}}">
+						{{ctx.Locale.Tr "repo.issues.filter_type.assigned_to_you"}}
+						<strong>{{CountFmt .IssueStats.AssignCount}}</strong>
+					</a>
+					<a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{QueryBuild $queryLink "type" "created_by"}}">
+						{{ctx.Locale.Tr "repo.issues.filter_type.created_by_you"}}
+						<strong>{{CountFmt .IssueStats.CreateCount}}</strong>
+					</a>
+					{{if .PageIsPulls}}
+						<a class="{{if eq .ViewType "review_requested"}}active{{end}} item" href="{{QueryBuild $queryLink "type" "review_requested"}}">
+							{{ctx.Locale.Tr "repo.issues.filter_type.review_requested"}}
+							<strong>{{CountFmt .IssueStats.ReviewRequestedCount}}</strong>
+						</a>
+						<a class="{{if eq .ViewType "reviewed_by"}}active{{end}} item" href="{{QueryBuild $queryLink "type" "reviewed_by"}}">
+							{{ctx.Locale.Tr "repo.issues.filter_type.reviewed_by_you"}}
+							<strong>{{CountFmt .IssueStats.ReviewedCount}}</strong>
+						</a>
+					{{end}}
+					<a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{QueryBuild $queryLink "type" "mentioned"}}">
+						{{ctx.Locale.Tr "repo.issues.filter_type.mentioning_you"}}
+						<strong>{{CountFmt .IssueStats.MentionCount}}</strong>
+					</a>
+				</div>
+			</div>
+
+			{{$queryLinkWithFilter := QueryBuild $queryLink "poster" $.FilterPosterUsername "assignee" $.FilterAssigneeUsername}}
+			<div class="flex-container-main content">
+				<div class="list-header">
+					<div class="small-menu-items ui compact tiny menu list-header-toggle flex-items-block">
+						<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{QueryBuild $queryLink "state" "open"}}">
+							{{svg "octicon-issue-opened"}}
+							{{ctx.Locale.PrettyNumber .IssueStats.OpenCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
+						</a>
+						<a class="item{{if .IsShowClosed}} active{{end}}" href="{{QueryBuild $queryLink "state" "closed"}}">
+							{{svg "octicon-issue-closed"}}
+							{{ctx.Locale.PrettyNumber .IssueStats.ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
+						</a>
+					</div>
+					<form class="list-header-search ui form ignore-dirty">
+						<input type="hidden" name="type" value="{{$.ViewType}}">
+						<input type="hidden" name="sort" value="{{$.SortType}}">
+						<input type="hidden" name="state" value="{{$.State}}">
+						{{template "shared/search/combo_fuzzy" dict "Value" $.Keyword "IsFuzzy" $.IsFuzzy "Placeholder" (ctx.Locale.Tr (Iif .PageIsPulls "search.pull_kind" "search.issue_kind")) "Tooltip" (ctx.Locale.Tr "explore.go_to")}}
+					</form>
+
+					<div class="list-header-filters">
+						{{if $.Labels}}
+							{{template "repo/issue/filter_item_label" dict "Labels" .Labels "QueryLink" $queryLinkWithFilter "SupportArchivedLabel" true}}
+						{{end}}
+
+						{{/* at the moment there is no easy way to get poster candidates on this page, so only show a username input, search for what the end user enters */}}
+						{{if ne $.ViewType "created_by"}}
+							{{template "repo/issue/filter_item_user_fetch" dict
+								"QueryParamKey" "poster"
+								"QueryLink" $queryLinkWithFilter
+								"SelectedUsername" $.FilterPosterUsername
+								"TextFilterTitle" (ctx.Locale.Tr "repo.issues.filter_poster")
+							}}
+						{{end}}
+
+						{{/* at the moment there is no easy way to get assignee candidates on this page, so only show a username input, search for what the end user enters */}}
+						{{if ne $.ViewType "assigned"}}
+							{{template "repo/issue/filter_item_user_fetch" dict
+								"QueryParamKey" "assignee"
+								"QueryLink" $queryLinkWithFilter
+								"SelectedUsername" $.FilterAssigneeUsername
+								"TextFilterTitle" (ctx.Locale.Tr "repo.issues.filter_assignee")
+							}}
+						{{end}}
+
+						<!-- Sort -->
+						<div class="item ui small dropdown jump">
+							<span class="text tw-whitespace-nowrap">
+								{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+								{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							</span>
+							<div class="menu">
+								<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{QueryBuild $queryLinkWithFilter "sort" "recentupdate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+								<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{QueryBuild $queryLinkWithFilter "sort" "leastupdate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+								<a class="{{if eq .SortType "latest"}}active {{end}}item" href="{{QueryBuild $queryLinkWithFilter "sort" "latest"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
+								<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{QueryBuild $queryLinkWithFilter "sort" "oldest"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
+								<a class="{{if eq .SortType "mostcomment"}}active {{end}}item" href="{{QueryBuild $queryLinkWithFilter "sort" "mostcomment"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
+								<a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="{{QueryBuild $queryLinkWithFilter "sort" "leastcomment"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
+								<a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="{{QueryBuild $queryLinkWithFilter "sort" "nearduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
+								<a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="{{QueryBuild $queryLinkWithFilter "sort" "farduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
+							</div>
+						</div>
+					</div>
+				</div>
+				{{template "shared/issuelist" dict "." . "listType" "dashboard"}}
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/dashboard/milestones.tmpl b/user/dashboard/milestones.tmpl
new file mode 100644
index 0000000..c0059d3
--- /dev/null
+++ b/user/dashboard/milestones.tmpl
@@ -0,0 +1,157 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content dashboard issues repository milestones">
+	{{template "user/dashboard/navbar" .}}
+	<div class="ui container">
+		<div class="flex-container">
+			<div class="flex-container-nav">
+				<div class="ui secondary vertical filter menu tw-bg-transparent">
+					<div class="item">
+						{{ctx.Locale.Tr "home.issues.in_your_repos"}}
+						<strong>{{.Total}}</strong>
+					</div>
+					<div class="divider"></div>
+					{{range .Repos}}
+						{{with $Repo := .}}
+							<a class="{{range $.RepoIDs}}{{if eq . $Repo.ID}}active{{end}}{{end}} repo name item" href="?repos=[
+								{{- with $include := true -}}
+										{{- range $.RepoIDs -}}
+											{{- if eq . $Repo.ID -}}
+												{{$include = false}}
+											{{- else -}}
+												{{.}}%2C
+											{{- end -}}
+										{{- end -}}
+										{{- if eq $include true -}}
+											{{$Repo.ID}}%2C
+										{{- end -}}
+									{{- end -}}
+								]&sort={{$.SortType}}&state={{$.State}}&q={{$.Keyword}}" title="{{.FullName}}">
+								<span class="text truncate">{{$Repo.FullName}}</span>
+								<div class="ui {{if $.IsShowClosed}}red{{else}}green{{end}} label">{{index $.Counts $Repo.ID}}</div>
+							</a>
+						{{end}}
+					{{end}}
+				</div>
+			</div>
+			<div class="flex-container-main content">
+				<div class="list-header">
+					<div class="small-menu-items ui compact tiny menu list-header-toggle">
+						<a class="item{{if not .IsShowClosed}} active{{end}}" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
+							{{svg "octicon-milestone" 16 "tw-mr-2"}}
+							{{ctx.Locale.PrettyNumber .MilestoneStats.OpenCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
+						</a>
+						<a class="item{{if .IsShowClosed}} active{{end}}" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
+							{{svg "octicon-check" 16 "tw-mr-2"}}
+							{{ctx.Locale.PrettyNumber .MilestoneStats.ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
+						</a>
+					</div>
+					<form class="list-header-search ui form ignore-dirty">
+						<input type="hidden" name="type" value="{{$.ViewType}}">
+							<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]">
+							<input type="hidden" name="sort" value="{{$.SortType}}">
+							<input type="hidden" name="state" value="{{$.State}}">
+						{{template "shared/search/combo" dict "Value" $.Keyword}}
+					</form>
+					<div class="list-header-filters">
+						<!-- Sort -->
+						<div class="item ui dropdown jump">
+							<span class="text">
+								{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+							</span>
+							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+							<div class="menu">
+								<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.earliest_due_data"}}</a>
+								<a class="{{if eq .SortType "furthestduedate"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.latest_due_date"}}</a>
+								<a class="{{if eq .SortType "leastcomplete"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomplete&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_complete"}}</a>
+								<a class="{{if eq .SortType "mostcomplete"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomplete&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_complete"}}</a>
+								<a class="{{if eq .SortType "mostissues"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostissues&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_issues"}}</a>
+								<a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
+								<a class="{{if eq .SortType "name"}}active {{end}}item" href="{{$.Link}}?sort=name&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.name"}}</a>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="milestone-list">
+					{{range .Milestones}}
+						<li class="milestone-card">
+							<div class="milestone-header">
+								<h3 class="flex-text-block tw-m-0">
+									<span class="ui large label">
+										{{.Repo.FullName}}
+									</span>
+									{{svg "octicon-milestone" 16}}
+									<a class="muted" href="{{.Repo.Link}}/milestone/{{.ID}}">{{.Name}}</a>
+								</h3>
+								<div class="tw-flex tw-items-center">
+									<span class="tw-mr-2">{{.Completeness}}%</span>
+									<progress value="{{.Completeness}}" max="100"></progress>
+								</div>
+							</div>
+							<div class="milestone-toolbar">
+								<div class="group">
+									<div class="flex-text-block">
+										{{svg "octicon-issue-opened" 14}}
+										{{ctx.Locale.PrettyNumber .NumOpenIssues}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
+									</div>
+									<div class="flex-text-block">
+										{{svg "octicon-check" 14}}
+										{{ctx.Locale.PrettyNumber .NumClosedIssues}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
+									</div>
+									{{if .TotalTrackedTime}}
+										<div class="flex-text-block">
+											{{svg "octicon-clock"}}
+											{{.TotalTrackedTime|Sec2Time}}
+										</div>
+									{{end}}
+									{{if .UpdatedUnix}}
+										<div class="flex-text-block">
+											{{svg "octicon-clock"}}
+											{{ctx.Locale.Tr "repo.milestones.update_ago" (DateUtils.TimeSince .UpdatedUnix)}}
+										</div>
+									{{end}}
+									<div class="flex-text-block">
+										{{if .IsClosed}}
+											{{$closedDate:= DateUtils.TimeSince .ClosedDateUnix}}
+											{{svg "octicon-clock" 14}}
+											{{ctx.Locale.Tr "repo.milestones.closed" $closedDate}}
+										{{else}}
+											{{if .DeadlineString}}
+												<span{{if .IsOverdue}} class="text red"{{end}}>
+													{{svg "octicon-calendar" 14}}
+													{{DateUtils.AbsoluteShort (.DeadlineString|DateUtils.ParseLegacy)}}
+												</span>
+											{{else}}
+												{{svg "octicon-calendar" 14}}
+												{{ctx.Locale.Tr "repo.milestones.no_due_date"}}
+											{{end}}
+										{{end}}
+									</div>
+								</div>
+								{{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
+									<div class="group">
+										<a class="flex-text-inline" href="{{$.Link}}/{{.ID}}/edit">{{svg "octicon-pencil" 14}}{{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
+										{{if .IsClosed}}
+											<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/open">{{svg "octicon-check" 14}}{{ctx.Locale.Tr "repo.milestones.open"}}</a>
+										{{else}}
+											<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{ctx.Locale.Tr "repo.milestones.close"}}</a>
+										{{end}}
+										<a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
+									</div>
+								{{end}}
+							</div>
+							{{if .Content}}
+								<div class="markup content">
+									{{.RenderedContent}}
+								</div>
+							{{end}}
+						</li>
+					{{end}}
+
+					{{template "base/paginate" .}}
+				</div>
+
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/dashboard/navbar.tmpl b/user/dashboard/navbar.tmpl
new file mode 100644
index 0000000..a828bc9
--- /dev/null
+++ b/user/dashboard/navbar.tmpl
@@ -0,0 +1,107 @@
+<div class="secondary-nav tw-border-b tw-border-b-secondary">
+	<div class="ui secondary stackable menu">
+		<div class="item">
+			<div class="ui floating dropdown jump">
+				<span class="text truncated-item-container">
+					{{ctx.AvatarUtils.Avatar .ContextUser 24 "tw-mr-1"}}
+					<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
+					<span class="org-visibility">
+						{{if .ContextUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+						{{if .ContextUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+					</span>
+					{{svg "octicon-triangle-down" 14 "dropdown icon tw-ml-1"}}
+				</span>
+				<div class="context user overflow menu">
+					<div class="header">
+						{{ctx.Locale.Tr "home.switch_dashboard_context"}}
+					</div>
+					<div class="scrolling menu items">
+						<a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item truncated-item-container" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{else if .PageIsMilestonesDashboard}}milestones{{end}}">
+							{{ctx.AvatarUtils.Avatar .SignedUser}}
+							<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
+							<span class="org-visibility">
+								{{if .SignedUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+								{{if .SignedUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+							</span>
+						</a>
+						{{range .Orgs}}
+							<a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item truncated-item-container" title="{{.Name}}" href="{{.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
+								{{ctx.AvatarUtils.Avatar .}}
+								<span class="truncated-item-name">{{.ShortName 40}}</span>
+								<span class="org-visibility">
+									{{if .Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+									{{if .Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+								</span>
+							</a>
+						{{end}}
+					</div>
+					{{if .SignedUser.CanCreateOrganization}}
+					<a class="item" href="{{AppSubUrl}}/org/create">
+						{{svg "octicon-plus"}}&nbsp;&nbsp;&nbsp;{{ctx.Locale.Tr "new_org"}}
+					</a>
+					{{end}}
+				</div>
+			</div>
+		</div>
+		{{if .ContextUser.IsOrganization}}
+			<div class="item">
+				<div class="ui floating dropdown jump">
+					<span class="text">
+						{{svg "octicon-people" 18}}
+						{{if .Team}}
+							{{.Team.Name}}
+						{{else}}
+							{{ctx.Locale.Tr "org.teams"}}
+						{{end}}
+					</span>
+					{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+					<div class="context user overflow menu">
+						<div class="header">
+							{{ctx.Locale.Tr "home.filter_by_team_repositories"}}
+						</div>
+						<div class="scrolling menu items">
+							<a class="{{if not $.Team}}active selected{{end}} item" title="{{ctx.Locale.Tr "all"}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
+								{{ctx.Locale.Tr "all"}}
+							</a>
+							{{range .Teams}}
+								{{if not .IncludesAllRepositories}}
+									<a class="{{if $.Team}}{{if eq $.Team.ID .ID}}active selected{{end}}{{end}} item" title="{{.Name}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}/{{.Name}}">
+										{{.Name}}
+									</a>
+								{{end}}
+							{{end}}
+						</div>
+					</div>
+				</div>
+			</div>
+		{{end}}
+
+	{{if .ContextUser.IsOrganization}}
+		<div class="right menu">
+			<a class="{{if .PageIsNews}}active {{end}}item tw-ml-auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
+				{{svg "octicon-rss"}}&nbsp;{{ctx.Locale.Tr "activities"}}
+			</a>
+			{{if not ctx.Consts.RepoUnitTypeIssues.UnitGlobalDisabled}}
+			<a class="{{if .PageIsIssues}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/issues{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
+				{{svg "octicon-issue-opened"}}&nbsp;{{ctx.Locale.Tr "issues"}}
+			</a>
+			{{end}}
+			{{if not ctx.Consts.RepoUnitTypePullRequests.UnitGlobalDisabled}}
+			<a class="{{if .PageIsPulls}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/pulls{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
+				{{svg "octicon-git-pull-request"}}&nbsp;{{ctx.Locale.Tr "pull_requests"}}
+			</a>
+			{{end}}
+			{{if and .ShowMilestonesDashboardPage (not (and ctx.Consts.RepoUnitTypeIssues.UnitGlobalDisabled ctx.Consts.RepoUnitTypePullRequests.UnitGlobalDisabled))}}
+			<a class="{{if .PageIsMilestonesDashboard}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/milestones{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
+				{{svg "octicon-milestone"}}&nbsp;{{ctx.Locale.Tr "milestones"}}
+			</a>
+			{{end}}
+			<div class="item">
+				<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title="{{ctx.Locale.Tr "home.view_home" .ContextUser.Name}}">
+					{{ctx.Locale.Tr "home.view_home" (.ContextUser.ShortName 40)}}
+				</a>
+			</div>
+		</div>
+	{{end}}
+	</div>
+</div>
diff --git a/user/dashboard/repolist.tmpl b/user/dashboard/repolist.tmpl
new file mode 100644
index 0000000..a2764ba
--- /dev/null
+++ b/user/dashboard/repolist.tmpl
@@ -0,0 +1,59 @@
+<script type="module">
+const data = {
+	...window.config.pageData.dashboardRepoList, // it only contains searchLimit and uid
+
+	isMirrorsEnabled: {{.MirrorsEnabled}},
+	isStarsEnabled: {{not .IsDisableStars}},
+
+	textRepository: {{ctx.Locale.Tr "repository"}},
+	textOrganization: {{ctx.Locale.Tr "organization"}},
+	textMyRepos: {{ctx.Locale.Tr "home.my_repos"}},
+	textNewRepo: {{ctx.Locale.Tr "new_repo"}},
+	textSearchRepos: {{ctx.Locale.Tr "search.repo_kind"}},
+	textFilter: {{ctx.Locale.Tr "home.filter"}},
+	textShowArchived: {{ctx.Locale.Tr "home.show_archived"}},
+	textShowPrivate: {{ctx.Locale.Tr "home.show_private"}},
+
+	textShowBothArchivedUnarchived: {{ctx.Locale.Tr "home.show_both_archived_unarchived"}},
+	textShowOnlyUnarchived: {{ctx.Locale.Tr "home.show_only_unarchived"}},
+	textShowOnlyArchived: {{ctx.Locale.Tr "home.show_only_archived"}},
+
+	textShowBothPrivatePublic: {{ctx.Locale.Tr "home.show_both_private_public"}},
+	textShowOnlyPublic: {{ctx.Locale.Tr "home.show_only_public"}},
+	textShowOnlyPrivate: {{ctx.Locale.Tr "home.show_only_private"}},
+
+	textAll: {{ctx.Locale.Tr "all"}},
+	textSources: {{ctx.Locale.Tr "sources"}},
+	textForks: {{ctx.Locale.Tr "forks"}},
+	textMirrors: {{ctx.Locale.Tr "mirrors"}},
+	textCollaborative: {{ctx.Locale.Tr "collaborative"}},
+
+	textFirstPage: {{ctx.Locale.Tr "admin.first_page"}},
+	textPreviousPage: {{ctx.Locale.Tr "repo.issues.previous"}},
+	textNextPage: {{ctx.Locale.Tr "repo.issues.next"}},
+	textLastPage: {{ctx.Locale.Tr "admin.last_page"}},
+
+	textMyOrgs: {{ctx.Locale.Tr "home.my_orgs"}},
+	textNewOrg: {{ctx.Locale.Tr "new_org"}},
+
+	textOrgVisibilityLimited: {{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}},
+	textOrgVisibilityPrivate: {{ctx.Locale.Tr "org.settings.visibility.private_shortname"}},
+};
+
+{{if .Team}}
+data.teamId = {{.Team.ID}};
+{{end}}
+
+{{if not .ContextUser.IsOrganization}}
+data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'full_name': {{.FullName}}, 'num_repos': {{.NumRepos}}, 'org_visibility': {{.Visibility}}},{{end}}];
+data.isOrganization = false;
+data.organizationsTotalCount = {{.UserOrgsCount}};
+data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}};
+{{else}}
+data.organizationId = {{.ContextUser.ID}};
+{{end}}
+
+window.config.pageData.dashboardRepoList = data;
+</script>
+
+<div id="dashboard-repo-list" class="flex-container-sidebar"></div>
diff --git a/user/heatmap.tmpl b/user/heatmap.tmpl
new file mode 100644
index 0000000..b604b92
--- /dev/null
+++ b/user/heatmap.tmpl
@@ -0,0 +1,10 @@
+{{if .HeatmapData}}
+	<div id="user-heatmap" class="is-loading"
+		data-heatmap-data="{{JsonUtils.EncodeToString .HeatmapData}}"
+		data-locale-total-contributions="{{ctx.Locale.Tr "heatmap.number_of_contributions_in_the_last_12_months" (ctx.Locale.PrettyNumber .HeatmapTotalContributions)}}"
+		data-locale-no-contributions="{{ctx.Locale.Tr "heatmap.no_contributions"}}"
+		data-locale-more="{{ctx.Locale.Tr "heatmap.more"}}"
+		data-locale-less="{{ctx.Locale.Tr "heatmap.less"}}"
+	></div>
+	<div class="divider"></div>
+{{end}}
diff --git a/user/notification/notification.tmpl b/user/notification/notification.tmpl
new file mode 100644
index 0000000..b483c15
--- /dev/null
+++ b/user/notification/notification.tmpl
@@ -0,0 +1,3 @@
+{{template "base/head" .}}
+{{template "user/notification/notification_div" .}}
+{{template "base/footer" .}}
diff --git a/user/notification/notification_div.tmpl b/user/notification/notification_div.tmpl
new file mode 100644
index 0000000..0d2371a
--- /dev/null
+++ b/user/notification/notification_div.tmpl
@@ -0,0 +1,125 @@
+<div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_div" data-sequence-number="{{.SequenceNumber}}">
+	<div class="ui container">
+		{{$notificationUnreadCount := call .NotificationUnreadCount}}
+		<div class="tw-flex tw-items-center tw-justify-between tw-mb-[--page-spacing]">
+			<div class="small-menu-items ui compact tiny menu">
+				<a class="{{if eq .Status 1}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=unread">
+					{{ctx.Locale.Tr "notification.unread"}}
+					<div class="notifications-unread-count ui label {{if not $notificationUnreadCount}}tw-hidden{{end}}">{{$notificationUnreadCount}}</div>
+				</a>
+				<a class="{{if eq .Status 2}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=read">
+					{{ctx.Locale.Tr "notification.read"}}
+				</a>
+			</div>
+			{{if and (eq .Status 1)}}
+				<form action="{{AppSubUrl}}/notifications/purge" method="post">
+					{{$.CsrfTokenHtml}}
+					<div class="{{if not $notificationUnreadCount}}tw-hidden{{end}}">
+						<button class="ui mini button primary tw-mr-0" title="{{ctx.Locale.Tr "notification.mark_all_as_read"}}">
+							{{svg "octicon-checklist"}}
+						</button>
+					</div>
+				</form>
+			{{end}}
+		</div>
+		<div class="tw-p-0">
+			<div id="notification_table">
+				{{if not .Notifications}}
+					<div class="tw-flex tw-items-center tw-flex-col tw-p-4">
+						{{svg "octicon-inbox" 56 "tw-mb-4"}}
+						{{if eq .Status 1}}
+							{{ctx.Locale.Tr "notification.no_unread"}}
+						{{else}}
+							{{ctx.Locale.Tr "notification.no_read"}}
+						{{end}}
+					</div>
+				{{else}}
+					{{range $notification := .Notifications}}
+						<div class="notifications-item tw-flex tw-items-center tw-flex-wrap tw-gap-2 tw-p-2" id="notification_{{.ID}}" data-status="{{.Status}}">
+							<div class="notifications-icon tw-ml-2 tw-mr-1 tw-self-start tw-mt-1">
+								{{if .Issue}}
+									{{template "shared/issueicon" .Issue}}
+								{{else}}
+									{{svg "octicon-repo" 16 "text grey"}}
+								{{end}}
+							</div>
+							<a class="notifications-link tw-flex tw-flex-1 tw-flex-col silenced" href="{{.Link ctx}}">
+								<div class="notifications-top-row tw-text-13 tw-break-anywhere">
+									{{.Repository.FullName}} {{if .Issue}}<span class="text light-3">#{{.Issue.Index}}</span>{{end}}
+									{{if eq .Status 3}}
+										{{svg "octicon-pin" 13 "text blue tw-mt-0.5 tw-ml-1"}}
+									{{end}}
+								</div>
+								<div class="notifications-bottom-row tw-text-16 tw-py-0.5">
+									<span class="issue-title tw-break-anywhere">
+										{{if .Issue}}
+											{{.Issue.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}
+										{{else}}
+											{{.Repository.FullName}}
+										{{end}}
+									</span>
+								</div>
+							</a>
+							<div class="notifications-updated tw-items-center tw-mr-2">
+								{{if .Issue}}
+									{{DateUtils.TimeSince .Issue.UpdatedUnix}}
+								{{else}}
+									{{DateUtils.TimeSince .UpdatedUnix}}
+								{{end}}
+							</div>
+							<div class="notifications-buttons tw-items-center tw-justify-end tw-gap-1 tw-px-1">
+								{{if ne .Status 3}}
+									<form action="{{AppSubUrl}}/notifications/status" method="post">
+										{{$.CsrfTokenHtml}}
+										<input type="hidden" name="notification_id" value="{{.ID}}">
+										<input type="hidden" name="status" value="pinned">
+										<button class="btn interact-bg tw-p-2" title="{{ctx.Locale.Tr "notification.pin"}}"
+											data-url="{{AppSubUrl}}/notifications/status"
+											data-status="pinned"
+											data-page="{{$.Page.Paginater.Current}}"
+											data-notification-id="{{.ID}}"
+											data-q="{{$.Keyword}}">
+											{{svg "octicon-pin"}}
+										</button>
+									</form>
+								{{end}}
+								{{if or (eq .Status 1) (eq .Status 3)}}
+									<form action="{{AppSubUrl}}/notifications/status" method="post">
+										{{$.CsrfTokenHtml}}
+										<input type="hidden" name="notification_id" value="{{.ID}}">
+										<input type="hidden" name="status" value="read">
+										<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
+										<button class="btn interact-bg tw-p-2" title="{{ctx.Locale.Tr "notification.mark_as_read"}}"
+											data-url="{{AppSubUrl}}/notifications/status"
+											data-status="read"
+											data-page="{{$.Page.Paginater.Current}}"
+											data-notification-id="{{.ID}}"
+											data-q="{{$.Keyword}}">
+											{{svg "octicon-check"}}
+										</button>
+									</form>
+								{{else if eq .Status 2}}
+									<form action="{{AppSubUrl}}/notifications/status" method="post">
+										{{$.CsrfTokenHtml}}
+										<input type="hidden" name="notification_id" value="{{.ID}}">
+										<input type="hidden" name="status" value="unread">
+										<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
+										<button class="btn interact-bg tw-p-2" title="{{ctx.Locale.Tr "notification.mark_as_unread"}}"
+											data-url="{{AppSubUrl}}/notifications/status"
+											data-status="unread"
+											data-page="{{$.Page.Paginater.Current}}"
+											data-notification-id="{{.ID}}"
+											data-q="{{$.Keyword}}">
+											{{svg "octicon-bell"}}
+										</button>
+									</form>
+								{{end}}
+							</div>
+						</div>
+					{{end}}
+				{{end}}
+			</div>
+		</div>
+		{{template "base/paginate" .}}
+	</div>
+</div>
diff --git a/user/notification/notification_subscriptions.tmpl b/user/notification/notification_subscriptions.tmpl
new file mode 100644
index 0000000..b92a32a
--- /dev/null
+++ b/user/notification/notification_subscriptions.tmpl
@@ -0,0 +1,79 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user notification">
+	<div class="ui container">
+		<div class="ui compact small menu small-menu-items">
+			<a href="{{AppSubUrl}}/notifications/subscriptions" class="{{if eq .Status 1}}active {{end}}item">
+				{{ctx.Locale.Tr "notification.subscriptions"}}
+			</a>
+			<a href="{{AppSubUrl}}/notifications/watching" class="{{if eq .Status 2}}active {{end}}item">
+				{{ctx.Locale.Tr "notification.watching"}}
+			</a>
+		</div>
+		<div class="ui top attached segment">
+			{{if eq .Status 1}}
+				<div class="tw-flex tw-justify-between">
+					<div class="tw-flex">
+						<div class="small-menu-items ui compact tiny menu">
+							<a class="{{if eq .State "all"}}active {{end}}item" href="?sort={{$.SortType}}&state=all&issueType={{$.IssueType}}&labels={{$.Labels}}">
+								{{ctx.Locale.Tr "all"}}
+							</a>
+							<a class="{{if eq .State "open"}}active {{end}}item" href="?sort={{$.SortType}}&state=open&issueType={{$.IssueType}}&labels={{$.Labels}}">
+								{{svg "octicon-issue-opened" 16 "tw-mr-2"}}
+								{{ctx.Locale.Tr "repo.issues.open_title"}}
+							</a>
+							<a class="{{if eq .State "closed"}}active {{end}}item" href="?sort={{$.SortType}}&state=closed&issueType={{$.IssueType}}&labels={{$.Labels}}">
+								{{svg "octicon-issue-closed" 16 "tw-mr-2"}}
+								{{ctx.Locale.Tr "repo.issues.closed_title"}}
+							</a>
+						</div>
+					</div>
+					<div class="tw-flex tw-justify-between">
+						<div class="ui right aligned secondary filter menu labels">
+							<!-- Type -->
+								<div class="ui dropdown type jump item">
+									<span class="text">
+										{{ctx.Locale.Tr "repo.issues.filter_type"}}
+									</span>
+									{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+									<div class="menu">
+										<a class="{{if or (eq .IssueType "all") (not .IssueType)}}active {{end}}item" href="?sort={{$.SortType}}&state={{$.State}}&issueType=all&labels={{$.Labels}}">{{ctx.Locale.Tr "all"}}</a>
+										<a class="{{if eq .IssueType "issues"}}active {{end}}item" href="?sort={{$.SortType}}&state={{$.State}}&issueType=issues&labels={{$.Labels}}">{{ctx.Locale.Tr "issues"}}</a>
+										<a class="{{if eq .IssueType "pulls"}}active {{end}}item" href="?sort={{$.SortType}}&state={{$.State}}&issueType=pulls&labels={{$.Labels}}">{{ctx.Locale.Tr "pull_requests"}}</a>
+									</div>
+								</div>
+
+							<!-- Sort -->
+							<div class="ui dropdown type jump item">
+								<span class="text">
+									{{ctx.Locale.Tr "repo.issues.filter_sort"}}
+								</span>
+								{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+								<div class="menu">
+									<a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="?sort=latest&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
+									<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="?sort=oldest&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
+									<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="?sort=recentupdate&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+									<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="?sort=leastupdate&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+									<a class="{{if eq .SortType "mostcomment"}}active {{end}}item" href="?sort=mostcomment&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
+									<a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="?sort=leastcomment&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
+									<a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="?sort=nearduedate&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
+									<a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="?sort=farduedate&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="divider"></div>
+				{{if not .Issues}}
+					{{ctx.Locale.Tr "notification.no_subscriptions"}}
+				{{else}}
+					{{template "shared/issuelist" dict "." . "listType" "dashboard"}}
+				{{end}}
+			{{else}}
+				{{template "shared/repo_search" .}}
+				{{template "explore/repo_list" .}}
+				{{template "base/paginate" .}}
+			{{end}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/overview/header.tmpl b/user/overview/header.tmpl
new file mode 100644
index 0000000..275c4e2
--- /dev/null
+++ b/user/overview/header.tmpl
@@ -0,0 +1,50 @@
+<overflow-menu class="ui secondary pointing tabular borderless menu">
+	<div class="overflow-menu-items">
+		{{if and .HasProfileReadme .ContextUser.IsIndividual}}
+		<a class="{{if eq .TabName "overview"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=overview">
+			{{svg "octicon-info"}} {{ctx.Locale.Tr "user.overview"}}
+		</a>
+		{{end}}
+		<a class="{{if eq .TabName "repositories"}}active {{end}} item" href="{{.ContextUser.HomeLink}}?tab=repositories">
+			{{svg "octicon-repo"}} {{ctx.Locale.Tr "user.repositories"}}
+			{{if .RepoCount}}
+				<div class="ui small label">{{.RepoCount}}</div>
+			{{end}}
+		</a>
+		{{if or .ContextUser.IsIndividual .CanReadProjects}}
+		<a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if .PageIsViewProjects}}active {{end}}item">
+			{{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
+			{{if .ProjectCount}}
+				<div class="ui small label">{{.ProjectCount}}</div>
+			{{end}}
+		</a>
+		{{end}}
+		{{if and .IsPackageEnabled (or .ContextUser.IsIndividual .CanReadPackages)}}
+			<a href="{{.ContextUser.HomeLink}}/-/packages" class="{{if .IsPackagesPage}}active {{end}}item">
+				{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
+			</a>
+		{{end}}
+		{{if and .IsRepoIndexerEnabled (or .ContextUser.IsIndividual .CanReadCode)}}
+			<a href="{{.ContextUser.HomeLink}}/-/code" class="{{if .IsCodePage}}active {{end}}item">
+				{{svg "octicon-code"}} {{ctx.Locale.Tr "user.code"}}
+			</a>
+		{{end}}
+		{{if .ContextUser.IsIndividual}}
+			<a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
+				{{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}}
+			</a>
+			{{if not .DisableStars}}
+			<a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
+				{{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}}
+				{{if .ContextUser.NumStars}}
+					<div class="ui small label">{{.ContextUser.NumStars}}</div>
+				{{end}}
+			</a>
+			{{else}}
+			<a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
+				{{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}}
+			</a>
+			{{end}}
+		{{end}}
+	</div>
+</overflow-menu>
diff --git a/user/overview/package_versions.tmpl b/user/overview/package_versions.tmpl
new file mode 100644
index 0000000..0ac2db0
--- /dev/null
+++ b/user/overview/package_versions.tmpl
@@ -0,0 +1,24 @@
+{{template "base/head" .}}
+{{if .ContextUser.IsOrganization}}
+	<div role="main" aria-label="{{.Title}}" class="page-content organization packages">
+		{{template "org/header" .}}
+		<div class="ui container">
+			{{template "package/shared/versionlist" .}}
+		</div>
+	</div>
+{{else}}
+	<div role="main" aria-label="{{.Title}}" class="page-content user profile packages">
+		<div class="ui container">
+			<div class="ui stackable grid">
+				<div class="ui four wide column">
+					{{template "shared/user/profile_big_avatar" .}}
+				</div>
+				<div class="ui twelve wide column tw-mb-4">
+						{{template "user/overview/header" .}}
+						{{template "package/shared/versionlist" .}}
+				</div>
+			</div>
+		</div>
+	</div>
+{{end}}
+{{template "base/footer" .}}
diff --git a/user/overview/packages.tmpl b/user/overview/packages.tmpl
new file mode 100644
index 0000000..bb2238b
--- /dev/null
+++ b/user/overview/packages.tmpl
@@ -0,0 +1,24 @@
+{{template "base/head" .}}
+{{if .ContextUser.IsOrganization}}
+	<div role="main" aria-label="{{.Title}}" class="page-content organization packages">
+		{{template "org/header" .}}
+		<div class="ui container">
+			{{template "package/shared/list" .}}
+		</div>
+	</div>
+{{else}}
+	<div role="main" aria-label="{{.Title}}" class="page-content user profile packages">
+		<div class="ui container">
+			<div class="ui stackable grid">
+				<div class="ui four wide column">
+					{{template "shared/user/profile_big_avatar" .}}
+				</div>
+				<div class="ui twelve wide column tw-mb-4">
+						{{template "user/overview/header" .}}
+						{{template "package/shared/list" .}}
+				</div>
+			</div>
+		</div>
+	</div>
+{{end}}
+{{template "base/footer" .}}
diff --git a/user/profile.tmpl b/user/profile.tmpl
new file mode 100644
index 0000000..cf61bb9
--- /dev/null
+++ b/user/profile.tmpl
@@ -0,0 +1,39 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content user profile">
+	<div class="ui container">
+		<div class="ui stackable grid">
+			<div class="ui four wide column">
+				{{template "shared/user/profile_big_avatar" .}}
+			</div>
+			<div class="ui twelve wide column tw-mb-4">
+				{{template "user/overview/header" .}}
+				{{if eq .TabName "activity"}}
+					{{if .ContextUser.KeepActivityPrivate}}
+						<div class="ui info message">
+							<p>{{ctx.Locale.Tr "user.disabled_public_activity"}}</p>
+						</div>
+					{{end}}
+					{{template "user/heatmap" .}}
+					{{template "user/dashboard/feeds" .}}
+				{{else if eq .TabName "stars"}}
+					<div class="stars">
+						{{template "shared/repo_search" .}}
+						{{template "explore/repo_list" .}}
+						{{template "base/paginate" .}}
+					</div>
+				{{else if eq .TabName "following"}}
+					{{template "repo/user_cards" .}}
+				{{else if eq .TabName "followers"}}
+					{{template "repo/user_cards" .}}
+				{{else if eq .TabName "overview"}}
+					<div id="readme_profile" class="markup">{{.ProfileReadme}}</div>
+				{{else}}
+					{{template "shared/repo_search" .}}
+					{{template "explore/repo_list" .}}
+					{{template "base/paginate" .}}
+				{{end}}
+			</div>
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/settings/account.tmpl b/user/settings/account.tmpl
new file mode 100644
index 0000000..27b0ef1
--- /dev/null
+++ b/user/settings/account.tmpl
@@ -0,0 +1,183 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings account")}}
+	<div class="user-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.password"}}
+		</h4>
+		<div class="ui attached segment">
+			{{if and (not ($.UserDisabledFeatures.Contains "manage_credentials")) (or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2))}}
+			<form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/settings/account" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				{{if .SignedUser.IsPasswordSet}}
+				<div class="required field {{if .Err_OldPassword}}error{{end}}">
+					<label for="old_password">{{ctx.Locale.Tr "settings.old_password"}}</label>
+					<input id="old_password" name="old_password" type="password" autocomplete="current-password" autofocus required>
+				</div>
+				{{end}}
+				<div class="required field {{if .Err_Password}}error{{end}}">
+					<label for="password">{{ctx.Locale.Tr "settings.new_password"}}</label>
+					<input id="password" name="password" type="password" autocomplete="new-password" required>
+				</div>
+				<div class="required field {{if .Err_Password}}error{{end}}">
+					<label for="retype">{{ctx.Locale.Tr "settings.retype_new_password"}}</label>
+					<input id="retype" name="retype" type="password" autocomplete="new-password" required>
+				</div>
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "settings.change_password"}}</button>
+					<a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
+				</div>
+			</form>
+			{{else}}
+			<div class="ui info message">
+				<p class="text left">{{ctx.Locale.Tr "settings.password_change_disabled"}}</p>
+			</div>
+			{{end}}
+		</div>
+
+		{{if not (and ($.UserDisabledFeatures.Contains "manage_credentials") (not $.EnableNotifyMail))}}
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.manage_emails"}}
+		</h4>
+		<div class="ui attached segment">
+			<div class="ui list flex-items-block">
+				{{if $.EnableNotifyMail}}
+				<div class="item">
+					<div class="tw-mb-2">{{ctx.Locale.Tr "settings.email_desc"}}</div>
+					<form action="{{AppSubUrl}}/user/settings/account/email" class="ui form" method="post">
+						{{$.CsrfTokenHtml}}
+						<input name="_method" type="hidden" value="NOTIFICATION">
+						<div class="tw-flex tw-flex-wrap tw-gap-2">
+							<div class="ui selection dropdown">
+								<input name="preference" type="hidden" value="{{.EmailNotificationsPreference}}">
+								{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+								<div class="text"></div>
+								<div class="menu">
+									<div data-value="enabled" class="{{if eq .EmailNotificationsPreference "enabled"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.email_notifications.enable"}}</div>
+									<div data-value="andyourown" class="{{if eq .EmailNotificationsPreference "andyourown"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.email_notifications.andyourown"}}</div>
+									<div data-value="onmention" class="{{if eq .EmailNotificationsPreference "onmention"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.email_notifications.onmention"}}</div>
+									<div data-value="disabled" class="{{if eq .EmailNotificationsPreference "disabled"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.email_notifications.disable"}}</div>
+								</div>
+							</div>
+							<button class="ui primary button">{{ctx.Locale.Tr "settings.email_notifications.submit"}}</button>
+						</div>
+					</form>
+				</div>
+				{{end}}
+				{{if not ($.UserDisabledFeatures.Contains "manage_credentials")}}
+					{{range .Emails}}
+						<div class="item tw-flex-wrap">
+							<div class="content tw-flex-1">
+								<strong>{{.Email}}</strong>
+								{{if .IsPrimary}}
+									<div class="ui primary label">{{ctx.Locale.Tr "settings.primary"}}</div>
+								{{end}}
+								{{if .IsActivated}}
+									<div class="ui green label">{{ctx.Locale.Tr "settings.activated"}}</div>
+								{{else}}
+									<div class="ui label">{{ctx.Locale.Tr "settings.requires_activation"}}</div>
+								{{end}}
+							</div>
+							<div class="flex-text-block">
+							{{if not .IsPrimary}}
+								<button class="ui red tiny button delete-button" data-modal-id="delete-email" data-url="{{AppSubUrl}}/user/settings/account/email/delete" data-id="{{.ID}}">
+									{{ctx.Locale.Tr "settings.delete_email"}}
+								</button>
+								{{if .CanBePrimary}}
+									<form action="{{AppSubUrl}}/user/settings/account/email" method="post">
+										{{$.CsrfTokenHtml}}
+										<input name="_method" type="hidden" value="PRIMARY">
+										<input name="id" type="hidden" value="{{.ID}}">
+										<button class="ui primary tiny button">{{ctx.Locale.Tr "settings.primary_email"}}</button>
+									</form>
+								{{end}}
+							{{end}}
+							{{if not .IsActivated}}
+								<form action="{{AppSubUrl}}/user/settings/account/email" method="post">
+									{{$.CsrfTokenHtml}}
+									<input name="_method" type="hidden" value="SENDACTIVATION">
+									<input name="id" type="hidden" value="{{.ID}}">
+									{{if $.ActivationsPending}}
+										<button disabled class="ui primary tiny button">{{ctx.Locale.Tr "settings.activations_pending"}}</button>
+									{{else}}
+										<button class="ui primary tiny button">{{ctx.Locale.Tr "settings.activate_email"}}</button>
+									{{end}}
+								</form>
+							{{end}}
+							</div>
+						</div>
+					{{end}}{{/* range Emails */}}
+				{{end}}{{/* if manage_credentials */}}
+			</div>
+		</div>
+		{{end}}
+
+		{{if not ($.UserDisabledFeatures.Contains "manage_credentials")}}
+		<div class="ui bottom attached segment">
+			<form class="ui form" action="{{AppSubUrl}}/user/settings/account/email" method="post">
+				{{.CsrfTokenHtml}}
+				<div class="required field {{if .Err_Email}}error{{end}}">
+					<label for="email">{{ctx.Locale.Tr "settings.add_new_email"}}</label>
+					<input id="email" name="email" type="email" required {{if not .CanAddEmails}}disabled{{end}}>
+				</div>
+				<button class="ui primary button" {{if not .CanAddEmails}}disabled{{end}}>
+					{{ctx.Locale.Tr "settings.add_email"}}
+				</button>
+			</form>
+			{{/* if ActivationsPending is false, then CanAddEmails must be true, so if CanAddEmails is false, ActivationsPending must be true */}}
+			{{if not .CanAddEmails}}
+				<div class="ui warning message">{{ctx.Locale.Tr "settings.can_not_add_email_activations_pending"}}</div>
+			{{end}}
+		</div>
+		{{end}}
+
+		{{if not ($.UserDisabledFeatures.Contains "deletion")}}
+		<h4 class="ui top attached error header">
+			{{ctx.Locale.Tr "settings.delete_account"}}
+		</h4>
+		<div class="ui attached error segment">
+			<div class="ui red message">
+				<p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "settings.delete_prompt"}}</p>
+				{{if .UserDeleteWithComments}}
+				<p class="text left tw-font-semibold">{{ctx.Locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime}}</p>
+				{{end}}
+			</div>
+			<form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post">
+				{{template "base/disable_form_autofill"}}
+				{{.CsrfTokenHtml}}
+				<div class="required field {{if .Err_Password}}error{{end}}">
+					<label for="password-confirmation">{{ctx.Locale.Tr "password"}}</label>
+					<input id="password-confirmation" name="password" type="password" autocomplete="off" required>
+				</div>
+				<div class="field">
+					<button class="ui red button delete-button" data-modal-id="delete-account" data-type="form" data-form="#delete-form">
+						{{ctx.Locale.Tr "settings.confirm_delete_account"}}
+					</button>
+				</div>
+			</form>
+			<div class="ui g-modal-confirm delete modal" id="delete-account">
+				<div class="header">
+					{{svg "octicon-trash"}}
+					{{ctx.Locale.Tr "settings.delete_account_title"}}
+				</div>
+				<div class="content">
+					<p>{{ctx.Locale.Tr "settings.delete_account_desc"}}</p>
+				</div>
+				{{template "base/modal_actions_confirm" .}}
+			</div>
+		</div>
+		{{end}}
+	</div>
+
+<div class="ui g-modal-confirm delete modal" id="delete-email">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "settings.email_deletion"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "settings.email_deletion_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/actions.tmpl b/user/settings/actions.tmpl
new file mode 100644
index 0000000..abc5443
--- /dev/null
+++ b/user/settings/actions.tmpl
@@ -0,0 +1,12 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings actions")}}
+	<div class="user-setting-content">
+	{{if eq .PageType "secrets"}}
+		{{template "shared/secrets/add_list" .}}
+	{{else if eq .PageType "runners"}}
+		{{template "shared/actions/runner_list" .}}
+	{{else if eq .PageType "variables"}}
+		{{template "shared/variables/variable_list" .}}
+	{{end}}
+	</div>
+
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/appearance.tmpl b/user/settings/appearance.tmpl
new file mode 100644
index 0000000..4fa2489
--- /dev/null
+++ b/user/settings/appearance.tmpl
@@ -0,0 +1,157 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings")}}
+	<div class="user-setting-content">
+
+		<!-- Theme -->
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.manage_themes"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="{{.Link}}/theme" method="post">
+				{{.CsrfTokenHtml}}
+				<div class="field">
+					{{ctx.Locale.Tr "settings.theme_desc"}}
+					<a class="muted" target="_blank" href="https://github.com/go-gitea/gitea/blob/main/web_src/css/themes/" data-tooltip-content="{{ctx.Locale.Tr "settings.theme_colorblindness_prompt"}}">
+						{{svg "octicon-question"}} {{ctx.Locale.Tr "settings.theme_colorblindness_help"}}
+					</a>
+				</div>
+				<div class="field">
+					<label>{{ctx.Locale.Tr "settings.ui"}}</label>
+					<select name="theme" class="ui dropdown">
+						{{range $theme := .AllThemes}}
+						<option value="{{$theme}}" {{Iif (eq $.SignedUser.Theme $theme) "selected"}}>{{$theme}}</option>
+						{{end}}
+					</select>
+				</div>
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "settings.update_theme"}}</button>
+				</div>
+			</form>
+		</div>
+
+		<!-- Language -->
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.language"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="{{.Link}}/language" method="post">
+				{{.CsrfTokenHtml}}
+				<div class="field">
+					<div class="ui language selection dropdown" id="language">
+						<input name="language" type="hidden" value="{{.SignedUser.Language}}">
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="text">{{range .AllLangs}}{{if eq $.SignedUser.Language .Lang}}{{.Name}}{{end}}{{end}}</div>
+						<div class="menu">
+						{{range .AllLangs}}
+							<div class="item{{if eq $.SignedUser.Language .Lang}} active selected{{end}}" data-value="{{.Lang}}">{{.Name}}</div>
+						{{end}}
+						</div>
+					</div>
+				</div>
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "settings.update_language"}}</button>
+				</div>
+			</form>
+		</div>
+
+		<!-- Shown comment event types -->
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.hidden_comment_types"}}
+		</h4>
+		<div class="ui attached segment">
+			<p class="help">
+				{{ctx.Locale.Tr "settings.hidden_comment_types_description"}}
+			</p>
+			<form class="ui form" action="{{.Link}}/hidden_comments" method="post">
+				{{.CsrfTokenHtml}}
+				<div class="inline field">
+					<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "settings.hidden_comment_types.ref_tooltip"}}">
+						<input name="reference" type="checkbox" {{if(call .IsCommentTypeGroupChecked "reference")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_reference"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="label" type="checkbox" {{if (call .IsCommentTypeGroupChecked "label")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_label"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="milestone" type="checkbox" {{if (call .IsCommentTypeGroupChecked "milestone")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_milestone"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="assignee" type="checkbox" {{if (call .IsCommentTypeGroupChecked "assignee")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_assignee"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="title" type="checkbox" {{if (call .IsCommentTypeGroupChecked "title")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_title"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="branch" type="checkbox" {{if (call .IsCommentTypeGroupChecked "branch")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_branch"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="time_tracking" type="checkbox" {{if (call .IsCommentTypeGroupChecked "time_tracking")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_time_tracking"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="deadline" type="checkbox" {{if (call .IsCommentTypeGroupChecked "deadline")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_deadline"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="dependency" type="checkbox" {{if (call .IsCommentTypeGroupChecked "dependency")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_dependency"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="lock" type="checkbox" {{if (call .IsCommentTypeGroupChecked "lock")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_lock"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="review_request" type="checkbox" {{if (call .IsCommentTypeGroupChecked "review_request")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_review_request"}}</label>
+					</div>
+				</div>
+
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="pull_request_push" type="checkbox" {{if (call .IsCommentTypeGroupChecked "pull_request_push")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_pull_request_push"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox">
+						<input name="project" type="checkbox" {{if (call .IsCommentTypeGroupChecked "project")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_project"}}</label>
+					</div>
+				</div>
+				<div class="inline field">
+					<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "settings.hidden_comment_types.issue_ref_tooltip"}}">
+						<input name="issue_ref" type="checkbox" {{if (call .IsCommentTypeGroupChecked "issue_ref")}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.comment_type_group_issue_ref"}}</label>
+					</div>
+				</div>
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "save"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/applications.tmpl b/user/settings/applications.tmpl
new file mode 100644
index 0000000..31d1a2a
--- /dev/null
+++ b/user/settings/applications.tmpl
@@ -0,0 +1,115 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings applications")}}
+	<div class="user-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.manage_access_token"}}
+		</h4>
+		<div class="ui attached segment">
+			<div class="flex-list">
+				<div class="flex-item">
+					{{ctx.Locale.Tr "settings.tokens_desc"}}
+				</div>
+				{{range .Tokens}}
+					<div class="flex-item">
+						<div class="flex-item-leading">
+							<span class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{ctx.Locale.Tr "settings.token_state_desc"}}"{{end}}>
+								{{svg "fontawesome-send" 32}}
+							</span>
+						</div>
+						<div class="flex-item-main">
+							<details>
+								<summary><span class="flex-item-title">{{.Name}}</span></summary>
+								<p class="tw-my-1">
+									{{ctx.Locale.Tr "settings.repo_and_org_access"}}:
+									{{if .DisplayPublicOnly}}
+										{{ctx.Locale.Tr "settings.permissions_public_only"}}
+									{{else}}
+										{{ctx.Locale.Tr "settings.permissions_access_all"}}
+									{{end}}
+								</p>
+								<p class="tw-my-1">{{ctx.Locale.Tr "settings.permissions_list"}}</p>
+								<ul class="tw-my-1">
+								{{range .Scope.StringSlice}}
+									{{if (ne . $.AccessTokenScopePublicOnly)}}
+										<li>{{.}}</li>
+									{{end}}
+								{{end}}
+								</ul>
+							</details>
+							<div class="flex-item-body">
+								<i>{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateUtils.AbsoluteShort .UpdatedUnix}}</span>{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}</i>
+							</div>
+						</div>
+						<div class="flex-item-trailing">
+								<button class="ui red tiny button delete-button" data-modal-id="delete-token" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
+									{{svg "octicon-trash" 16 "tw-mr-1"}}
+									{{ctx.Locale.Tr "settings.delete_token"}}
+								</button>
+						</div>
+					</div>
+				{{end}}
+			</div>
+		</div>
+		<div class="ui bottom attached segment">
+			<h5 class="ui top header">
+				{{ctx.Locale.Tr "settings.generate_new_token"}}
+			</h5>
+			<form id="scoped-access-form" class="ui form ignore-dirty" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<div class="field {{if .Err_Name}}error{{end}}">
+					<label for="name">{{ctx.Locale.Tr "settings.token_name"}}</label>
+					<input id="name" name="name" value="{{.name}}" autofocus required maxlength="255">
+				</div>
+				<div class="field">
+					<label>{{ctx.Locale.Tr "settings.repo_and_org_access"}}</label>
+					<label class="tw-cursor-pointer">
+						<input class="enable-system tw-mt-1 tw-mr-1" type="radio" name="scope" value="{{$.AccessTokenScopePublicOnly}}">
+						{{ctx.Locale.Tr "settings.permissions_public_only"}}
+					</label>
+					<label class="tw-cursor-pointer">
+						<input class="enable-system tw-mt-1 tw-mr-1" type="radio" name="scope" value="" checked>
+						{{ctx.Locale.Tr "settings.permissions_access_all"}}
+					</label>
+				</div>
+				<details class="ui optional field">
+					<summary class="tw-pb-4 tw-pl-1">
+						{{ctx.Locale.Tr "settings.select_permissions"}}
+					</summary>
+					<p class="activity meta">
+						<i>{{ctx.Locale.Tr "settings.access_token_desc" (HTMLFormat `href="%s/api/swagger" target="_blank"` AppSubUrl) (`href="https://docs.gitea.com/development/oauth2-provider#scopes" target="_blank"`|SafeHTML)}}</i>
+					</p>
+					<div id="scoped-access-token-selector"
+						data-is-admin="{{if .IsAdmin}}true{{else}}false{{end}}"
+						data-no-access-label="{{ctx.Locale.Tr "settings.permission_no_access"}}"
+						data-read-label="{{ctx.Locale.Tr "settings.permission_read"}}"
+						data-write-label="{{ctx.Locale.Tr "settings.permission_write"}}"
+						data-locale-component-failed-to-load="{{ctx.Locale.Tr "graphs.component_failed_to_load"}}"
+					>
+					</div>
+				</details>
+				<button id="scoped-access-submit" class="ui primary button">
+					{{ctx.Locale.Tr "settings.generate_token"}}
+				</button>
+			</form>{{/* Fomantic ".ui.form .warning.message" is hidden by default, so put the warning message out of the form*/}}
+			<div id="scoped-access-warning" class="ui warning message center tw-hidden">
+				{{ctx.Locale.Tr "settings.at_least_one_permission"}}
+			</div>
+		</div>
+
+		{{if .EnableOAuth2}}
+			{{template "user/settings/grants_oauth2" .}}
+			{{template "user/settings/applications_oauth2" .}}
+		{{end}}
+	</div>
+
+<div class="ui g-modal-confirm delete modal" id="delete-token">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "settings.access_token_deletion"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "settings.access_token_deletion_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm"}}
+</div>
+
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/applications_oauth2.tmpl b/user/settings/applications_oauth2.tmpl
new file mode 100644
index 0000000..866a1f8
--- /dev/null
+++ b/user/settings/applications_oauth2.tmpl
@@ -0,0 +1,6 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "settings.manage_oauth2_applications"}}
+</h4>
+
+{{template "user/settings/applications_oauth2_list" .}}
+
diff --git a/user/settings/applications_oauth2_edit.tmpl b/user/settings/applications_oauth2_edit.tmpl
new file mode 100644
index 0000000..2858ecd
--- /dev/null
+++ b/user/settings/applications_oauth2_edit.tmpl
@@ -0,0 +1,6 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings applications")}}
+	<div class="user-setting-content">
+
+		{{template "user/settings/applications_oauth2_edit_form" .}}
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/applications_oauth2_edit_form.tmpl b/user/settings/applications_oauth2_edit_form.tmpl
new file mode 100644
index 0000000..9447291
--- /dev/null
+++ b/user/settings/applications_oauth2_edit_form.tmpl
@@ -0,0 +1,60 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "settings.edit_oauth2_application"}}
+</h4>
+<div class="ui attached segment">
+	<p>{{ctx.Locale.Tr "settings.oauth2_application_create_description"}}</p>
+</div>
+<div class="ui attached segment form ignore-dirty">
+	{{.CsrfTokenHtml}}
+	<div class="field">
+		<label for="client-id">{{ctx.Locale.Tr "settings.oauth2_client_id"}}</label>
+		<input id="client-id" readonly value="{{.App.ClientID}}">
+	</div>
+	{{if .ClientSecret}}
+		<div class="field">
+			<label for="client-secret">{{ctx.Locale.Tr "settings.oauth2_client_secret"}}</label>
+			<input id="client-secret" type="text" readonly value="{{.ClientSecret}}">
+		</div>
+	{{else}}
+		<div class="field">
+			<label for="client-secret">{{ctx.Locale.Tr "settings.oauth2_client_secret"}}</label>
+			<input id="client-secret" type="password" readonly value="averysecuresecret">
+		</div>
+	{{end}}
+	<div class="item">
+		<!-- TODO add regenerate secret functionality */ -->
+		<form class="ui form ignore-dirty" action="{{.FormActionPath}}/regenerate_secret" method="post">
+			{{.CsrfTokenHtml}}
+			{{ctx.Locale.Tr "settings.oauth2_regenerate_secret_hint"}}
+			<button class="ui mini button tw-ml-2" type="submit">{{ctx.Locale.Tr "settings.oauth2_regenerate_secret"}}</button>
+		</form>
+	</div>
+</div>
+<div class="ui bottom attached segment">
+	<form class="ui form ignore-dirty" action="{{.FormActionPath}}" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="field {{if .Err_AppName}}error{{end}}">
+			<label for="application-name">{{ctx.Locale.Tr "settings.oauth2_application_name"}}</label>
+			<input id="application-name" value="{{.App.Name}}" name="application_name" required maxlength="255">
+		</div>
+		<div class="field {{if .Err_RedirectURI}}error{{end}}">
+			<label for="redirect-uris">{{ctx.Locale.Tr "settings.oauth2_redirect_uris"}}</label>
+			<textarea name="redirect_uris" id="redirect-uris" required>{{StringUtils.Join .App.RedirectURIs "\n"}}</textarea>
+		</div>
+		<div class="field {{if .Err_ConfidentialClient}}error{{end}}">
+			<div class="ui checkbox">
+				<label>{{ctx.Locale.Tr "settings.oauth2_confidential_client"}}</label>
+				<input class="disable-setting" type="checkbox" name="confidential_client" data-target="#skip-secondary-authorization" {{if .App.ConfidentialClient}}checked{{end}}>
+			</div>
+		</div>
+		<div class="field {{if .Err_SkipSecondaryAuthorization}}error{{end}} {{if .App.ConfidentialClient}}disabled{{end}}" id="skip-secondary-authorization">
+			<div class="ui checkbox">
+				<label>{{ctx.Locale.Tr "settings.oauth2_skip_secondary_authorization"}}</label>
+				<input type="checkbox" name="skip_secondary_authorization" {{if .App.SkipSecondaryAuthorization}}checked{{end}}>
+			</div>
+		</div>
+		<button class="ui primary button">
+			{{ctx.Locale.Tr "settings.save_application"}}
+		</button>
+	</form>
+</div>
diff --git a/user/settings/applications_oauth2_list.tmpl b/user/settings/applications_oauth2_list.tmpl
new file mode 100644
index 0000000..61098e1
--- /dev/null
+++ b/user/settings/applications_oauth2_list.tmpl
@@ -0,0 +1,80 @@
+<div class="ui attached segment">
+	<div class="flex-list">
+		<div class="flex-item">
+			{{ctx.Locale.Tr "settings.oauth2_application_create_description"}}
+		</div>
+		{{range .Applications}}
+			<div class="flex-item tw-items-center">
+				<div class="flex-item-leading">
+					{{svg "octicon-apps" 32}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-title">{{.Name}}</div>
+					<div class="flex-item-body">
+						{{ctx.Locale.Tr "settings.oauth2_client_id"}}
+						<span class="ui label">{{.ClientID}}</span>
+					</div>
+				</div>
+				{{$isBuiltin := and $.BuiltinApplications (index $.BuiltinApplications .ClientID)}}
+				<div class="flex-item-trailing">
+					{{if $isBuiltin}}
+						<span class="ui basic label" data-tooltip-content="{{ctx.Locale.Tr "settings.oauth2_application_locked"}}">{{ctx.Locale.Tr "locked"}}</span>
+					{{else}}
+						<a href="{{$.Link}}/oauth2/{{.ID}}" class="ui primary tiny button">
+							{{svg "octicon-pencil" 16 "tw-mr-1"}}
+							{{ctx.Locale.Tr "settings.oauth2_application_edit"}}
+						</a>
+						<button class="ui red tiny button delete-button" data-modal-id="remove-gitea-oauth2-application"
+								data-url="{{$.Link}}/oauth2/{{.ID}}/delete">
+							{{svg "octicon-trash" 16 "tw-mr-1"}}
+							{{ctx.Locale.Tr "settings.delete_key"}}
+						</button>
+					{{end}}
+				</div>
+			</div>
+		{{end}}
+	</div>
+
+	<div class="ui g-modal-confirm delete modal" id="remove-gitea-oauth2-application">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "settings.remove_oauth2_application"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.oauth2_application_remove_description"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+</div>
+
+<div class="ui bottom attached segment">
+	<h5 class="ui top header">
+		{{ctx.Locale.Tr "settings.create_oauth2_application"}}
+	</h5>
+	<form class="ui form ignore-dirty" action="{{.Link}}/oauth2" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="field {{if .Err_AppName}}error{{end}}">
+			<label for="application-name">{{ctx.Locale.Tr "settings.oauth2_application_name"}}</label>
+			<input id="application-name" name="application_name" value="{{.application_name}}" required maxlength="255">
+		</div>
+		<div class="field {{if .Err_RedirectURI}}error{{end}}">
+			<label for="redirect-uris">{{ctx.Locale.Tr "settings.oauth2_redirect_uris"}}</label>
+			<textarea name="redirect_uris" id="redirect-uris"></textarea>
+		</div>
+		<div class="field {{if .Err_ConfidentialClient}}error{{end}}">
+			<div class="ui checkbox">
+				<label>{{ctx.Locale.Tr "settings.oauth2_confidential_client"}}</label>
+				<input class="disable-setting" type="checkbox" name="confidential_client" data-target="#skip-secondary-authorization" checked>
+			</div>
+		</div>
+		<div class="field {{if .Err_SkipSecondaryAuthorization}}error{{end}} disabled" id="skip-secondary-authorization">
+			<div class="ui checkbox">
+				<label>{{ctx.Locale.Tr "settings.oauth2_skip_secondary_authorization"}}</label>
+				<input type="checkbox" name="skip_secondary_authorization">
+			</div>
+		</div>
+		<button class="ui primary button">
+			{{ctx.Locale.Tr "settings.create_oauth2_application_button"}}
+		</button>
+	</form>
+</div>
diff --git a/user/settings/blocked_users.tmpl b/user/settings/blocked_users.tmpl
new file mode 100644
index 0000000..e495b85
--- /dev/null
+++ b/user/settings/blocked_users.tmpl
@@ -0,0 +1,5 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings blocked_users")}}
+	<div class="user-setting-content">
+		{{template "shared/user/blocked_users" .}}
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/grants_oauth2.tmpl b/user/settings/grants_oauth2.tmpl
new file mode 100644
index 0000000..3f0f79c
--- /dev/null
+++ b/user/settings/grants_oauth2.tmpl
@@ -0,0 +1,40 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "settings.authorized_oauth2_applications"}}
+</h4>
+<div class="ui attached segment">
+	<div class="flex-list">
+		<div class="flex-item">
+			{{ctx.Locale.Tr "settings.authorized_oauth2_applications_description"}}
+		</div>
+		{{range .Grants}}
+			<div class="flex-item">
+				<div class="flex-item-leading">
+					{{svg "octicon-key" 32}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-title">{{.Application.Name}}</div>
+					<div class="flex-item-body">
+						<i>{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}}</i>
+					</div>
+				</div>
+				<div class="flex-item-trailing">
+					<button class="ui red tiny button delete-button" data-modal-id="revoke-gitea-oauth2-grant"
+							data-url="{{AppSubUrl}}/user/settings/applications/oauth2/{{.ApplicationID}}/revoke/{{.ID}}">
+						{{ctx.Locale.Tr "settings.revoke_key"}}
+					</button>
+				</div>
+			</div>
+		{{end}}
+	</div>
+
+	<div class="ui g-modal-confirm delete modal" id="revoke-gitea-oauth2-grant">
+		<div class="header">
+			{{svg "octicon-shield" 16 "tw-mr-1"}}
+			{{ctx.Locale.Tr "settings.revoke_oauth2_grant"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.revoke_oauth2_grant_description"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+</div>
diff --git a/user/settings/hook_new.tmpl b/user/settings/hook_new.tmpl
new file mode 100644
index 0000000..be21f59
--- /dev/null
+++ b/user/settings/hook_new.tmpl
@@ -0,0 +1,7 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings new webhook")}}
+	<div class="user-setting-content">
+		{{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}}
+		{{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}}
+		{{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}}
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/hooks.tmpl b/user/settings/hooks.tmpl
new file mode 100644
index 0000000..477c333
--- /dev/null
+++ b/user/settings/hooks.tmpl
@@ -0,0 +1,5 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings webhooks")}}
+	<div class="user-setting-content">
+		{{template "repo/settings/webhook/list" .}}
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/keys.tmpl b/user/settings/keys.tmpl
new file mode 100644
index 0000000..e0f5e42
--- /dev/null
+++ b/user/settings/keys.tmpl
@@ -0,0 +1,11 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings sshkeys")}}
+	<div class="user-setting-content">
+		{{if not ($.UserDisabledFeatures.Contains "manage_ssh_keys")}}
+			{{template "user/settings/keys_ssh" .}}
+		{{end}}
+		{{template "user/settings/keys_principal" .}}
+		{{if not ($.UserDisabledFeatures.Contains "manage_gpg_keys")}}
+		{{template "user/settings/keys_gpg" .}}
+		{{end}}
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/keys_gpg.tmpl b/user/settings/keys_gpg.tmpl
new file mode 100644
index 0000000..e44a838
--- /dev/null
+++ b/user/settings/keys_gpg.tmpl
@@ -0,0 +1,123 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "settings.manage_gpg_keys"}}
+	<div class="ui right">
+		<button class="ui primary tiny show-panel toggle button" data-panel="#add-gpg-key-panel">{{ctx.Locale.Tr "settings.add_key"}}</button>
+	</div>
+</h4>
+<div class="ui attached segment">
+	<div class="{{if not .HasGPGError}}tw-hidden{{end}} tw-mb-4" id="add-gpg-key-panel">
+		<form class="ui form{{if .HasGPGError}} error{{end}}" action="{{.Link}}" method="post">
+			{{.CsrfTokenHtml}}
+			<input type="hidden" name="title" value="none">
+			<div class="field {{if .Err_Content}}error{{end}}">
+				<label for="gpg-key-content">{{ctx.Locale.Tr "settings.key_content"}}</label>
+				<textarea id="gpg-key-content" name="content" placeholder="{{ctx.Locale.Tr "settings.key_content_gpg_placeholder"}}" required>{{.content}}</textarea>
+			</div>
+			{{if .Err_Signature}}
+				<div class="ui error message">
+					<p>{{ctx.Locale.Tr "settings.gpg_token_required"}}</p>
+				</div>
+				<div class="field">
+					<label for="token">{{ctx.Locale.Tr "settings.gpg_token"}}</label>
+					<input readonly="" value="{{.TokenToSign}}">
+					<div class="help">
+						<p>{{ctx.Locale.Tr "settings.gpg_token_help"}}</p>
+						<p><code>{{printf `echo "%s" | gpg -a --default-key %s --detach-sig` .TokenToSign .PaddedKeyID}}</code></p>
+					</div>
+				</div>
+				<div class="field">
+					<label for="gpg-key-signature">{{ctx.Locale.Tr "settings.gpg_token_signature"}}</label>
+					<textarea id="gpg-key-signature" name="signature" placeholder="{{ctx.Locale.Tr "settings.key_signature_gpg_placeholder"}}" required>{{.signature}}</textarea>
+				</div>
+			{{end}}
+			<input name="type" type="hidden" value="gpg">
+			<button class="ui primary button">
+				{{ctx.Locale.Tr "settings.add_key"}}
+			</button>
+			<button class="ui hide-panel button" data-panel="#add-gpg-key-panel">
+				{{ctx.Locale.Tr "cancel"}}
+			</button>
+		</form>
+	</div>
+	<div class="flex-list">
+		<div class="flex-item">
+			<p>
+				{{ctx.Locale.Tr "settings.gpg_desc"}}<br>
+				{{ctx.Locale.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification"}}
+			</p>
+		</div>
+		{{range .GPGKeys}}
+			<div class="flex-item">
+				<div class="flex-item-leading">
+					<span class="text {{if or .ExpiredUnix.IsZero ($.PageStartTime.Before .ExpiredUnix.AsTime)}}green{{end}}">{{svg "octicon-key" 32}}</span>
+				</div>
+				<div class="flex-item-main">
+					{{if .Verified}}
+						<span class="flex-text-block" data-tooltip-content="{{ctx.Locale.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-verified"}} <strong>{{ctx.Locale.Tr "settings.gpg_key_verified"}}</strong></span>
+					{{end}}
+					{{if .Emails}}
+						<span class="flex-text-block" data-tooltip-content="{{ctx.Locale.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{ctx.Locale.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span>
+					{{end}}
+					<div class="flex-item-body">
+						<b>{{ctx.Locale.Tr "settings.key_id"}}:</b> {{.PaddedKeyID}}
+						<b>{{ctx.Locale.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.PaddedKeyID}} {{end}}
+					</div>
+					<div class="flex-item-body">
+						<i>{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .AddedUnix)}}</i>
+						-
+						<i>{{if not .ExpiredUnix.IsZero}}{{ctx.Locale.Tr "settings.valid_until_date" (DateUtils.AbsoluteShort .ExpiredUnix)}}{{else}}{{ctx.Locale.Tr "settings.valid_forever"}}{{end}}</i>
+					</div>
+				</div>
+				<div class="flex-item-trailing">
+					<button class="ui red tiny button delete-button" data-modal-id="delete-gpg" data-url="{{$.Link}}/delete?type=gpg" data-id="{{.ID}}">
+						{{ctx.Locale.Tr "settings.delete_key"}}
+					</button>
+					{{if and (not .Verified) (ne $.VerifyingID .KeyID)}}
+						<a class="ui primary tiny button" href="?verify_gpg={{.KeyID}}">{{ctx.Locale.Tr "settings.gpg_key_verify"}}</a>
+					{{end}}
+				</div>
+			</div>
+			{{if and (not .Verified) (eq $.VerifyingID .KeyID)}}
+				<div class="ui  segment">
+					<h4>{{ctx.Locale.Tr "settings.gpg_token_required"}}</h4>
+					<form class="ui form{{if $.HasGPGVerifyError}} error{{end}}" action="{{$.Link}}" method="post">
+						{{$.CsrfTokenHtml}}
+						<input type="hidden" name="title" value="none">
+						<input type="hidden" name="content" value="{{.KeyID}}">
+						<input type="hidden" name="key_id" value="{{.KeyID}}">
+						<div class="field">
+							<label for="token">{{ctx.Locale.Tr "settings.gpg_token"}}</label>
+							<input readonly="" value="{{$.TokenToSign}}">
+							<div class="help">
+								<p>{{ctx.Locale.Tr "settings.gpg_token_help"}}</p>
+								<p><code>{{printf `echo "%s" | gpg -a --default-key %s --detach-sig` $.TokenToSign .PaddedKeyID}}</code></p>
+							</div>
+							<br>
+						</div>
+						<div class="field">
+							<label for="signature">{{ctx.Locale.Tr "settings.gpg_token_signature"}}</label>
+							<textarea id="gpg-key-signature" name="signature" placeholder="{{ctx.Locale.Tr "settings.key_signature_gpg_placeholder"}}" required>{{$.signature}}</textarea>
+						</div>
+						<input name="type" type="hidden" value="verify_gpg">
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "settings.gpg_key_verify"}}
+						</button>
+						<a class="ui red button" href="{{$.Link}}">
+							{{ctx.Locale.Tr "settings.cancel"}}
+						</a>
+					</form>
+				</div>
+			{{end}}
+		{{end}}
+	</div>
+	<div class="ui g-modal-confirm delete modal" id="delete-gpg">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "settings.gpg_key_deletion"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.gpg_key_deletion_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+</div>
diff --git a/user/settings/keys_principal.tmpl b/user/settings/keys_principal.tmpl
new file mode 100644
index 0000000..cf335f7
--- /dev/null
+++ b/user/settings/keys_principal.tmpl
@@ -0,0 +1,69 @@
+{{if .AllowPrincipals}}
+	<h4 class="ui top attached header">
+		{{ctx.Locale.Tr "settings.manage_ssh_principals"}}
+		<div class="ui right">
+		{{if not .DisableSSH}}
+			<button class="ui primary tiny show-panel button" data-panel="#add-ssh-principal-panel">{{ctx.Locale.Tr "settings.add_new_principal"}}</button>
+		{{else}}
+			<button class="ui primary tiny button disabled">{{ctx.Locale.Tr "settings.ssh_disabled"}}</button>
+		{{end}}
+		</div>
+	</h4>
+	<div class="ui attached segment">
+		<div class="flex-list">
+			<div class="flex-item">
+				{{ctx.Locale.Tr "settings.principal_desc"}}
+			</div>
+			{{range .Principals}}
+				<div class="flex-item">
+					<div class="flex-item-leading">
+						<span class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{ctx.Locale.Tr "settings.principal_state_desc"}}"{{end}}>{{svg "octicon-key" 32}}</span>
+					</div>
+					<div class="flex-item-main">
+						<div class="flex-item-title">{{.Name}}</div>
+						<div class="flex-item-body">
+							<i>{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} —  {{svg "octicon-info" 16}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateUtils.AbsoluteShort .UpdatedUnix}}</span>{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}</i>
+						</div>
+					</div>
+					<div class="flex-item-trailing">
+						<button class="ui red tiny button delete-button" data-modal-id="delete-principal" data-url="{{$.Link}}/delete?type=principal" data-id="{{.ID}}">
+							{{ctx.Locale.Tr "settings.delete_key"}}
+						</button>
+					</div>
+				</div>
+			{{end}}
+		</div>
+	</div>
+	<br>
+
+	<div {{if not .HasPrincipalError}}class="tw-hidden"{{end}} id="add-ssh-principal-panel">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.add_new_principal"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<div class="field {{if .Err_Content}}error{{end}}">
+					<label for="ssh-principal-content">{{ctx.Locale.Tr "settings.principal_content"}}</label>
+					<input id="ssh-principal-content" name="content" value="{{.content}}" autofocus required>
+				</div>
+				<input name="title" type="hidden" value="principal">
+				<input name="type" type="hidden" value="principal">
+				<button class="ui primary button">
+					{{ctx.Locale.Tr "settings.add_new_principal"}}
+				</button>
+			</form>
+		</div>
+	</div>
+
+	<div class="ui g-modal-confirm delete modal" id="delete-principal">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "settings.ssh_principal_deletion"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.ssh_principal_deletion_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+{{end}}
diff --git a/user/settings/keys_ssh.tmpl b/user/settings/keys_ssh.tmpl
new file mode 100644
index 0000000..b894ccd
--- /dev/null
+++ b/user/settings/keys_ssh.tmpl
@@ -0,0 +1,111 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "settings.manage_ssh_keys"}}
+	<div class="ui right">
+		<button id="add-ssh-button" class="ui primary tiny show-panel toggle button" data-panel="#add-ssh-key-panel">
+			{{ctx.Locale.Tr "settings.add_key"}}
+		</button>
+	</div>
+</h4>
+<div class="ui attached segment">
+	<div class="{{if not .HasSSHError}}tw-hidden{{end}} tw-mb-4" id="add-ssh-key-panel">
+		<form class="ui form" action="{{.Link}}" method="post">
+			{{.CsrfTokenHtml}}
+			<div class="field {{if .Err_Title}}error{{end}}">
+				<label for="ssh-key-title">{{ctx.Locale.Tr "settings.key_name"}}</label>
+				<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required maxlength="50">
+			</div>
+			<div class="field {{if .Err_Content}}error{{end}}">
+				<label for="ssh-key-content">{{ctx.Locale.Tr "settings.key_content"}}</label>
+				<textarea id="ssh-key-content" name="content" placeholder="{{ctx.Locale.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
+			</div>
+			<input name="type" type="hidden" value="ssh">
+			<button class="ui primary button">
+				{{ctx.Locale.Tr "settings.add_key"}}
+			</button>
+			<button id="cancel-ssh-button" class="ui hide-panel button" data-panel="#add-ssh-key-panel">
+				{{ctx.Locale.Tr "cancel"}}
+			</button>
+		</form>
+	</div>
+	<div id="keys-ssh" class="flex-list">
+		<div class="flex-item">
+			<p>
+				{{ctx.Locale.Tr "settings.ssh_desc"}}<br>
+				{{ctx.Locale.Tr "settings.ssh_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh"}}
+			</p>
+		</div>
+		{{if .DisableSSH}}
+			<div class="flex-item">
+				{{ctx.Locale.Tr "settings.ssh_signonly"}}
+			</div>
+		{{end}}
+		{{range $index, $key := .Keys}}
+			<div class="flex-item">
+				<div class="flex-item-leading">
+					<span class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{ctx.Locale.Tr "settings.key_state_desc"}}"{{end}}>{{svg "octicon-key" 32}}</span>
+				</div>
+				<div class="flex-item-main">
+						{{if .Verified}}
+							<div class="flex-item-title flex-text-block" data-tooltip-content="{{ctx.Locale.Tr "settings.ssh_key_verified_long"}}">{{svg "octicon-verified"}}{{ctx.Locale.Tr "settings.ssh_key_verified"}}</div>
+						{{end}}
+						<div class="flex-item-title">{{.Name}}</div>
+						<div class="flex-item-body">
+								{{.Fingerprint}}
+						</div>
+						<div class="flex-item-body">
+								<i>{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} —	{{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateUtils.AbsoluteShort .UpdatedUnix}}</span>{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}</i>
+						</div>
+				</div>
+				<div class="flex-item-trailing">
+					<button class="ui red tiny button delete-button{{if index $.ExternalKeys $index}} disabled{{end}}" data-modal-id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}"{{if index $.ExternalKeys $index}} title="{{ctx.Locale.Tr "settings.ssh_externally_managed"}}"{{end}}>
+						{{ctx.Locale.Tr "settings.delete_key"}}
+					</button>
+					{{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}}
+						<a class="ui primary tiny button" href="?verify_ssh={{.Fingerprint}}">{{ctx.Locale.Tr "settings.ssh_key_verify"}}</a>
+					{{end}}
+				</div>
+			</div>
+			{{if and (not .Verified) (eq $.VerifyingFingerprint .Fingerprint)}}
+				<div class="ui segment">
+					<h4>{{ctx.Locale.Tr "settings.ssh_token_required"}}</h4>
+					<form class="ui form{{if $.HasSSHVerifyError}} error{{end}}" action="{{$.Link}}" method="post">
+						{{$.CsrfTokenHtml}}
+						<input type="hidden" name="title" value="none">
+						<input type="hidden" name="content" value="{{.Content}}">
+						<input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
+						<div class="field">
+							<label for="token">{{ctx.Locale.Tr "settings.ssh_token"}}</label>
+							<input readonly="" value="{{$.TokenToSign}}">
+							<div class="help">
+								<p>{{ctx.Locale.Tr "settings.ssh_token_help"}}</p>
+								<p><code>{{printf "echo -n '%s' | ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey" $.TokenToSign}}</code></p>
+							</div>
+							<br>
+						</div>
+						<div class="field">
+							<label for="signature">{{ctx.Locale.Tr "settings.ssh_token_signature"}}</label>
+							<textarea id="ssh-key-signature" name="signature" placeholder="{{ctx.Locale.Tr "settings.key_signature_ssh_placeholder"}}" required>{{$.signature}}</textarea>
+						</div>
+						<input name="type" type="hidden" value="verify_ssh">
+						<button class="ui primary button">
+							{{ctx.Locale.Tr "settings.ssh_key_verify"}}
+						</button>
+						<a class="ui red button" href="{{$.Link}}">
+							{{ctx.Locale.Tr "settings.cancel"}}
+						</a>
+					</form>
+				</div>
+			{{end}}
+		{{end}}
+	</div>
+	<div class="ui g-modal-confirm delete modal" id="delete-ssh">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "settings.ssh_key_deletion"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.ssh_key_deletion_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+</div>
diff --git a/user/settings/layout_footer.tmpl b/user/settings/layout_footer.tmpl
new file mode 100644
index 0000000..46120d5
--- /dev/null
+++ b/user/settings/layout_footer.tmpl
@@ -0,0 +1,11 @@
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+<div class="page-content">
+	<div class="user-layout-right">
+		<div>
+		{{/* block: user-setting-content */}}
+{{end}}
+
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}
diff --git a/user/settings/layout_head.tmpl b/user/settings/layout_head.tmpl
new file mode 100644
index 0000000..dce496e
--- /dev/null
+++ b/user/settings/layout_head.tmpl
@@ -0,0 +1,13 @@
+{{template "base/head" .ctxData}}
+<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}">
+	<div class="ui container flex-container">
+		{{template "user/settings/navbar" .ctxData}}
+		<div class="flex-container-main">
+			{{template "base/alert" .ctxData}}
+			{{/* block: user-setting-content */}}
+
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+		</div>
+	</div>
+</div>
+{{end}}
diff --git a/user/settings/navbar.tmpl b/user/settings/navbar.tmpl
new file mode 100644
index 0000000..c6c1551
--- /dev/null
+++ b/user/settings/navbar.tmpl
@@ -0,0 +1,64 @@
+<div class="flex-container-nav">
+	<div class="ui fluid vertical menu">
+		<div class="header item">{{ctx.Locale.Tr "user.settings"}}</div>
+		<a class="{{if .PageIsSettingsProfile}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
+			{{ctx.Locale.Tr "settings.profile"}}
+		</a>
+		{{if not (and ($.UserDisabledFeatures.Contains "manage_credentials" "deletion") (not $.EnableNotifyMail))}}
+		<a class="{{if .PageIsSettingsAccount}}active {{end}}item" href="{{AppSubUrl}}/user/settings/account">
+			{{ctx.Locale.Tr "settings.account"}}
+		</a>
+		{{end}}
+		<a class="{{if .PageIsSettingsAppearance}}active {{end}}item" href="{{AppSubUrl}}/user/settings/appearance">
+			{{ctx.Locale.Tr "settings.appearance"}}
+		</a>
+		{{if not ($.UserDisabledFeatures.Contains "manage_mfa" "manage_credentials")}}
+		<a class="{{if .PageIsSettingsSecurity}}active {{end}}item" href="{{AppSubUrl}}/user/settings/security">
+			{{ctx.Locale.Tr "settings.security"}}
+		</a>
+		{{end}}
+		<a class="{{if .PageIsSettingsBlockedUsers}}active {{end}}item" href="{{AppSubUrl}}/user/settings/blocked_users">
+			{{ctx.Locale.Tr "user.block.list"}}
+		</a>
+		<a class="{{if .PageIsSettingsApplications}}active {{end}}item" href="{{AppSubUrl}}/user/settings/applications">
+			{{ctx.Locale.Tr "settings.applications"}}
+		</a>
+		{{if not ($.UserDisabledFeatures.Contains "manage_ssh_keys" "manage_gpg_keys")}}
+		<a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{AppSubUrl}}/user/settings/keys">
+			{{ctx.Locale.Tr "settings.ssh_gpg_keys"}}
+		</a>
+		{{end}}
+		{{if .EnableActions}}
+		<details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}>
+			<summary>{{ctx.Locale.Tr "actions.actions"}}</summary>
+			<div class="menu">
+				<a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{AppSubUrl}}/user/settings/actions/runners">
+					{{ctx.Locale.Tr "actions.runners"}}
+				</a>
+				<a class="{{if .PageIsSharedSettingsSecrets}}active {{end}}item" href="{{AppSubUrl}}/user/settings/actions/secrets">
+					{{ctx.Locale.Tr "secrets.secrets"}}
+				</a>
+				<a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{AppSubUrl}}/user/settings/actions/variables">
+					{{ctx.Locale.Tr "actions.variables"}}
+				</a>
+			</div>
+		</details>
+		{{end}}
+		{{if .EnablePackages}}
+		<a class="{{if .PageIsSettingsPackages}}active {{end}}item" href="{{AppSubUrl}}/user/settings/packages">
+			{{ctx.Locale.Tr "packages.title"}}
+		</a>
+		{{end}}
+		{{if not DisableWebhooks}}
+		<a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{AppSubUrl}}/user/settings/hooks">
+			{{ctx.Locale.Tr "repo.settings.hooks"}}
+		</a>
+		{{end}}
+		<a class="{{if .PageIsSettingsOrganization}}active {{end}}item" href="{{AppSubUrl}}/user/settings/organization">
+			{{ctx.Locale.Tr "settings.organization"}}
+		</a>
+		<a class="{{if .PageIsSettingsRepos}}active {{end}}item" href="{{AppSubUrl}}/user/settings/repos">
+			{{ctx.Locale.Tr "settings.repos"}}
+		</a>
+	</div>
+</div>
diff --git a/user/settings/organization.tmpl b/user/settings/organization.tmpl
new file mode 100644
index 0000000..16c27b5
--- /dev/null
+++ b/user/settings/organization.tmpl
@@ -0,0 +1,55 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings organization")}}
+	<div class="user-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.orgs"}}
+			{{if .SignedUser.CanCreateOrganization}}
+			<div class="ui right">
+				<a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{ctx.Locale.Tr "admin.orgs.new_orga"}}</a>
+			</div>
+			{{end}}
+		</h4>
+		<div class="ui attached segment orgs">
+			{{if .Orgs}}
+				<div class="flex-list">
+					{{range .Orgs}}
+					<div class="flex-item">
+						<div class="flex-item-leading">
+							{{ctx.AvatarUtils.Avatar . 28 "mini"}}
+						</div>
+						<div class="flex-item-main">
+							<div class="flex-item-title">{{template "shared/user/name" .}}</div>
+							<div class="flex-text-body">
+								{{.Description}}
+							</div>
+						</div>
+						<div class="flex-item-trailing">
+							<form>
+								{{$.CsrfTokenHtml}}
+								<button class="ui red button delete-button" data-modal-id="leave-organization"
+												data-url="{{.OrganisationLink}}/members/action/leave" data-datauid="{{$.SignedUser.ID}}"
+												data-name="{{$.SignedUser.DisplayName}}"
+												data-data-organization-name="{{.DisplayName}}">{{ctx.Locale.Tr "org.members.leave"}}
+								</button>
+							</form>
+						</div>
+					</div>
+					{{end}}
+				</div>
+				{{template "base/paginate" .}}
+			{{else}}
+				{{ctx.Locale.Tr "settings.orgs_none"}}
+			{{end}}
+		</div>
+	</div>
+
+<div class="ui g-modal-confirm delete modal" id="leave-organization">
+	<div class="header">
+		{{ctx.Locale.Tr "org.members.leave"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "org.members.leave.detail" (`<span class="dataOrganizationName"></span>`|SafeHTML)}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/packages.tmpl b/user/settings/packages.tmpl
new file mode 100644
index 0000000..80853ea
--- /dev/null
+++ b/user/settings/packages.tmpl
@@ -0,0 +1,24 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings packages")}}
+	<div class="user-setting-content">
+		{{template "package/shared/cleanup_rules/list" .}}
+		{{template "package/shared/cargo" .}}
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "packages.owner.settings.chef.title"}}
+		</h4>
+		<div class="ui attached segment">
+			<div class="ui form">
+				<div class="field">
+					<label>{{ctx.Locale.Tr "packages.owner.settings.chef.keypair.description"}}</label>
+				</div>
+				<form class="field" action="{{.Link}}/chef/regenerate_keypair" method="post">
+					{{.CsrfTokenHtml}}
+					<button class="ui primary button">{{ctx.Locale.Tr "packages.owner.settings.chef.keypair"}}</button>
+				</form>
+				<div class="field">
+					<label>{{ctx.Locale.Tr "packages.registry.documentation" "Chef" "https://docs.gitea.com/usage/packages/chef/"}}</label>
+				</div>
+			</div>
+		</div>
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/packages_cleanup_rules_edit.tmpl b/user/settings/packages_cleanup_rules_edit.tmpl
new file mode 100644
index 0000000..522b524
--- /dev/null
+++ b/user/settings/packages_cleanup_rules_edit.tmpl
@@ -0,0 +1,5 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings packages")}}
+	<div class="user-setting-content">
+		{{template "package/shared/cleanup_rules/edit" .}}
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/packages_cleanup_rules_preview.tmpl b/user/settings/packages_cleanup_rules_preview.tmpl
new file mode 100644
index 0000000..d99aee4
--- /dev/null
+++ b/user/settings/packages_cleanup_rules_preview.tmpl
@@ -0,0 +1,5 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user packages admin")}}
+	<div class="user-setting-content">
+		{{template "package/shared/cleanup_rules/preview" .}}
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/profile.tmpl b/user/settings/profile.tmpl
new file mode 100644
index 0000000..1977634
--- /dev/null
+++ b/user/settings/profile.tmpl
@@ -0,0 +1,143 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings profile")}}
+	<div class="user-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.public_profile"}}
+		</h4>
+		<div class="ui attached segment">
+			<p>{{ctx.Locale.Tr "settings.profile_desc"}}</p>
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<div class="required field {{if .Err_Name}}error{{end}}">
+					<label for="username">{{ctx.Locale.Tr "username"}}
+						<span class="text red tw-hidden" id="name-change-prompt"> {{ctx.Locale.Tr "settings.change_username_prompt"}}</span>
+						<span class="text red tw-hidden" id="name-change-redirect-prompt"> {{ctx.Locale.Tr "settings.change_username_redirect_prompt"}}</span>
+					</label>
+					<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if or (not .SignedUser.IsLocal) ($.UserDisabledFeatures.Contains "change_username") .IsReverseProxy}}disabled{{end}} maxlength="40">
+					{{if or (not .SignedUser.IsLocal) ($.UserDisabledFeatures.Contains "change_username") .IsReverseProxy}}
+					<p class="help text blue">{{ctx.Locale.Tr "settings.password_username_disabled"}}</p>
+					{{end}}
+				</div>
+				<div class="field {{if .Err_FullName}}error{{end}}">
+					<label for="full_name">{{ctx.Locale.Tr "settings.full_name"}}</label>
+					<input id="full_name" name="full_name" value="{{.SignedUser.FullName}}" {{if ($.UserDisabledFeatures.Contains "change_full_name")}}disabled{{end}} maxlength="100">
+					{{if ($.UserDisabledFeatures.Contains "change_full_name")}}
+					<p class="help text blue">{{ctx.Locale.Tr "settings.password_full_name_disabled"}}</p>
+					{{end}}
+				</div>
+				<div class="field {{if .Err_Email}}error{{end}}">
+					<label>{{ctx.Locale.Tr "email"}}</label>
+					<p id="signed-user-email">{{.SignedUser.Email}}</p>
+				</div>
+				<div class="field {{if .Err_Description}}error{{end}}">
+					{{/* it is rendered as markdown, but the length is limited, so at the moment we do not use the markdown editor here */}}
+					<label for="description">{{ctx.Locale.Tr "user.user_bio"}}</label>
+					<textarea id="description" name="description" rows="2" placeholder="{{ctx.Locale.Tr "settings.biography_placeholder"}}" maxlength="255">{{.SignedUser.Description}}</textarea>
+				</div>
+				<div class="field {{if .Err_Website}}error{{end}}">
+					<label for="website">{{ctx.Locale.Tr "settings.website"}}</label>
+					<input id="website" name="website" type="url" value="{{.SignedUser.Website}}" maxlength="255">
+				</div>
+				<div class="field">
+					<label for="location">{{ctx.Locale.Tr "settings.location"}}</label>
+					<input id="location" name="location" placeholder="{{ctx.Locale.Tr "settings.location_placeholder"}}" value="{{.SignedUser.Location}}" maxlength="50">
+				</div>
+
+				<div class="divider"></div>
+				<!-- private block -->
+
+				<div class="field" id="privacy-user-settings">
+					<label><strong>{{ctx.Locale.Tr "settings.privacy"}}</strong></label>
+				</div>
+
+				<div class="inline field {{if .Err_Visibility}}error{{end}}">
+					<span class="inline required field"><label>{{ctx.Locale.Tr "settings.visibility"}}</label></span>
+					<div class="ui selection type dropdown">
+						{{if .SignedUser.Visibility.IsPublic}}<input type="hidden" id="visibility" name="visibility" value="0">{{end}}
+						{{if .SignedUser.Visibility.IsLimited}}<input type="hidden" id="visibility" name="visibility" value="1">{{end}}
+						{{if .SignedUser.Visibility.IsPrivate}}<input type="hidden" id="visibility" name="visibility" value="2">{{end}}
+						<div class="text">
+							{{if .SignedUser.Visibility.IsPublic}}{{ctx.Locale.Tr "settings.visibility.public"}}{{end}}
+							{{if .SignedUser.Visibility.IsLimited}}{{ctx.Locale.Tr "settings.visibility.limited"}}{{end}}
+							{{if .SignedUser.Visibility.IsPrivate}}{{ctx.Locale.Tr "settings.visibility.private"}}{{end}}
+						</div>
+						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+						<div class="menu">
+							{{range $mode := .AllowedUserVisibilityModes}}
+								{{if $mode.IsPublic}}
+									<div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{ctx.Locale.Tr "settings.visibility.public"}}</div>
+								{{else if $mode.IsLimited}}
+									<div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{ctx.Locale.Tr "settings.visibility.limited"}}</div>
+								{{else if $mode.IsPrivate}}
+									<div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{ctx.Locale.Tr "settings.visibility.private"}}</div>
+								{{end}}
+							{{end}}
+						</div>
+					</div>
+				</div>
+
+				<div class="field">
+					<div class="ui checkbox">
+						<label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup" .SignedUser.GetPlaceholderEmail}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label>
+						<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
+					</div>
+				</div>
+
+				<div class="field">
+					<div class="ui checkbox" id="keep-activity-private">
+						<label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_activity_private_popup"}}"><strong>{{ctx.Locale.Tr "settings.keep_activity_private"}}</strong></label>
+						<input name="keep_activity_private" type="checkbox" {{if .SignedUser.KeepActivityPrivate}}checked{{end}}>
+					</div>
+				</div>
+
+				<div class="divider"></div>
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "settings.update_profile"}}</button>
+				</div>
+			</form>
+		</div>
+
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.avatar"}}
+		</h4>
+		<div class="ui attached segment">
+			<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
+				{{.CsrfTokenHtml}}
+				{{if not .DisableGravatar}}
+				<div class="inline field">
+					<div class="ui radio checkbox">
+						<input name="source" value="lookup" type="radio" {{if not .SignedUser.UseCustomAvatar}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.lookup_avatar_by_mail"}}</label>
+					</div>
+				</div>
+				<div class="field tw-pl-4 {{if .Err_Gravatar}}error{{end}}">
+					<label for="gravatar">Avatar {{ctx.Locale.Tr "email"}}</label>
+					<input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}">
+				</div>
+				{{end}}
+
+				<div class="inline field">
+					<div class="ui radio checkbox">
+						<input name="source" value="local" type="radio" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
+						<label>{{ctx.Locale.Tr "settings.enable_custom_avatar"}}</label>
+					</div>
+				</div>
+
+				<div class="inline field tw-pl-4">
+					<label for="new-avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label>
+					<input id="new-avatar" name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
+				</div>
+
+				<div class="field tw-pl-4 cropper-panel tw-hidden">
+					<div>{{ctx.Locale.Tr "settings.cropper_prompt"}}</div>
+					<div class="cropper-wrapper"><img class="cropper-source" src alt></div>
+				</div>
+
+				<div class="field">
+					<button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button>
+					<button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/repos.tmpl b/user/settings/repos.tmpl
new file mode 100644
index 0000000..a50fb58
--- /dev/null
+++ b/user/settings/repos.tmpl
@@ -0,0 +1,130 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings repos")}}
+	<div class="user-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.repos"}}
+		</h4>
+		<div class="ui attached segment">
+			{{if or .allowAdopt .allowDelete}}
+				{{if .Dirs}}
+					<div class="ui list">
+						{{range $dirI, $dir := .Dirs}}
+							{{$repo := index $.ReposMap $dir}}
+							<div class="item {{if not $repo}}tw-py-1{{end}}">{{/* if not repo, then there are "adapt" buttons, so the padding shouldn't be that default large*/}}
+								<div class="content">
+									{{if $repo}}
+										{{if $repo.IsPrivate}}
+											<span class="text gold icon">{{svg "octicon-lock"}}</span>
+										{{else if $repo.IsFork}}
+											<span class="icon">{{svg "octicon-repo-forked"}}</span>
+										{{else if $repo.IsMirror}}
+											<span class="icon">{{svg "octicon-mirror"}}</span>
+										{{else if $repo.IsTemplate}}
+											<span class="icon">{{svg "octicon-repo-template"}}</span>
+										{{else}}
+											<span class="icon">{{svg "octicon-repo"}}</span>
+										{{end}}
+										<a class="muted name" href="{{$repo.Link}}">{{$repo.OwnerName}}/{{$repo.Name}}</a>
+										<span class="text light-3" {{if not (eq $repo.Size 0)}} data-tooltip-content="{{$repo.SizeDetailsString}}"{{end}}>{{FileSize $repo.Size}}</span>
+										{{if $repo.IsFork}}
+											{{ctx.Locale.Tr "repo.forked_from"}}
+											<span><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
+										{{end}}
+									{{else}}
+										<span class="icon tw-inline-block tw-pt-2">{{svg "octicon-file-directory-fill"}}</span>
+										<span class="name tw-inline-block tw-pt-2">{{$.ContextUser.Name}}/{{$dir}}</span>
+										<div class="tw-float-right">
+											{{if $.allowAdopt}}
+												<button class="ui button primary show-modal tw-p-2" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{ctx.Locale.Tr "repo.adopt_preexisting_label"}}</span></button>
+												<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
+													<div class="header">
+														<span class="label">{{ctx.Locale.Tr "repo.adopt_preexisting"}}</span>
+													</div>
+													<div class="content">
+														<p>{{ctx.Locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
+													</div>
+													<form class="ui form" method="post" action="{{AppSubUrl}}/user/settings/repos/unadopted">
+														{{$.CsrfTokenHtml}}
+														<input type="hidden" name="id" value="{{$dir}}">
+														<input type="hidden" name="action" value="adopt">
+														{{template "base/modal_actions_confirm" $}}
+													</form>
+												</div>
+											{{end}}
+											{{if $.allowDelete}}
+												<button class="ui button red show-modal tw-p-2" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{ctx.Locale.Tr "repo.delete_preexisting_label"}}</span></button>
+												<div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}">
+													<div class="header">
+														<span class="label">{{ctx.Locale.Tr "repo.delete_preexisting"}}</span>
+													</div>
+													<div class="content">
+														<p>{{ctx.Locale.Tr "repo.delete_preexisting_content" $dir}}</p>
+													</div>
+													<form class="ui form" method="post" action="{{AppSubUrl}}/user/settings/repos/unadopted">
+														{{$.CsrfTokenHtml}}
+														<input type="hidden" name="id" value="{{$dir}}">
+														<input type="hidden" name="action" value="delete">
+														{{template "base/modal_actions_confirm" $}}
+													</form>
+												</div>
+											{{end}}
+										</div>
+									{{end}}
+								</div>
+							</div>
+						{{end}}
+					</div>
+					{{template "base/paginate" .}}
+				{{else}}
+					<div class="item">
+						{{ctx.Locale.Tr "settings.repos_none"}}
+					</div>
+				{{end}}
+			{{else}}
+				{{if .Repos}}
+					<div class="ui middle aligned divided list">
+						{{range .Repos}}
+							<div class="item">
+								<div class="content flex-text-block">
+									{{if .IsPrivate}}
+										{{svg "octicon-lock" 16 "text gold"}}
+									{{else if .IsFork}}
+										{{svg "octicon-repo-forked"}}
+									{{else if .IsMirror}}
+										{{svg "octicon-mirror"}}
+									{{else if .IsTemplate}}
+										{{svg "octicon-repo-template"}}
+									{{else}}
+										{{svg "octicon-repo"}}
+									{{end}}
+									<a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a>
+									<span>{{FileSize .Size}}</span>
+									{{if .IsFork}}
+										{{ctx.Locale.Tr "repo.forked_from"}}
+										<span><a href="{{.BaseRepo.Link}}">{{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}}</a></span>
+									{{end}}
+								</div>
+							</div>
+						{{end}}
+					</div>
+					{{template "base/paginate" .}}
+				{{else}}
+					<div class="item">
+						{{ctx.Locale.Tr "settings.repos_none"}}
+					</div>
+				{{end}}
+			{{end}}
+		</div>
+	</div>
+
+<div class="ui g-modal-confirm delete modal">
+	<div class="header">
+		{{svg "octicon-trash"}}
+		{{ctx.Locale.Tr "settings.remove_account_link"}}
+	</div>
+	<div class="content">
+		<p>{{ctx.Locale.Tr "settings.remove_account_link_desc"}}</p>
+	</div>
+	{{template "base/modal_actions_confirm" .}}
+</div>
+
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/runner_edit.tmpl b/user/settings/runner_edit.tmpl
new file mode 100644
index 0000000..90c58c1
--- /dev/null
+++ b/user/settings/runner_edit.tmpl
@@ -0,0 +1,5 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings runners")}}
+	<div class="user-setting-content">
+		{{template "shared/actions/runner_edit" .}}
+	</div>
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/security/accountlinks.tmpl b/user/settings/security/accountlinks.tmpl
new file mode 100644
index 0000000..0820844
--- /dev/null
+++ b/user/settings/security/accountlinks.tmpl
@@ -0,0 +1,62 @@
+{{/* No account links, no way to add account links: Menu will not be shown. */}}
+{{if or .AccountLinks .OrderedOAuth2Names}}
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "settings.manage_account_links"}}
+	{{if .OrderedOAuth2Names}}
+		<div class="ui right">
+			<div class="ui dropdown">
+				<div class="ui primary tiny button">{{ctx.Locale.Tr "settings.link_account"}}</div>
+				<div class="menu">
+					{{range $key := .OrderedOAuth2Names}}
+						{{$provider := index $.OAuth2Providers $key}}
+						<a class="item" href="{{AppSubUrl}}/user/oauth2/{{$key}}">
+							{{$provider.IconHTML 20}}
+							{{$provider.DisplayName}}
+						</a>
+					{{end}}
+				</div>
+			</div>
+		</div>
+	{{end}}
+</h4>
+
+<div class="ui attached segment">
+	<div class="flex-list">
+		<div class="flex-item">
+			{{ctx.Locale.Tr "settings.manage_account_links_desc"}}
+		</div>
+		{{range $loginSource, $provider := .AccountLinks}}
+			<div class="flex-item">
+				{{$providerData := index $.OAuth2Providers $loginSource.Name}}
+				<div class="flex-item-leading">
+					{{$providerData.IconHTML 20}}
+				</div>
+				<div class="flex-item-main">
+					<span class="flex-item-title" data-tooltip-content="{{$provider}}">
+						{{$loginSource.Name}}
+					</span>
+					{{if $loginSource.IsActive}}
+					<span class="flex-text-body text primary">{{ctx.Locale.Tr "repo.settings.active"}}</span>
+					{{end}}
+				</div>
+				<div class="flex-item-trailing">
+					<button class="ui red tiny button delete-button" data-modal-id="delete-account-link" data-url="{{AppSubUrl}}/user/settings/security/account_link" data-id="{{$loginSource.ID}}">
+						{{ctx.Locale.Tr "settings.delete_key"}}
+					</button>
+				</div>
+			</div>
+		{{end}}
+	</div>
+
+	<div class="ui g-modal-confirm delete modal" id="delete-account-link">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "settings.remove_account_link"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.remove_account_link_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+</div>
+{{end}}
diff --git a/user/settings/security/openid.tmpl b/user/settings/security/openid.tmpl
new file mode 100644
index 0000000..87ba953
--- /dev/null
+++ b/user/settings/security/openid.tmpl
@@ -0,0 +1,63 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "settings.manage_openid"}}
+</h4>
+<div class="ui attached segment">
+	<div class="flex-list">
+		<div class="flex-item">
+			{{ctx.Locale.Tr "settings.openid_desc"}}
+		</div>
+		{{range .OpenIDs}}
+			<div class="flex-item tw-items-center">
+				<div class="flex-item-leading">
+					{{svg "fontawesome-openid" 20}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-title">{{.URI}}</div>
+				</div>
+				<div class="flex-item-trailing">
+					<form action="{{AppSubUrl}}/user/settings/security/openid/toggle_visibility" method="post">
+						{{$.CsrfTokenHtml}}
+						<input name="id" type="hidden" value="{{.ID}}">
+						{{if .Show}}
+							<button class="ui tiny button">
+							{{svg "octicon-eye" 16 "icon"}}
+							{{ctx.Locale.Tr "settings.hide_openid"}}
+							</button>
+						{{else}}
+							<button class="ui tiny button">
+							{{svg "octicon-eye-closed" 16 "icon"}}
+							{{ctx.Locale.Tr "settings.show_openid"}}
+							</button>
+						{{end}}
+					</form>
+					<button class="ui red tiny button delete-button" data-modal-id="delete-openid" data-url="{{AppSubUrl}}/user/settings/security/openid/delete" data-id="{{.ID}}">
+						{{ctx.Locale.Tr "settings.delete_key"}}
+					</button>
+				</div>
+			</div>
+		{{end}}
+	</div>
+</div>
+<div class="ui bottom attached segment">
+	<form class="ui form" action="{{AppSubUrl}}/user/settings/security/openid" method="post">
+		{{.CsrfTokenHtml}}
+		<div class="required field {{if .Err_OpenID}}error{{end}}">
+			<label for="openid">{{ctx.Locale.Tr "settings.add_new_openid"}}</label>
+			<input id="openid" name="openid" type="text" required>
+		</div>
+		<button class="ui primary button">
+			{{ctx.Locale.Tr "settings.add_openid"}}
+		</button>
+	</form>
+
+	<div class="ui g-modal-confirm delete modal" id="delete-openid">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "settings.openid_deletion"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.openid_deletion_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+</div>
diff --git a/user/settings/security/security.tmpl b/user/settings/security/security.tmpl
new file mode 100644
index 0000000..d9403cf
--- /dev/null
+++ b/user/settings/security/security.tmpl
@@ -0,0 +1,17 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings security")}}
+	{{if not ($.UserDisabledFeatures.Contains "manage_mfa" "manage_credentials")}}
+	<div class="user-setting-content">
+		{{if not ($.UserDisabledFeatures.Contains "manage_mfa")}}
+		{{template "user/settings/security/twofa" .}}
+		{{template "user/settings/security/webauthn" .}}
+		{{end}}
+		{{if not ($.UserDisabledFeatures.Contains "manage_credentials")}}
+		{{template "user/settings/security/accountlinks" .}}
+		{{if .EnableOpenIDSignIn}}
+		{{template "user/settings/security/openid" .}}
+		{{end}}
+		{{end}}
+	</div>
+	{{end}}
+
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/security/twofa.tmpl b/user/settings/security/twofa.tmpl
new file mode 100644
index 0000000..adebce4
--- /dev/null
+++ b/user/settings/security/twofa.tmpl
@@ -0,0 +1,37 @@
+<h4 class="ui top attached header">
+	{{ctx.Locale.Tr "settings.twofa"}}
+</h4>
+<div class="ui attached segment">
+	<p>{{ctx.Locale.Tr "settings.twofa_desc"}}</p>
+	{{if .TOTPEnrolled}}
+	<p>{{ctx.Locale.Tr "settings.twofa_is_enrolled"}}</p>
+	<form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/regenerate_scratch" method="post" enctype="multipart/form-data">
+		{{.CsrfTokenHtml}}
+		<p>{{ctx.Locale.Tr "settings.regenerate_scratch_token_desc"}}</p>
+		<button class="ui primary button">{{ctx.Locale.Tr "settings.twofa_scratch_token_regenerate"}}</button>
+	</form>
+	<form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/disable" method="post" enctype="multipart/form-data" id="disable-form">
+		{{.CsrfTokenHtml}}
+		<p>{{ctx.Locale.Tr "settings.twofa_disable_note"}}</p>
+		<button class="ui red button delete-button" data-modal-id="disable-twofa" data-type="form" data-form="#disable-form">{{ctx.Locale.Tr "settings.twofa_disable"}}</button>
+	</form>
+	{{else}}
+	{{/* The recovery tip is there as a means of encouraging a user to enroll */}}
+	<p>{{ctx.Locale.Tr "settings.twofa_recovery_tip"}}</p>
+	<p>{{ctx.Locale.Tr "settings.twofa_not_enrolled"}}</p>
+	<div class="inline field">
+		<a class="ui primary button" href="{{AppSubUrl}}/user/settings/security/two_factor/enroll">{{ctx.Locale.Tr "settings.twofa_enroll"}}</a>
+	</div>
+	{{end}}
+
+	<div class="ui g-modal-confirm delete modal" id="disable-twofa">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "settings.twofa_disable"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.twofa_disable_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+</div>
diff --git a/user/settings/security/twofa_enroll.tmpl b/user/settings/security/twofa_enroll.tmpl
new file mode 100644
index 0000000..d6bfadf
--- /dev/null
+++ b/user/settings/security/twofa_enroll.tmpl
@@ -0,0 +1,25 @@
+{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings twofa")}}
+	<div class="user-setting-content">
+		<h4 class="ui top attached header">
+			{{ctx.Locale.Tr "settings.twofa_enroll"}}
+		</h4>
+		<div class="ui attached segment">
+			<p>{{ctx.Locale.Tr "settings.scan_this_image"}}</p>
+			<img src="{{.QrUri}}" alt="{{.TwofaSecret}}">
+			<p>{{ctx.Locale.Tr "settings.or_enter_secret" .TwofaSecret}}</p>
+			<p>{{ctx.Locale.Tr "settings.then_enter_passcode"}}</p>
+			<form class="ui form" action="{{.Link}}" method="post">
+				{{.CsrfTokenHtml}}
+				<div class="inline required field {{if .Err_Passcode}}error{{end}}">
+					<label for="passcode">{{ctx.Locale.Tr "passcode"}}</label>
+					<input id="passcode" name="passcode" autofocus required>
+				</div>
+				<div class="inline field">
+					<label></label>
+					<button class="ui primary button">{{ctx.Locale.Tr "auth.verify"}}</button>
+				</div>
+			</form>
+		</div>
+	</div>
+
+{{template "user/settings/layout_footer" .}}
diff --git a/user/settings/security/webauthn.tmpl b/user/settings/security/webauthn.tmpl
new file mode 100644
index 0000000..149b7eb
--- /dev/null
+++ b/user/settings/security/webauthn.tmpl
@@ -0,0 +1,43 @@
+<h4 class="ui top attached header">{{ctx.Locale.Tr "settings.webauthn"}}</h4>
+<div class="ui attached segment">
+	<p>{{ctx.Locale.Tr "settings.webauthn_desc" "https://w3c.github.io/webauthn/#webauthn-authenticator"}}</p>
+	<p>{{ctx.Locale.Tr "settings.webauthn_key_loss_warning"}} {{ctx.Locale.Tr "settings.webauthn_alternative_tip"}}</p>
+	{{template "user/auth/webauthn_error" .}}
+	<div class="flex-list">
+		{{range .WebAuthnCredentials}}
+			<div class="flex-item">
+				<div class="flex-item-leading">
+					{{svg "octicon-key" 32}}
+				</div>
+				<div class="flex-item-main">
+					<div class="flex-item-title">{{.Name}}</div>
+					<div class="flex-item-body">
+						<i>{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}}</i>
+					</div>
+				</div>
+				<div class="flex-item-trailing">
+					<button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}">
+					{{ctx.Locale.Tr "settings.delete_key"}}
+					</button>
+				</div>
+			</div>
+		{{end}}
+	</div>
+	<div class="ui form">
+		<div class="required field">
+			<label for="nickname">{{ctx.Locale.Tr "settings.webauthn_nickname"}}</label>
+			<input id="nickname" name="nickname" type="text" required>
+		</div>
+		<button id="register-webauthn" class="ui primary button">{{svg "octicon-key"}} {{ctx.Locale.Tr "settings.webauthn_register_key"}}</button>
+	</div>
+	<div class="ui g-modal-confirm delete modal" id="delete-registration">
+		<div class="header">
+			{{svg "octicon-trash"}}
+			{{ctx.Locale.Tr "settings.webauthn_delete_key"}}
+		</div>
+		<div class="content">
+			<p>{{ctx.Locale.Tr "settings.webauthn_delete_key_desc"}}</p>
+		</div>
+		{{template "base/modal_actions_confirm" .}}
+	</div>
+</div>
diff --git a/webhook/new.tmpl b/webhook/new.tmpl
new file mode 100644
index 0000000..8ef33df
--- /dev/null
+++ b/webhook/new.tmpl
@@ -0,0 +1,25 @@
+<h4 class="ui top attached header">
+	{{.CustomHeaderTitle}}
+	<div class="ui right type dropdown">
+		<div class="text tw-flex tw-items-center">
+			{{template "shared/webhook/icon" (dict "Size" 20 "HookType" .ctxData.HookType)}}
+			{{ctx.Locale.Tr (print "repo.settings.web_hook_name_" .ctxData.HookType)}}
+		</div>
+		{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+		{{template "repo/settings/webhook/link_menu" .ctxData}}
+	</div>
+</h4>
+<div class="ui attached segment">
+	{{template "repo/settings/webhook/gitea" .ctxData}}
+	{{template "repo/settings/webhook/gogs" .ctxData}}
+	{{template "repo/settings/webhook/slack" .ctxData}}
+	{{template "repo/settings/webhook/discord" .ctxData}}
+	{{template "repo/settings/webhook/dingtalk" .ctxData}}
+	{{template "repo/settings/webhook/telegram" .ctxData}}
+	{{template "repo/settings/webhook/msteams" .ctxData}}
+	{{template "repo/settings/webhook/feishu" .ctxData}}
+	{{template "repo/settings/webhook/matrix" .ctxData}}
+	{{template "repo/settings/webhook/wechatwork" .ctxData}}
+	{{template "repo/settings/webhook/packagist" .ctxData}}
+</div>
+{{template "repo/settings/webhook/history" .ctxData}}