Development
gerrit에 comment link 달기
chbae
2023. 4. 18. 22:40
반응형
Gerrit에 comment 링크 다는 방법이다.
필자는 comment message에 Jira address만 달면 (ex, [JIRA-123]) 링크가 걸리도록 설정하려고 한다.
gerrit.config 파일을 수정해야 하므로 관련 권한이 있어야 한다.
적용 방법
1. gerrit 서버에 들어가 gerrit.conf 파일을 연다.
2. gerrit.conf 파일에 아래와 같이 추가한다.
[commentlink "jira"]
match = (\\[((JIRA)-\\d{1,8})\\])
link = http://www.jira.com/issue/browse/$2
3. gerrit을 재시작한다.
ex) 아래 reference에 나온 example
[commentlink "changeid"]
match = (I[0-9a-f]{8,40})
link = "#q,$1,n,z"
[commentlink "bugzilla"]
match = (bug\\s+)(\\d+)
link = http://bugs.example.com/show_bug.cgi?id=$2
[commentlink "tracker"]
match = ([Bb]ug:\\s+)(\\d+)
html = $1<a href=\"http://trak.example.com/$2\">$2</a>
reference: http://gerrit.googlecode.com/svn/documentation/2.1/config-gerrit.html#commentlink
728x90
반응형