forked from myYearbook/jira-gerrit-plugin
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathatlassian-plugin.xml
More file actions
245 lines (210 loc) · 13.1 KB
/
Copy pathatlassian-plugin.xml
File metadata and controls
245 lines (210 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012 MeetMe, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<atlassian-plugin name="${project.name}" key="${project.groupId}.${project.artifactId}" plugins-version="2">
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}" />
<param name="plugin-icon">images/gerrit-icon16.png</param>
<param name="plugin-logo">images/meetme_75.png</param>
<param name="vendor-icon">images/meetme_16.png</param>
<param name="vendor-logo">images/meetme_75.png</param>
<param name="configure.url">/plugins/servlet/gerrit/admin</param>
<param name="atlassian-data-center-compatible">true</param>
</plugin-info>
<component-import interface="com.atlassian.sal.api.pluginsettings.PluginSettingsFactory" key="pluginSettingsFactory" />
<component-import interface="com.atlassian.sal.api.transaction.TransactionTemplate" key="transactionTemplate" />
<component-import interface="com.atlassian.sal.api.user.UserManager" key="userManager" />
<component-import interface="com.atlassian.sal.api.auth.LoginUriProvider" key="loginUriProvider" />
<component-import interface="com.atlassian.templaterenderer.velocity.one.six.VelocityTemplateRenderer" key="velocity-renderer" />
<component-import interface="com.atlassian.sal.api.ApplicationProperties" key="applicationProperties" />
<component-import interface="com.atlassian.sal.api.message.I18nResolver" key="i18nResolver" />
<!-- Our Components -->
<component name="Configuration Manager" class="com.meetme.plugins.jira.gerrit.data.GerritConfigurationImpl" key="configurationManager">
<description>Stores the Gerrit configuration</description>
<interface>com.meetme.plugins.jira.gerrit.data.GerritConfiguration</interface>
</component>
<component name="IssueReviews Manager" class="com.meetme.plugins.jira.gerrit.data.IssueReviewsImpl" key="issueReviewsManager">
<description>Retrieves Gerrit reviews related to a given JIRA Issue.</description>
<interface>com.meetme.plugins.jira.gerrit.data.IssueReviewsManager</interface>
</component>
<component name="IssueReviews Cache Loader" class="com.meetme.plugins.jira.gerrit.data.IssueReviewsCacheLoader" key="issueReviewsCacheLoader">
<description>Populates the cached list of reviews per issue.</description>
</component>
<template-context-item name="Application Properties Context Item"
component-ref="applicationProperties"
context-key="applicationProperties"
key="applicationPropertiesContextItem" />
<!-- Admin panel -->
<web-resource name="Admin Web Resources" key="admin-resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<dependency>com.atlassian.auiplugin:aui-select2</dependency>
<!--<resource type="download" name="admin.js" location="js/admin.js" />-->
</web-resource>
<web-item name="Gerrit Admin" application="jira" key="jira-menu-item" section="admin_plugins_menu/source_control" weight="10">
<description>Link to Gerrit site configuration page.</description>
<label key="gerrit.admin.label" />
<link linkId="gerrit-admin-link">/plugins/servlet/gerrit/admin</link>
</web-item>
<servlet class="com.meetme.plugins.jira.gerrit.adminui.AdminServlet" key="admin-servlet">
<resource name="i18n" location="i18n.admin" type="i18n" />
<url-pattern>/gerrit/admin</url-pattern>
</servlet>
<!-- Issue tab for Gerrit Reviews -->
<issue-tabpanel name="Gerrit Reviews Tab Panel"
class="com.meetme.plugins.jira.gerrit.tabpanel.GerritReviewsTabPanel"
key="gerrit-reviews-tabpanel"
state="disabled">
<description>Show Gerrit reviews related to an issue in an issue tab panel.</description>
<label key="gerrit.tabpanel.label">Gerrit Reviews</label>
<resource name="view" location="templates/gerrit-reviews-tabpanel-item.vm" type="velocity" />
<resource name="i18n" location="i18n.tabpanel" type="i18n" />
<!-- enable fast tab switch -->
<supports-ajax-load>true</supports-ajax-load>
</issue-tabpanel>
<web-resource name="GerritTabPanelResources" key="gerritReviewsTabPanel">
<context>jira.view.issue</context>
<dependency>jira.webresources:viewissue</dependency>
<!-- <resource type="download" name="tabpanel.js" location="js/gerrit-reviews-tabpanel.js" /> -->
<resource name="tabpanel.css" location="styles/gerrit-reviews-tabpanel.css" type="download" />
<resource name="images/" location="images/" type="download" />
</web-resource>
<!-- Tab panel to list Gerrit Reviews for each subtask -->
<issue-tabpanel name="Subtask Gerrit Reviews Tab Panel"
class="com.meetme.plugins.jira.gerrit.tabpanel.SubtaskReviewsTabPanel"
key="subtask-reviews-tabpanel"
state="disabled">
<description>Show Gerrit reviews related issue subtasks in the parent issue's tab panel.</description>
<label key="gerrit.tabpanel.subtasks.label">Gerrit Subtask Reviews</label>
<resource name="view" location="templates/subtask-reviews-tabpanel-item.vm" type="velocity" />
<resource name="i18n" location="i18n.tabpanel" type="i18n" />
<!-- enable fast tab switch -->
<supports-ajax-load>true</supports-ajax-load>
</issue-tabpanel>
<!-- View Issue right-side panel (disabled by default) -->
<web-panel name="Gerrit Reviews Side Panel"
i18n-name-key="gerrit-reviews-side-panel.name"
key="gerrit-reviews-side-panel"
location="atl.jira.view.issue.right.context"
state="disabled">
<description key="gerrit-reviews-side-panel.description">Show Gerrit reviews in the View Issue side panel</description>
<label key="gerrit-reviews-side-panel.label">Gerrit Reviews</label>
<context-provider class="com.meetme.plugins.jira.gerrit.webpanel.GerritReviewsIssueSidePanel" />
<resource name="i18n" location="i18n.webpanel" type="i18n" />
<resource name="view" location="templates/gerrit-reviews-side-panel.vm" type="velocity" />
</web-panel>
<!-- View Issue left-side panel -->
<web-panel name="Gerrit Reviews Main Panel"
i18n-name-key="gerrit-reviews-left-panel.name"
key="gerritreviewsmodule"
location="atl.jira.view.issue.left.context"
weight="750">
<description key="gerrit-reviews-left-panel.description">Show Gerrit reviews in a View Issue panel</description>
<label key="gerrit-reviews-left-panel.label">Gerrit Reviews</label>
<context-provider class="com.meetme.plugins.jira.gerrit.webpanel.GerritReviewsIssueLeftPanel" />
<resource name="i18n" location="i18n.webpanel" type="i18n" />
<resource name="view" location="templates/gerrit-reviews-left-panel.vm" type="velocity" />
<condition class="com.meetme.plugins.jira.gerrit.webpanel.ShowReviewsWebPanelCondition" />
<supports-ajax-load>true</supports-ajax-load>
</web-panel>
<!-- TODO: add conditions for some of these view options, and maybe even for the module itself? -->
<web-section name="Issue Type View Options Section"
key="issuetype-view-options"
location="com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule/drop"
weight="10" />
<web-item-provider name="View Reviews View Options Provider"
class="com.meetme.plugins.jira.gerrit.webpanel.IssueTypeOptionsProvider"
key="issuetype-view-options-factory"
lazy="false"
section="com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule/drop/issuetype-view-options"
weight="10" />
<web-section name="Review Status View Options Section"
key="reviewstatus-view-options"
location="com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule/drop"
weight="20" />
<web-item-provider name="View Reviews View Options Factory"
class="com.meetme.plugins.jira.gerrit.webpanel.ReviewStatusOptionsProvider"
key="reviewstatus-view-options-factory"
lazy="false"
section="com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule/drop/reviewstatus-view-options"
weight="10" />
<web-section name="Issue Status View Options Section"
key="issuestatus-view-options"
location="com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule/drop"
weight="30" />
<web-item-provider name="Issue Status View Options Factory"
class="com.meetme.plugins.jira.gerrit.webpanel.IssueStatusOptionsProvider"
key="issuestatus-view-options-factory"
lazy="false"
section="com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule/drop/issuestatus-view-options"
weight="10" />
<!-- Workflow Conditions -->
<!-- 1. Must have zero open reviews (or reversed logic) -->
<workflow-condition class="com.meetme.plugins.jira.gerrit.workflow.NoOpenReviewsConditionFactoryImpl"
i18n-name-key="gerrit.workflow.no-open-reviews.label"
key="no-open-reviews">
<description>Condition to allow a workflow transition based on whether there are open Gerrit reviews.</description>
<condition-class>com.meetme.plugins.jira.gerrit.workflow.condition.NoOpenReviews</condition-class>
<resource name="view" location="templates/workflow/no-open-reviews-condition-view.vm" type="velocity" />
<resource name="edit-parameters" location="templates/workflow/no-open-reviews-condition-edit.vm" type="velocity" />
<resource name="input-parameters" location="templates/workflow/no-open-reviews-condition-edit.vm" type="velocity" />
<resource name="i18n" location="i18n.workflow" type="i18n" />
</workflow-condition>
<!-- 2. Must [or not] have [ operator ] N score for [type] -->
<workflow-condition class="com.meetme.plugins.jira.gerrit.workflow.ApprovalScoreConditionFactoryImpl"
i18n-name-key="gerrit.workflow.score-condition.label"
key="score-condition">
<description>Condition to allow a workflow transition based on existing approval scores.</description>
<condition-class>com.meetme.plugins.jira.gerrit.workflow.condition.ApprovalScore</condition-class>
<resource name="view" location="templates/workflow/score-condition-view.vm" type="velocity" />
<resource name="edit-parameters" location="templates/workflow/score-condition-edit.vm" type="velocity" />
<resource name="input-parameters" location="templates/workflow/score-condition-edit.vm" type="velocity" />
<resource name="i18n" location="i18n.workflow" type="i18n" />
</workflow-condition>
<!-- Workflow Functions -->
<workflow-function class="com.meetme.plugins.jira.gerrit.workflow.ApproveReviewFactoryImpl"
i18n-name-key="gerrit.workflow.approve.label"
key="gerrit-approve">
<description>Perform Gerrit Review Approval</description>
<function-class>com.meetme.plugins.jira.gerrit.workflow.function.ApprovalFunction</function-class>
<orderable>true</orderable>
<unique>false</unique>
<deletable>true</deletable>
<resource name="view" location="templates/workflow/approve-function-view.vm" type="velocity" />
<resource name="input-parameters" location="templates/workflow/approve-function-edit.vm" type="velocity" />
<resource name="edit-parameters" location="templates/workflow/approve-function-edit.vm" type="velocity" />
</workflow-function>
<!--
Future ideas:
1. Workflow precondition - DONE
2. Workflow event listener / post-functions
3. Gerrit events-stream listener?
4. Gadget on dashboard?
5. JQL Functions?
-->
<web-panel name="Gerrit Reviews Agile Details Panel"
i18n-name-key="gerrit-reviews-side-panel.name"
key="gerrit-reviews-agile-panel"
location="atl.gh.issue.details.tab"
weight="1000">
<description key="gerrit-reviews-side-panel.description">Show Gerrit reviews in the Agile Details panel</description>
<label key="gerrit-reviews-side-panel.label">Gerrit Reviews</label>
<context-provider class="com.meetme.plugins.jira.gerrit.webpanel.GerritReviewsIssueAgilePanel" />
<resource name="i18n" location="i18n.webpanel" type="i18n" />
<resource name="view" location="templates/gerrit-reviews-agile-panel.vm" type="velocity" />
<resource name="icon.png" location="images/gerrit-icon16.png" type="download" />
<label key="gh.issue.panel.reference" />
<tooltip key="gh.issue.panel.reference.tooltip" />
</web-panel>
</atlassian-plugin>