
Please carefully review the changelog: https://github.com/go-gitea/gitea/blob/v1.17.1/CHANGELOG.md and ensure that we've properly addressed the items listed there. I have listed the breaking changes list here and any actions we've taken or justification for why they don't affect us: * Require go1.18 for Gitea 1.17 (#19918) We were already using go 1.18. * Make AppDataPath absolute against the AppWorkPath if it is not (#19815) Path is already absolute: playbooks/roles/gitea/templates/app.ini.j2:APP_DATA_PATH = /data/gitea * Nuke the incorrect permission report on /api/v1/notifications (#19761) This has to do with how that api endpoint returns permissions. We don't use this anywhere as far as I can tell. * Refactor git module, make Gitea use internal git config (#19732) In the gitea container /data/git/.gitconfig is present but we don't appear to manage this in system-config. I think that means this change is a noop for us as gitea will move its managed .gitconfig from /data/git/.gitconfig to /data/git/repositories/.gitconfig. I expect the contents to be the same since gitea must be managing the file old content today. * Remove RequireHighlightJS field, update plantuml example. (#19615) This was a flag that toggled syntax highlighting on and off as best as I can tell. The default is to just have it turned on and we don't check the flag in any of our templates. * Increase minimal required git version to 2.0 (#19577) Debian Bullseye ships with 2.30.2-1. * Add a directory prefix gitea-src-VERSION to release-tar-file (#19396) They were tarbombing people and their tarballs extracted into the current dir. They now no longer do that. We build from git so this doesn't affect us. * Use "main" as default branch name (#19354) We explicitly set the default branch name to master for both gitea and gerrit. This should be a noop for us. Testing has been added to check this. https://opendev.org/opendev/system-config/src/branch/master/playbooks/roles/gitea-git-repos/library/gitea_create_repos.py#L129-L132 https://opendev.org/opendev/jeepyb/src/branch/master/jeepyb/cmd/manage_projects.py#L488 * Make cron task no notice on success (#19221) I'm not aware of us relying on any cron tasks or any cron task notifications. * Add pam account authorization check (#19040) We don't integrate with pam so the change in behavior to check authorization does not affect us. * Show messages for users if the ROOT_URL is wrong, show JavaScript errors (#18971) This message shows up in CI because ROOT_URL is https://opendev.org but we access gitea in testing via localhost. I don't think this is worth fixing. Its a good reminder that the instance is a test instance. * Refactor mirror code & fix StartToMirror (#18904) We don't mirror repos with gitea. Should be a noop for us. * Remove deprecated SSH ciphers from default (#18697) hmac-sha1-96, diffie-hellman-group1-sha1, and arcfour{128,256} are removed. The only ssh user is gerrit's replication. MINA should be able to support more modern ciphers and be fine. * Add the possibility to allow the user to have a favicon which differs from the main logo (#18542) Previously, logo.svg was used as the favicon.svg and gitea only fell back to favicon.png if the browser couldn't so the .svg. But now they want to support users having different logo.svg and favicon.svg. This necessitates explicitly adding a favicon.svg. Something we already do. Details at https://github.com/go-gitea/gitea/pull/18542 * Update reserved usernames list (#18438) This shouldn't be a problem for us as we don't have regular users and gerrit is not a reserved name. * Support custom ACME provider (#18340) We run ACME with LE out of band. This doesn't affect us. * Change initial TrustModel to committer (#18335) This changes the signed commits trust model from collaborator to committer. THis won't affect us as we aren't maintaining trusted keys. But basically this now shows if the signed commit by the committer matches the committer's key. * Update HTTP status codes (#18063) This changed redirect HTTP codes from 302 to 307. Shouldn't affect us. * Upgrade Alpine from 3.13 to 3.15 (#18050) We build on Debian and not alpine. The alpine nodejs version did change from 14 to 16 in this change and we've updated to match. * Restrict email address validation (#17688) If we had real users this may pose a problem as they are limiting the set of emails gitea would accept to a smaller set than they accepted before. Also fewer than actually allowed by email. But we don't have real users so this should be fine. * Refactor Router Logger (#17308) This streamlines and improves the log format of some of the gitea logs. We aren't automatically processing these logs today so this shouldn't have a major impact on us. Additionally this release adds a new git.HOME_PATH setting to set the location for writing out git configs and potential gnupg configs. We should be fine to let gitea write this content out to the default path, but there is potential for this to impact our ssh daemon. Changes made include: * Minimal updates to web templates to match 1.17 * Updating nodejs to v16 as v14 failed to build gitea * Disabling the new enabled by default "packages" feature * New test to check repos have a master branch by default instead of Gitea's new default of main. Change-Id: I88105eccd118e3daca72f0b86a6b351c35e37413
202 lines
8.6 KiB
Cheetah
202 lines
8.6 KiB
Cheetah
<div class="ui container" id="navbar">
|
|
<div class="item brand" style="justify-content: space-between;">
|
|
<a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}">
|
|
<img class="ui mini image" width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.i18n.Tr "logo"}}" aria-hidden="true">
|
|
</a>
|
|
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
|
|
<i class="sidebar icon"></i>
|
|
</div>
|
|
</div>
|
|
|
|
{{if and .IsSigned .MustChangePassword}}
|
|
{{/* No links */}}
|
|
{{else if .IsSigned}}
|
|
{{if not .UnitIssuesGlobalDisabled}}
|
|
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
|
|
{{end}}
|
|
{{if not .UnitPullsGlobalDisabled}}
|
|
<a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
|
|
{{end}}
|
|
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
|
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>{{end}}
|
|
{{end}}
|
|
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
|
|
{{else if .IsLandingPageOrganizations}}
|
|
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "explore"}}</a>
|
|
{{else}}
|
|
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
|
|
{{end}}
|
|
|
|
{{template "custom/extra_links" .}}
|
|
|
|
{{/* TODO
|
|
<div class="item">
|
|
<div class="ui icon input">
|
|
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
|
|
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
|
|
</div>
|
|
</div>
|
|
*/}}
|
|
|
|
|
|
{{if and .IsSigned .MustChangePassword}}
|
|
<div class="right stackable menu">
|
|
<div class="ui dropdown jump item tooltip" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}">
|
|
<span class="text">
|
|
{{avatar .SignedUser 24 "tiny"}}
|
|
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
|
|
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
|
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
|
|
</span>
|
|
<div class="menu user-menu" tabindex="-1">
|
|
<div class="ui header">
|
|
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
|
{{svg "octicon-sign-out"}}
|
|
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
|
</a>
|
|
</div><!-- end content avatar menu -->
|
|
</div><!-- end dropdown avatar menu -->
|
|
</div>
|
|
{{else if .IsSigned}}
|
|
<div class="right stackable menu">
|
|
<a class="active-stopwatch-trigger item ui label {{if not .ActiveStopwatch}}hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}">
|
|
<span class="text">
|
|
<span class="fitted item">
|
|
{{svg "octicon-stopwatch"}}
|
|
<span class="red" style="position:absolute; right:-0.6em; top:-0.6em;">{{svg "octicon-dot-fill"}}</span>
|
|
</span>
|
|
<span class="sr-mobile-only">{{.i18n.Tr "active_stopwatch"}}</span>
|
|
</span>
|
|
</a>
|
|
<div class="ui popup very wide">
|
|
<div class="df ac">
|
|
<a class="stopwatch-link df ac" href="{{.ActiveStopwatch.IssueLink}}">
|
|
{{svg "octicon-issue-opened"}}
|
|
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
|
|
<span class="ui primary label stopwatch-time my-0 mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
|
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
|
</span>
|
|
</a>
|
|
<form class="stopwatch-commit" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
|
|
{{.CsrfTokenHtml}}
|
|
<button
|
|
class="ui button mini compact basic icon fitted tooltip"
|
|
data-content="{{.i18n.Tr "repo.issues.stop_tracking"}}"
|
|
data-position="top right"
|
|
>{{svg "octicon-square-fill"}}</button>
|
|
</form>
|
|
<form class="stopwatch-cancel" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
|
|
{{.CsrfTokenHtml}}
|
|
<button
|
|
class="ui button mini compact basic icon fitted tooltip"
|
|
data-content="{{.i18n.Tr "repo.issues.cancel_tracking"}}"
|
|
data-position="top right"
|
|
>{{svg "octicon-trash"}}</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<a href="{{AppSubUrl}}/notifications" class="item tooltip" data-content='{{.i18n.Tr "notifications"}}'>
|
|
<span class="text">
|
|
<span class="fitted">{{svg "octicon-bell"}}</span>
|
|
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
|
|
{{$notificationUnreadCount := 0}}
|
|
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
|
|
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
|
|
{{$notificationUnreadCount}}
|
|
</span>
|
|
</span>
|
|
</a>
|
|
|
|
<div class="ui dropdown jump item tooltip" data-content="{{.i18n.Tr "create_new"}}">
|
|
<span class="text">
|
|
<span class="fitted">{{svg "octicon-plus"}}</span>
|
|
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
|
|
<span class="fitted not-mobile">{{svg "octicon-triangle-down"}}</span>
|
|
</span>
|
|
<div class="menu">
|
|
<a class="item" href="{{AppSubUrl}}/repo/create">
|
|
<span class="fitted">{{svg "octicon-plus"}}</span> {{.i18n.Tr "new_repo"}}
|
|
</a>
|
|
{{if not .DisableMigrations}}
|
|
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
|
<span class="fitted">{{svg "octicon-repo-push"}}</span> {{.i18n.Tr "new_migrate"}}
|
|
</a>
|
|
{{end}}
|
|
{{if .SignedUser.CanCreateOrganization}}
|
|
<a class="item" href="{{AppSubUrl}}/org/create">
|
|
<span class="fitted">{{svg "octicon-organization"}}</span> {{.i18n.Tr "new_org"}}
|
|
</a>
|
|
{{end}}
|
|
</div><!-- end content create new menu -->
|
|
</div><!-- end dropdown menu create new -->
|
|
|
|
<div class="ui dropdown jump item tooltip" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}">
|
|
<span class="text">
|
|
{{avatar .SignedUser 24 "tiny"}}
|
|
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
|
|
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
|
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
|
|
</span>
|
|
<div class="menu user-menu" tabindex="-1">
|
|
<div class="ui header">
|
|
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
<a class="item" href="{{.SignedUser.HomeLink}}">
|
|
{{svg "octicon-person"}}
|
|
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
|
|
</a>
|
|
{{if not .DisableStars}}
|
|
<a class="item" href="{{.SignedUser.HomeLink}}?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 -->
|
|
</a>
|
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.opendev.org/opendev/infra-manual/latest/gettingstarted.html">
|
|
{{svg "octicon-repo-push"}}
|
|
Get Started<!-- Get Started -->
|
|
</a>
|
|
{{if .IsAdmin}}
|
|
<div class="divider"></div>
|
|
|
|
<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
|
{{svg "octicon-server"}}
|
|
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
|
|
</a>
|
|
{{end}}
|
|
|
|
<div class="divider"></div>
|
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
|
{{svg "octicon-sign-out"}}
|
|
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
|
</a>
|
|
</div><!-- end content avatar menu -->
|
|
</div><!-- end dropdown avatar menu -->
|
|
</div><!-- end signed user right menu -->
|
|
{{else}}
|
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.opendev.org/opendev/infra-manual/latest/gettingstarted.html">Get Started</a>
|
|
<div class="right stackable menu">
|
|
<!-- Intentionally removed as this is a read only gitea
|
|
{{if .ShowRegistrationButton}}
|
|
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
|
{{svg "octicon-person"}} {{.i18n.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"}} {{.i18n.Tr "sign_in"}}
|
|
</a>
|
|
-->
|
|
</div><!-- end anonymous right menu -->
|
|
{{end}}
|
|
</div>
|