##// END OF EJS Templates
rcextensions: updated example template override with more docs.
marcink -
r3393:8264f2fd default
parent child Browse files
Show More
@@ -1,8 +1,8 b''
1 # This code allows override the integrations templates. Put this into the __init__.py
1 # This code allows override the integrations templates.
2 # file of rcextensions
2 # Put this into the __init__.py file of rcextensions to override the templates
3
3
4
4
5 # EMAIL
5 # EMAIL Integration
6 from rhodecode.integrations import email
6 from rhodecode.integrations import email
7 email.REPO_PUSH_TEMPLATE_HTML = email.Template('''
7 email.REPO_PUSH_TEMPLATE_HTML = email.Template('''
8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -108,15 +108,14 b' email.REPO_PUSH_TEMPLATE_HTML = email.Te'
108 ''')
108 ''')
109
109
110
110
111 # JIRA (EE ONLY)
111 # JIRA Integration (EE ONLY)
112 # available variables:
113 # url, short_id ,author
114 # branch, commit_message
115 # commit (dict data for commit)
112 from rc_integrations import jira_tracker
116 from rc_integrations import jira_tracker
113
117
114 jira_tracker.COMMENT_TEMPLATE_PULL_REQUEST = jira_tracker.Template('''
118 # used for references issues without transition, e.g `This ticket references PROJ-123`
115 ${action} by ${author} (status: ${status}). \n
116 pull-request: ${url}
117 ''')
118
119
120 jira_tracker.COMMENT_TEMPLATE_COMMIT = jira_tracker.Template('''
119 jira_tracker.COMMENT_TEMPLATE_COMMIT = jira_tracker.Template('''
121 Commit `${short_id}` by ${author} on `${branch}` branch references this issue. \n
120 Commit `${short_id}` by ${author} on `${branch}` branch references this issue. \n
122 ${url}\n
121 ${url}\n
@@ -125,7 +124,8 b' Commit `${short_id}` by ${author} on `${'
125 ${commit['message']}
124 ${commit['message']}
126 ''')
125 ''')
127
126
128
127 # used when there's a transition, e.g referenced issues status goes from
128 # open to resolved this is used in correlation with something like `closes PROJ-123`
129 jira_tracker.COMMENT_TEMPLATE_COMMIT_WITH_STATUS = jira_tracker.Template('''
129 jira_tracker.COMMENT_TEMPLATE_COMMIT_WITH_STATUS = jira_tracker.Template('''
130 Commit `${short_id}` by ${author} on `${branch}` branch changed this issue. \n
130 Commit `${short_id}` by ${author} on `${branch}` branch changed this issue. \n
131 '{url}\n
131 '{url}\n
@@ -134,10 +134,20 b' Commit `${short_id}` by ${author} on `${'
134 ${commit['message']}
134 ${commit['message']}
135 ''')
135 ''')
136
136
137 jira_tracker.COMMENT_TEMPLATE_PULL_REQUEST = jira_tracker.Template('''
138 ${action} by ${author} (status: ${status}). \n
139 pull-request: ${url}
140 ''')
141
137
142
138 # REDMINE (EE ONLY)
143 # REDMINE (EE ONLY)
144 # available variables:
145 # url, short_id ,author
146 # branch, commit_message
147 # commit (dict data for commit)
139 from rc_integrations import redmine_tracker
148 from rc_integrations import redmine_tracker
140
149
150 # used for references issues without transition, e.g `This ticket references #123`
141 redmine_tracker.COMMENT_TEMPLATE_COMMIT = redmine_tracker.Template('''
151 redmine_tracker.COMMENT_TEMPLATE_COMMIT = redmine_tracker.Template('''
142 Commit `${short_id}` by ${author} on `${branch}` branch references this issue. \n
152 Commit `${short_id}` by ${author} on `${branch}` branch references this issue. \n
143 commit: ${url}\n
153 commit: ${url}\n
@@ -150,6 +160,8 b' message:'
150
160
151 ''')
161 ''')
152
162
163 # used when there's a transition, e.g referenced issues status goes from
164 # open to resolved this is used in correlation with something like `closes #123`
153 redmine_tracker.COMMENT_TEMPLATE_COMMIT_WITH_STATUS = redmine_tracker.Template('''
165 redmine_tracker.COMMENT_TEMPLATE_COMMIT_WITH_STATUS = redmine_tracker.Template('''
154 Commit `${short_id}` by ${author} on `${branch}` branch changed this issue. \n
166 Commit `${short_id}` by ${author} on `${branch}` branch changed this issue. \n
155 commit: ${url}\n
167 commit: ${url}\n
General Comments 0
You need to be logged in to leave comments. Login now