##// 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
2 # file of rcextensions
1 # This code allows override the integrations templates.
2 # Put this into the __init__.py file of rcextensions to override the templates
3 3
4 4
5 # EMAIL
5 # EMAIL Integration
6 6 from rhodecode.integrations import email
7 7 email.REPO_PUSH_TEMPLATE_HTML = email.Template('''
8 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 116 from rc_integrations import jira_tracker
113 117
114 jira_tracker.COMMENT_TEMPLATE_PULL_REQUEST = jira_tracker.Template('''
115 ${action} by ${author} (status: ${status}). \n
116 pull-request: ${url}
117 ''')
118
119
118 # used for references issues without transition, e.g `This ticket references PROJ-123`
120 119 jira_tracker.COMMENT_TEMPLATE_COMMIT = jira_tracker.Template('''
121 120 Commit `${short_id}` by ${author} on `${branch}` branch references this issue. \n
122 121 ${url}\n
@@ -125,7 +124,8 b' Commit `${short_id}` by ${author} on `${'
125 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 129 jira_tracker.COMMENT_TEMPLATE_COMMIT_WITH_STATUS = jira_tracker.Template('''
130 130 Commit `${short_id}` by ${author} on `${branch}` branch changed this issue. \n
131 131 '{url}\n
@@ -134,10 +134,20 b' Commit `${short_id}` by ${author} on `${'
134 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 143 # REDMINE (EE ONLY)
144 # available variables:
145 # url, short_id ,author
146 # branch, commit_message
147 # commit (dict data for commit)
139 148 from rc_integrations import redmine_tracker
140 149
150 # used for references issues without transition, e.g `This ticket references #123`
141 151 redmine_tracker.COMMENT_TEMPLATE_COMMIT = redmine_tracker.Template('''
142 152 Commit `${short_id}` by ${author} on `${branch}` branch references this issue. \n
143 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 165 redmine_tracker.COMMENT_TEMPLATE_COMMIT_WITH_STATUS = redmine_tracker.Template('''
154 166 Commit `${short_id}` by ${author} on `${branch}` branch changed this issue. \n
155 167 commit: ${url}\n
General Comments 0
You need to be logged in to leave comments. Login now