Merge "Use Gitea for Gerrit's code browser URLs"

This commit is contained in:
Zuul 2022-02-18 21:37:05 +00:00 committed by Gerrit Code Review
commit 3b4e1bd4ed
3 changed files with 22 additions and 6 deletions

View File

@ -0,0 +1,2 @@
[gerrit]
noWebLinks = true

View File

@ -215,6 +215,14 @@
group: '{{ gerrit_user_name }}'
mode: 0644
- name: Write Gitiles plugin configuration file
copy:
src: gitiles.config
dest: '{{ gerrit_site_dir }}/etc/gitiles.config'
owner: '{{ gerrit_user_name }}'
group: '{{ gerrit_user_name }}'
mode: 0644
- name: Write manage-projects script
template:
src: "manage-projects.j2"

View File

@ -133,13 +133,19 @@
system = Storyboard
[plugin "javamelody"]
allowTopMenu = false
# Gerrit upstream hardcodes a .git extension for cgit.
# The cgit settings below are the same just without the
# .git extension.
# Custom code browser linking for Gitea.
[gitweb]
type = gitweb
cgi = /usr/share/gitweb/gitweb.cgi
revision = "?p=${project}.git;a=commitdiff;h=${commit}"
branch = "${project}/src/branch/${branch}"
file = "${project}/src/commit/${hash}/${file}"
filehistory = "${project}/commits/branch/${branch}/${file}"
linkname = gitea
project = "${project}"
revision = "${project}/commit/${commit}"
roottree = "${project}/src/commit/${commit}"
type = custom
urlEncode = false
tag = "${project}/src/tag/${tag}"
url = "https://opendev.org/"
[index]
type = LUCENE
threads = 8