Browse Source

Merge "Upgrade gitea to 1.15.3"

changes/40/813040/1
Zuul 8 months ago committed by Gerrit Code Review
parent
commit
d108da5785
  1. 2
      docker/gitea/Dockerfile
  2. 0
      docker/gitea/custom/robots.txt
  3. 16
      docker/gitea/custom/templates/base/head_navbar.tmpl
  4. 10
      docker/gitea/custom/templates/home.tmpl
  5. 28
      docker/gitea/custom/templates/repo/header.tmpl
  6. 1
      playbooks/roles/gitea/templates/app.ini.j2

2
docker/gitea/Dockerfile

@ -27,7 +27,7 @@ FROM docker.io/library/golang:1.16-bullseye AS build-env
LABEL maintainer="infra-root@openstack.org"
ARG GITEA_VERSION="v1.14.7"
ARG GITEA_VERSION="v1.15.3"
ENV TAGS "bindata $TAGS"
#Build deps

0
docker/gitea/custom/public/robots.txt → docker/gitea/custom/robots.txt

16
docker/gitea/custom/templates/base/head_navbar.tmpl

@ -1,7 +1,7 @@
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="{{AppSubUrl}}/">
<img class="ui mini image" with="30" height="30" src="{{StaticUrlPrefix}}/img/logo.svg">
<img class="ui mini image" width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
@ -33,7 +33,7 @@
{{template "custom/extra_links" .}}
{{/*
{{/* TODO
<div class="item">
<div class="ui icon input">
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
@ -100,7 +100,7 @@
class="ui button mini compact basic icon fitted poping up"
data-content="{{.i18n.Tr "repo.issues.cancel_tracking"}}"
data-position="top right" data-variation="small inverted"
>{{svg "octicon-trashcan"}}</button>
>{{svg "octicon-trash"}}</button>
</form>
</div>
</div>
@ -157,10 +157,12 @@
{{svg "octicon-person"}}
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
</a>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
{{svg "octicon-star"}}
{{.i18n.Tr "your_starred"}}
</a>
{{if not .DisableStars}}
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
{{svg "octicon-star"}}
{{.i18n.Tr "your_starred"}}
</a>
{{end}}
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
{{svg "octicon-tools"}}
{{.i18n.Tr "your_settings"}}<!-- Your settings -->

10
docker/gitea/custom/templates/home.tmpl

@ -3,23 +3,23 @@
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<div class="hero" id="opendev">
<img alt="OpenDev" class="logo" src="/img/opendev.svg" />
<img alt="OpenDev" class="logo" src="{{AssetUrlPrefix}}/img/opendev.svg" />
</div>
</div>
<div class="four wide center aligned centered column">
<div><img alt="Gitea" src="/img/git.svg" width="60"></div>
<div><img alt="Gitea" src="{{AssetUrlPrefix}}/img/git.svg" width="60"></div>
<a href="https://opendev.org/explore/organizations">Code hosting</a>
</div>
<div class="four wide center aligned centered column">
<div><img alt="Gerrit" src="/img/gerrit.svg" width="60"></div>
<div><img alt="Gerrit" src="{{AssetUrlPrefix}}/img/gerrit.svg" width="60"></div>
<a href="https://review.opendev.org/">Code review</a>
</div>
<div class="four wide center aligned centered column">
<div><img alt="Zuul CI" src="/img/zuul.svg" width="60"></div>
<div><img alt="Zuul CI" src="{{AssetUrlPrefix}}/img/zuul.svg" width="60"></div>
<a href="https://zuul.opendev.org/">Continuous integration</a>
</div>
<div class="four wide center aligned centered column">
<div><img alt="Etherpad" src="/img/etherpad.svg" width="60"></div>
<div><img alt="Etherpad" src="{{AssetUrlPrefix}}/img/etherpad.svg" width="60"></div>
<a href="https://etherpad.opendev.org/">Collaborative editing</a>
</div>
</div>

28
docker/gitea/custom/templates/repo/header.tmpl

@ -32,11 +32,11 @@
{{end}}
{{end}}
{{if .IsArchived}}
<span class="ui basic label">{{$.i18n.Tr "repo.desc.archived"}}</span>
<span class="ui basic label">{{$.i18n.Tr "repo.desc.archived"}}</span>
{{end}}
</div>
</div>
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}">{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}</a></div>{{end}}
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{(MirrorRemoteAddress $.Mirror).Address}}{{end}}">{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{(MirrorRemoteAddress $.Mirror).Address}}{{end}}</a></div>{{end}}
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
{{if .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{SubStr .TemplateRepo.RelLink 1 -1}}</a></div>{{end}}
</div>
@ -72,17 +72,19 @@
</a>
</div>
</form>
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}}
<div class="ui labeled button{{if not $.IsSigned}} poping up{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.star_guest_user" }}" data-position="top center" data-variation="tiny"{{end}}>
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
{{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.i18n.Tr "repo.star"}}{{end}}
</button>
<a class="ui basic label" href="{{.Link}}/stars">
{{CountFmt .NumStars}}
</a>
</div>
</form>
{{if not $.DisableStars}}
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}}
<div class="ui labeled button{{if not $.IsSigned}} poping up{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.star_guest_user" }}" data-position="top center" data-variation="tiny"{{end}}>
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
{{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.i18n.Tr "repo.star"}}{{end}}
</button>
<a class="ui basic label" href="{{.Link}}/stars">
{{CountFmt .NumStars}}
</a>
</div>
</form>
{{end}}
{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
<div class="ui labeled button{{if not $.CanSignedUserFork}} poping up disabled{{end}}"{{if and (not $.CanSignedUserFork) $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{else if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_guest_user"}}"{{end}} data-position="top center" data-variation="tiny" tabindex="0">
<a class="ui compact small basic button"{{if $.CanSignedUserFork}} href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{end}}>

1
playbooks/roles/gitea/templates/app.ini.j2

@ -32,6 +32,7 @@ LOG_SQL = false
[repository]
ROOT = /data/git/repositories
DISABLED_REPO_UNITS = repo.issues,repo.pulls,repo.wiki,repo.projects
DISABLE_STARS = true
[indexer]
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve

Loading…
Cancel
Save