@webship.co/workspace-redmine 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README.md +179 -2
- package/ai/agents/redmine-issue-worker.md +90 -0
- package/ai/agents/redmine-site-builder.md +106 -0
- package/ai/agents/redmine-tester.md +119 -0
- package/ai/commands/redmine-test.md +66 -0
- package/ai/prompts/redmine-build-and-test.md +28 -0
- package/ai/prompts/redmine-issue-to-branch.md +24 -0
- package/ai/skills/redmine-scenarios/SKILL.md +72 -0
- package/ai/skills/redmine-scenarios/examples/issue.feature +17 -0
- package/ai/skills/redmine-scenarios/examples/roles.feature +16 -0
- package/ai/skills/redmine-scenarios/examples/session.feature +24 -0
- package/commands/cmd-redmine-project.sh +31 -0
- package/commands/cmd-tools-redmine-cli.sh +24 -0
- package/config/plugin.redmine.settings.yml +29 -0
- package/config/settings.labels.yml +57 -0
- package/dist/src/index.d.ts +34 -0
- package/dist/src/index.js +60 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/tracker.d.ts +28 -0
- package/dist/src/lib/tracker.js +308 -0
- package/dist/src/lib/tracker.js.map +1 -0
- package/features/redmine-runtimes.feature +31 -0
- package/features/redmine.feature +53 -0
- package/package.json +118 -4
- package/scripts/args/arg-redmine-cli.sh +28 -0
- package/scripts/args/arg-redmine.sh +31 -0
- package/scripts/docker-compose.redmine.yaml +41 -0
- package/scripts/functions/fun-redmine.sh +576 -0
- package/scripts/redmine-serve.sh +13 -0
- package/scripts/redmine-site.rb +229 -0
- package/testing/site.feature +28 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Redmine, as a provider of the tracker family (@webship.co/workspace-tracker): the issues of a Redmine project, over
|
|
4
|
+
* its REST API with an API key (the X-Redmine-API-Key header), in a header file, never on a command line.
|
|
5
|
+
*
|
|
6
|
+
* Reads: the open issues, mine, assigned to someone, the current version, and a search in the subject; one issue with
|
|
7
|
+
* its notes. Each author's standing is their membership of the project: a Manager and a Developer are inside; a
|
|
8
|
+
* Reporter, another role, and someone with no membership are outside, so the base keeps their issues analyze-only
|
|
9
|
+
* unless a person confirms by name.
|
|
10
|
+
*
|
|
11
|
+
* Writes, which the base offers only with writes on, each after a person's click: a note, a time entry, a status the
|
|
12
|
+
* workflow allows, an assignee, and a new issue. Redmine is not a forge: the pull request of the work is opened from the
|
|
13
|
+
* project's forge menu. A Redmine API key is 40 hex digits, the shape of a git commit too, so it has no token shape of
|
|
14
|
+
* its own here: the base still refuses this site's own key wherever it is.
|
|
15
|
+
*/
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.roleAssociation = roleAssociation;
|
|
21
|
+
exports.stateClassOf = stateClassOf;
|
|
22
|
+
exports.itemOf = itemOf;
|
|
23
|
+
exports.currentVersion = currentVersion;
|
|
24
|
+
exports.redmineTracker = redmineTracker;
|
|
25
|
+
const fs_1 = __importDefault(require("fs"));
|
|
26
|
+
const os_1 = __importDefault(require("os"));
|
|
27
|
+
const path_1 = __importDefault(require("path"));
|
|
28
|
+
const SCOPE_RE = /^[a-z][a-z0-9_-]{0,99}$/;
|
|
29
|
+
const configured = (v) => { const s = String(v == null ? '' : v).trim(); return s && s !== 'CHANGE_ME' ? s : ''; };
|
|
30
|
+
/** A project role, as the base reads an author's standing. */
|
|
31
|
+
function roleAssociation(roles) {
|
|
32
|
+
if (roles.some((r) => /^manager$/i.test(r)))
|
|
33
|
+
return 'owner';
|
|
34
|
+
if (roles.some((r) => /^developer$/i.test(r)))
|
|
35
|
+
return 'member';
|
|
36
|
+
return roles.length ? 'contributor' : 'outside';
|
|
37
|
+
}
|
|
38
|
+
/** How a status reads: a closed one (Closed, Rejected, Resolved) is done; New is open; the rest is work going on. */
|
|
39
|
+
function stateClassOf(status) {
|
|
40
|
+
if (!status)
|
|
41
|
+
return undefined;
|
|
42
|
+
if (status.is_closed || /^(closed|rejected|resolved)$/i.test(String(status.name || '')))
|
|
43
|
+
return 'done';
|
|
44
|
+
if (/^new$/i.test(String(status.name || '')))
|
|
45
|
+
return 'open';
|
|
46
|
+
return 'doing';
|
|
47
|
+
}
|
|
48
|
+
/** An issue of the API, as the base reads an item. */
|
|
49
|
+
function itemOf(issue, base) {
|
|
50
|
+
return {
|
|
51
|
+
id: String(issue.id),
|
|
52
|
+
title: String(issue.subject || ''),
|
|
53
|
+
url: `${base}/issues/${issue.id}`,
|
|
54
|
+
state: String((issue.status && issue.status.name) || ''),
|
|
55
|
+
stateClass: stateClassOf(issue.status),
|
|
56
|
+
type: issue.tracker && issue.tracker.name ? String(issue.tracker.name) : undefined,
|
|
57
|
+
assignees: issue.assigned_to && issue.assigned_to.name ? [String(issue.assigned_to.name)] : [],
|
|
58
|
+
labels: issue.category && issue.category.name ? [String(issue.category.name)] : [],
|
|
59
|
+
iteration: issue.fixed_version && issue.fixed_version.name ? `version ${issue.fixed_version.name}` : undefined,
|
|
60
|
+
updated: issue.updated_on || undefined,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** The version a "current version" view means: the open one due first from today, else the open one with no date. */
|
|
64
|
+
function currentVersion(list, now = new Date()) {
|
|
65
|
+
const day = now.toISOString().slice(0, 10);
|
|
66
|
+
const open = (list || []).filter((v) => v && v.id && String(v.status || 'open') === 'open');
|
|
67
|
+
const dated = open.filter((v) => v.due_date && v.due_date >= day).sort((a, b) => String(a.due_date).localeCompare(String(b.due_date)));
|
|
68
|
+
if (dated.length)
|
|
69
|
+
return String(dated[0].id);
|
|
70
|
+
const undated = open.find((v) => !v.due_date);
|
|
71
|
+
return undated ? String(undated.id) : '';
|
|
72
|
+
}
|
|
73
|
+
function redmineTracker(api) {
|
|
74
|
+
const lib = api.lib;
|
|
75
|
+
const settings = () => api.settings.read() || {};
|
|
76
|
+
const base = () => configured(settings().url).replace(/\/+$/, '');
|
|
77
|
+
const token = () => configured(settings().token);
|
|
78
|
+
/** One call of the REST API: the key and the body in files only this user reads, removed after. */
|
|
79
|
+
async function call(method, p, body) {
|
|
80
|
+
const dir = fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), 'ws-redmine-'));
|
|
81
|
+
try {
|
|
82
|
+
const h = path_1.default.join(dir, 'headers');
|
|
83
|
+
fs_1.default.writeFileSync(h, `X-Redmine-API-Key: ${token()}\nAccept: application/json\n`, { mode: 0o600 });
|
|
84
|
+
const args = ['-sS', '-m', '30', '-X', method, '-w', '\n%{http_code}', '-H', `@${h}`];
|
|
85
|
+
if (body !== undefined) {
|
|
86
|
+
const b = path_1.default.join(dir, 'body.json');
|
|
87
|
+
fs_1.default.writeFileSync(b, JSON.stringify(body), { mode: 0o600 });
|
|
88
|
+
args.push('-H', 'Content-Type: application/json', '--data-binary', `@${b}`);
|
|
89
|
+
}
|
|
90
|
+
args.push(`${base()}${p}`);
|
|
91
|
+
const r = await lib.run('curl', args, process.env.HOME || '/', { timeoutMs: 40 * 1000, env: process.env });
|
|
92
|
+
const out = String(r.stdout || '');
|
|
93
|
+
const at = out.lastIndexOf('\n');
|
|
94
|
+
const status = Number(out.slice(at + 1)) || 0;
|
|
95
|
+
if (!status)
|
|
96
|
+
throw new Error(lib.cliError(String(r.stderr || 'curl did not answer')));
|
|
97
|
+
let data = null;
|
|
98
|
+
try {
|
|
99
|
+
data = JSON.parse(at >= 0 ? out.slice(0, at) : out);
|
|
100
|
+
}
|
|
101
|
+
catch (_) {
|
|
102
|
+
data = null;
|
|
103
|
+
}
|
|
104
|
+
return { status, data };
|
|
105
|
+
}
|
|
106
|
+
finally {
|
|
107
|
+
fs_1.default.rmSync(dir, { recursive: true, force: true });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
const why = (r) => `Redmine answered ${r.status}${r.data && Array.isArray(r.data.errors) && r.data.errors.length ? `: ${r.data.errors.join('; ').slice(0, 200)}` : ''}`;
|
|
111
|
+
async function get(p) {
|
|
112
|
+
const r = await call('GET', p);
|
|
113
|
+
if (r.status < 200 || r.status >= 300)
|
|
114
|
+
throw new Error(why(r));
|
|
115
|
+
return r.data;
|
|
116
|
+
}
|
|
117
|
+
async function write(method, p, body, url) {
|
|
118
|
+
try {
|
|
119
|
+
const r = await call(method, p, body);
|
|
120
|
+
return r.status >= 200 && r.status < 300 ? { ok: true, error: '', url, data: r.data } : { ok: false, error: why(r) };
|
|
121
|
+
}
|
|
122
|
+
catch (e) {
|
|
123
|
+
return { ok: false, error: String(e.message || e) };
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const projectIds = new Map();
|
|
127
|
+
async function projectId(scope) {
|
|
128
|
+
if (!projectIds.has(scope.id))
|
|
129
|
+
projectIds.set(scope.id, String((await get(`/projects/${encodeURIComponent(scope.id)}.json`)).project.id));
|
|
130
|
+
return projectIds.get(scope.id);
|
|
131
|
+
}
|
|
132
|
+
// The members of a project and their roles, asked once per project for a few minutes (every page of them).
|
|
133
|
+
const memberships = new Map();
|
|
134
|
+
async function membersOf(scope) {
|
|
135
|
+
const hit = memberships.get(scope.id);
|
|
136
|
+
if (hit && Date.now() - hit.at < 5 * 60 * 1000)
|
|
137
|
+
return hit.members;
|
|
138
|
+
let members = new Map();
|
|
139
|
+
try {
|
|
140
|
+
for (let offset = 0; offset < 1000; offset += 100) {
|
|
141
|
+
const d = await get(`/projects/${encodeURIComponent(scope.id)}/memberships.json?limit=100&offset=${offset}`);
|
|
142
|
+
const list = (d && d.memberships) || [];
|
|
143
|
+
for (const m of list) {
|
|
144
|
+
if (!m.user)
|
|
145
|
+
continue; // a group's membership
|
|
146
|
+
const uid = String(m.user.id);
|
|
147
|
+
const now = members.get(uid) || { name: String(m.user.name || ''), roles: [] };
|
|
148
|
+
now.roles.push(...(m.roles || []).map((r) => String(r.name || '')));
|
|
149
|
+
members.set(uid, now);
|
|
150
|
+
}
|
|
151
|
+
if (list.length < 100)
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
catch (_) {
|
|
156
|
+
members = null;
|
|
157
|
+
}
|
|
158
|
+
memberships.set(scope.id, { at: Date.now(), members });
|
|
159
|
+
return members;
|
|
160
|
+
}
|
|
161
|
+
async function personOf(scope, who) {
|
|
162
|
+
const name = String((who && who.name) || 'unknown');
|
|
163
|
+
const uid = who && who.id != null ? String(who.id) : '';
|
|
164
|
+
if (!uid)
|
|
165
|
+
return { name, association: 'unknown' };
|
|
166
|
+
const members = await membersOf(scope);
|
|
167
|
+
if (!members)
|
|
168
|
+
return { name, association: 'unknown' };
|
|
169
|
+
return { name, association: roleAssociation((members.get(uid) || { roles: [] }).roles) };
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Someone who can be assigned in the project: "me", the key's own login, a member's user id, a member's whole name
|
|
173
|
+
* ("Member Test") or its first word ("owner" for "Owner Test"): their id. Only an administrator may read the other
|
|
174
|
+
* members' logins, so a member is found by what the project's member list shows.
|
|
175
|
+
*/
|
|
176
|
+
async function assigneeId(scope, who) {
|
|
177
|
+
const w = who.trim().toLowerCase();
|
|
178
|
+
const me = await get('/users/current.json').catch(() => null);
|
|
179
|
+
if (w === 'me' || (me && me.user && String(me.user.login || '').toLowerCase() === w)) {
|
|
180
|
+
if (me && me.user)
|
|
181
|
+
return String(me.user.id);
|
|
182
|
+
}
|
|
183
|
+
const members = [...((await membersOf(scope)) || new Map()).entries()];
|
|
184
|
+
const found = members.find(([uid]) => uid === w)
|
|
185
|
+
|| members.find(([, m]) => m.name.toLowerCase() === w)
|
|
186
|
+
|| members.find(([, m]) => m.name.toLowerCase().split(/\s+/)[0] === w);
|
|
187
|
+
if (found)
|
|
188
|
+
return found[0];
|
|
189
|
+
throw new Error(`${who} is no member of the project who takes issues`);
|
|
190
|
+
}
|
|
191
|
+
const issueUrl = (id) => `${base()}/issues/${id}`;
|
|
192
|
+
return {
|
|
193
|
+
id: api.name,
|
|
194
|
+
title: 'Redmine',
|
|
195
|
+
label: 'REDMINE',
|
|
196
|
+
noun: { one: 'issue', many: 'issues' },
|
|
197
|
+
capabilities: {
|
|
198
|
+
views: ['open', 'mine', 'assigned', 'iteration', 'query'],
|
|
199
|
+
iterationWord: 'version',
|
|
200
|
+
comment: true, worklog: true, transition: true, labels: false, assign: true, create: true,
|
|
201
|
+
request: 'none',
|
|
202
|
+
},
|
|
203
|
+
idPattern: /^[1-9][0-9]{0,9}$/,
|
|
204
|
+
tokenVariables: ['REDMINE_API_KEY', 'REDMINE_TOKEN'],
|
|
205
|
+
secret: () => token(),
|
|
206
|
+
ready: () => (!base() ? `no Redmine address in ${api.settings.file} (url)` : !token() ? `no API key in ${api.settings.file} (token)` : ''),
|
|
207
|
+
// A workspace project has no Redmine project of its own: it remembers one, or the default is used.
|
|
208
|
+
scopeOf: () => null,
|
|
209
|
+
parseScope: (text) => {
|
|
210
|
+
const t = String(text || '').trim();
|
|
211
|
+
return SCOPE_RE.test(t) && base() ? { id: t, name: t, web: `${base()}/projects/${t}` } : null;
|
|
212
|
+
},
|
|
213
|
+
urlOf: (_s, id) => issueUrl(id),
|
|
214
|
+
account: async () => { try {
|
|
215
|
+
return String((await get('/users/current.json')).user.login || '');
|
|
216
|
+
}
|
|
217
|
+
catch (_) {
|
|
218
|
+
return '';
|
|
219
|
+
} },
|
|
220
|
+
scopes: async () => {
|
|
221
|
+
const d = await get('/projects.json?limit=100');
|
|
222
|
+
return ((d && d.projects) || []).filter((x) => x.identifier && SCOPE_RE.test(String(x.identifier)))
|
|
223
|
+
.map((x) => ({ id: String(x.identifier), name: String(x.name || x.identifier), web: `${base()}/projects/${x.identifier}` }));
|
|
224
|
+
},
|
|
225
|
+
list: async (scope, q) => {
|
|
226
|
+
const p = new URLSearchParams({ project_id: await projectId(scope), status_id: 'open', sort: 'updated_on:desc', limit: String(Math.max(1, Math.min(q.limit, 100))) });
|
|
227
|
+
if (q.view === 'mine')
|
|
228
|
+
p.set('assigned_to_id', 'me');
|
|
229
|
+
if (q.view === 'assigned') {
|
|
230
|
+
if (!q.who)
|
|
231
|
+
return [];
|
|
232
|
+
p.set('assigned_to_id', await assigneeId(scope, q.who));
|
|
233
|
+
}
|
|
234
|
+
if (q.view === 'iteration') {
|
|
235
|
+
const v = currentVersion(((await get(`/projects/${encodeURIComponent(scope.id)}/versions.json`)) || {}).versions || []);
|
|
236
|
+
if (!v)
|
|
237
|
+
return [];
|
|
238
|
+
p.set('fixed_version_id', v);
|
|
239
|
+
}
|
|
240
|
+
if (q.view === 'query')
|
|
241
|
+
p.set('subject', `~${String(q.text || '')}`);
|
|
242
|
+
const d = await get(`/issues.json?${p.toString()}`);
|
|
243
|
+
return ((d && d.issues) || []).map((i) => itemOf(i, base()));
|
|
244
|
+
},
|
|
245
|
+
get: async (scope, id) => {
|
|
246
|
+
const d = await get(`/issues/${id}.json?include=journals`);
|
|
247
|
+
const issue = d.issue || {};
|
|
248
|
+
const author = await personOf(scope, issue.author);
|
|
249
|
+
const journals = issue.journals || [];
|
|
250
|
+
// The description's last editor: the newest journal that changed it, when it is not the author.
|
|
251
|
+
let lastEditor;
|
|
252
|
+
const edit = [...journals].reverse().find((j) => (j.details || []).some((x) => x.property === 'attr' && x.name === 'description'));
|
|
253
|
+
if (edit && edit.user && String(edit.user.id) !== String(issue.author && issue.author.id))
|
|
254
|
+
lastEditor = await personOf(scope, edit.user);
|
|
255
|
+
const comments = [];
|
|
256
|
+
for (const j of journals) {
|
|
257
|
+
const raw = String(j.notes || '').trim();
|
|
258
|
+
if (!raw || j.private_notes)
|
|
259
|
+
continue;
|
|
260
|
+
comments.push({ author: await personOf(scope, j.user), body: raw, at: String(j.created_on || '') });
|
|
261
|
+
}
|
|
262
|
+
const full = { ...itemOf(issue, base()), body: String(issue.description || ''), author, ...(lastEditor ? { lastEditor } : {}), comments };
|
|
263
|
+
return full;
|
|
264
|
+
},
|
|
265
|
+
comment: async (_scope, id, markdown) => write('PUT', `/issues/${id}.json`, { issue: { notes: markdown } }, issueUrl(id)),
|
|
266
|
+
worklog: async (_scope, id, entry) => {
|
|
267
|
+
// The site's default activity, else its first: a time entry needs one.
|
|
268
|
+
let activity = '';
|
|
269
|
+
try {
|
|
270
|
+
const list = ((await get('/enumerations/time_entry_activities.json')) || {}).time_entry_activities || [];
|
|
271
|
+
const pick = list.find((a) => a.is_default) || list.find((a) => a.active !== false);
|
|
272
|
+
activity = pick ? String(pick.id) : '';
|
|
273
|
+
}
|
|
274
|
+
catch (_) {
|
|
275
|
+
activity = '';
|
|
276
|
+
}
|
|
277
|
+
return write('POST', '/time_entries.json', {
|
|
278
|
+
time_entry: { issue_id: Number(id), hours: Math.round((entry.minutes / 60) * 100) / 100, comments: entry.text, ...(activity ? { activity_id: Number(activity) } : {}) },
|
|
279
|
+
}, issueUrl(id));
|
|
280
|
+
},
|
|
281
|
+
transitions: async (_scope, id) => {
|
|
282
|
+
const d = await get(`/issues/${id}.json?include=allowed_statuses`);
|
|
283
|
+
const now = String((d.issue && d.issue.status && d.issue.status.id) || '');
|
|
284
|
+
return ((d.issue && d.issue.allowed_statuses) || []).filter((s) => String(s.id) !== now).map((s) => ({ id: String(s.id), name: String(s.name) }));
|
|
285
|
+
},
|
|
286
|
+
transition: async (_scope, id, to) => {
|
|
287
|
+
if (!/^\d+$/.test(to))
|
|
288
|
+
return { ok: false, error: `not a status: ${to}` };
|
|
289
|
+
return write('PUT', `/issues/${id}.json`, { issue: { status_id: Number(to) } }, issueUrl(id));
|
|
290
|
+
},
|
|
291
|
+
assign: async (scope, id, whom) => {
|
|
292
|
+
let uid = '';
|
|
293
|
+
try {
|
|
294
|
+
uid = await assigneeId(scope, whom);
|
|
295
|
+
}
|
|
296
|
+
catch (e) {
|
|
297
|
+
return { ok: false, error: String(e.message || e) };
|
|
298
|
+
}
|
|
299
|
+
return write('PUT', `/issues/${id}.json`, { issue: { assigned_to_id: Number(uid) } }, issueUrl(id));
|
|
300
|
+
},
|
|
301
|
+
create: async (scope, item) => {
|
|
302
|
+
const r = await write('POST', '/issues.json', { issue: { project_id: Number(await projectId(scope)), subject: item.title, description: item.body } }, '');
|
|
303
|
+
const nid = String(r.data && r.data.issue && r.data.issue.id);
|
|
304
|
+
return r.ok ? { ok: true, error: '', id: nid, url: issueUrl(nid) } : r;
|
|
305
|
+
},
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
//# sourceMappingURL=tracker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracker.js","sourceRoot":"","sources":["../../../src/lib/tracker.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;;;AAYH,0CAIC;AAGD,oCAKC;AAGD,wBAaC;AAGD,wCAOC;AAED,wCAmMC;AArPD,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AAIxB,MAAM,QAAQ,GAAG,yBAAyB,CAAC;AAC3C,MAAM,UAAU,GAAG,CAAC,CAAU,EAAE,EAAE,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE5H,8DAA8D;AAC9D,SAAgB,eAAe,CAAC,KAAe;IAC7C,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAE,OAAO,OAAO,CAAC;IAC5D,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC/D,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CA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,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Feature: A Redmine site on Docker Compose
|
|
2
|
+
The builder builds on DDEV by default, and with --runtime docker on Docker Compose: the official image is the web
|
|
3
|
+
container's, on the project's own PostgreSQL. A site built there has the row a DDEV site has: its state, its own
|
|
4
|
+
address, the runtime's menu, and the test users of Redmine in its Tests menu.
|
|
5
|
+
|
|
6
|
+
# Each scenario drives a real Redmine site built with cmd-redmine-project.sh --runtime docker: the first
|
|
7
|
+
# running one the workspace holds. Without one it is skipped, with the reason. In the plugin's CI it is the one the
|
|
8
|
+
# manifest's featuresSite builds.
|
|
9
|
+
|
|
10
|
+
@needs-runtime-docker @needs-platform-redmine
|
|
11
|
+
Scenario: A site built on Docker Compose runs at its own address, with the DOCKER menu
|
|
12
|
+
Given I am on the folder of the "docker" site
|
|
13
|
+
Then the row of the "docker" site should show "Running"
|
|
14
|
+
And the row of the "docker" site should link to the address of its runtime
|
|
15
|
+
And the address of the "docker" site should answer
|
|
16
|
+
And the row of the "docker" site should carry the "DOCKER" menu and no DDEV menu
|
|
17
|
+
|
|
18
|
+
@needs-runtime-docker @needs-platform-redmine
|
|
19
|
+
Scenario: The Tests menu of a site on Docker Compose offers the test users
|
|
20
|
+
Given I am on the folder of the "docker" site
|
|
21
|
+
When I open the "tests" menu of the "docker" site
|
|
22
|
+
Then the open menu should offer "Add the test users"
|
|
23
|
+
And the open menu should offer "Cancel the test users"
|
|
24
|
+
|
|
25
|
+
@needs-runtime-docker @needs-platform-redmine
|
|
26
|
+
Scenario: The site on Docker Compose is installed: its login screen
|
|
27
|
+
Given I am on the folder of the "docker" site
|
|
28
|
+
When I open "/login" on the "docker" site
|
|
29
|
+
Then I should see "Login"
|
|
30
|
+
And I should see "Password"
|
|
31
|
+
And I should see "Lost password"
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Feature: The Redmine plugin on the dashboard
|
|
2
|
+
Once the plugin is activated and installed, the sites folders offer the Redmine builder, each AI folder lists the
|
|
3
|
+
items of its kind the plugin ships, the Plugins page lists the plugin with its settings, and the project rows of
|
|
4
|
+
sites and code folders carry the REDMINE menu of issues once a Redmine is connected.
|
|
5
|
+
|
|
6
|
+
# Settings lists every plugin that was added; the package and what the plugin ships are on its own page.
|
|
7
|
+
Scenario: Settings lists the plugin, and its own page names its package, what it ships and its settings
|
|
8
|
+
Given I am on "/settings"
|
|
9
|
+
Then I should see "Redmine"
|
|
10
|
+
When I go to "/settings/plugin/redmine"
|
|
11
|
+
Then I should see "@webship.co/workspace-redmine"
|
|
12
|
+
And I should see "cmd-redmine-project.sh"
|
|
13
|
+
And I should see "redmine-site-builder"
|
|
14
|
+
And I should see "Writes to Redmine (issues as work items)"
|
|
15
|
+
|
|
16
|
+
Scenario: A sites folder offers the Redmine builder
|
|
17
|
+
Given I am on "/dev"
|
|
18
|
+
Then "option[value='cmd-redmine-project.sh']" should be attached
|
|
19
|
+
|
|
20
|
+
# The AI folders are searched by name: with every plugin on, a folder lists more than one page of items.
|
|
21
|
+
Scenario: The AI Agents folder lists the agents the plugin ships
|
|
22
|
+
Given I am on "/ai-agents?q=redmine-"
|
|
23
|
+
Then I should see "redmine-site-builder"
|
|
24
|
+
And I should see "redmine-tester"
|
|
25
|
+
And I should see "redmine-issue-worker"
|
|
26
|
+
|
|
27
|
+
Scenario: The AI Skills folder lists the skill the plugin ships
|
|
28
|
+
Given I am on "/ai-skills?q=redmine-scenarios"
|
|
29
|
+
Then I should see "redmine-scenarios"
|
|
30
|
+
|
|
31
|
+
Scenario: The AI Commands folder lists the command the plugin ships
|
|
32
|
+
Given I am on "/ai-commands?q=redmine-test"
|
|
33
|
+
Then I should see "redmine-test"
|
|
34
|
+
|
|
35
|
+
Scenario: The AI Prompts folder lists the prompts the plugin ships
|
|
36
|
+
Given I am on "/ai-prompts?q=redmine-"
|
|
37
|
+
Then I should see "redmine-build-and-test"
|
|
38
|
+
And I should see "redmine-issue-to-branch"
|
|
39
|
+
|
|
40
|
+
# The issues as work items (@webship.co/workspace-tracker). The list asks Redmine again when its View or
|
|
41
|
+
# its filter changes, and Enter submits it. It needs a Redmine with a token, a default project and a project in
|
|
42
|
+
# the dev folder: CI has none, so it skips this, saying why.
|
|
43
|
+
@needs-setting-redmine-token @needs-setting-redmine-default_scope @needs-project-dev
|
|
44
|
+
Scenario: The issue list follows its View and its filter
|
|
45
|
+
Given I am on "/dev"
|
|
46
|
+
When I click on the element ".act-menu-redmine > button"
|
|
47
|
+
And I click on the element ".act-menu-redmine a[hx-get*='/tracker/list/']"
|
|
48
|
+
Then eventually I should see "All open issues ·" within 30 seconds
|
|
49
|
+
When I select "Current version" from "view"
|
|
50
|
+
Then eventually I should see "Current version ·" within 30 seconds
|
|
51
|
+
When I fill in "q" with "#1"
|
|
52
|
+
And I press the key "Enter" on the element "input[name=q]"
|
|
53
|
+
Then eventually I should see "Redmine issue #1 ·" within 30 seconds
|
package/package.json
CHANGED
|
@@ -1,6 +1,120 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webship.co/workspace-redmine",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Redmine for Webship Workspace: the builder (`cmd-redmine-project.sh`, a site of the open-source project management and issue tracking software from the official image on the project's own PostgreSQL, in containers: DDEV by default, Docker Compose too, with the default accounts as members of a sample project and its issues and version) and its tool in every sites folder, the Redmine step pack wired into the testing setup, the issues of a Redmine as work items of the tracker family (list, read, analyze, and do the work with the workspace's AI CLI on a branch; notes, time, moves and assignees after a person's click, writes off by default), and its AI items in their folders.",
|
|
5
|
+
"main": "dist/src/index.js",
|
|
6
|
+
"types": "dist/src/index.d.ts",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=24"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/webship/workspace-redmine.git"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist/src",
|
|
17
|
+
"ai",
|
|
18
|
+
"commands",
|
|
19
|
+
"config",
|
|
20
|
+
"features",
|
|
21
|
+
"scripts",
|
|
22
|
+
"testing",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsc -p tsconfig.json",
|
|
27
|
+
"prepare": "npm run build",
|
|
28
|
+
"test": "npm run build && node --test dist/tests/*.test.js",
|
|
29
|
+
"lint": "tsc -p tsconfig.json --noEmit"
|
|
30
|
+
},
|
|
31
|
+
"workspacePlugin": {
|
|
32
|
+
"name": "redmine",
|
|
33
|
+
"label": "Redmine",
|
|
34
|
+
"summary": "A builder for Redmine sites (the official image, default accounts, a sample project and version), and its issues as work items",
|
|
35
|
+
"needs": [
|
|
36
|
+
[
|
|
37
|
+
"dev",
|
|
38
|
+
"test",
|
|
39
|
+
"sandboxes",
|
|
40
|
+
"demos"
|
|
41
|
+
],
|
|
42
|
+
"ai-agents",
|
|
43
|
+
"ai-skills",
|
|
44
|
+
"ai-commands",
|
|
45
|
+
"ai-prompts"
|
|
46
|
+
],
|
|
47
|
+
"typeActions": {
|
|
48
|
+
"redmine": [
|
|
49
|
+
"sites",
|
|
50
|
+
"code"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"settingsFile": "plugin.redmine.settings.yml",
|
|
54
|
+
"settingsTemplate": "config/plugin.redmine.settings.yml",
|
|
55
|
+
"labels": "config/settings.labels.yml",
|
|
56
|
+
"commands": {
|
|
57
|
+
"types": [
|
|
58
|
+
"sites"
|
|
59
|
+
],
|
|
60
|
+
"workspaces": [
|
|
61
|
+
"dev",
|
|
62
|
+
"test",
|
|
63
|
+
"sandboxes",
|
|
64
|
+
"demos"
|
|
65
|
+
],
|
|
66
|
+
"files": [
|
|
67
|
+
"commands/cmd-redmine-project.sh",
|
|
68
|
+
"commands/cmd-tools-redmine-cli.sh"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"functions": [
|
|
73
|
+
"scripts/functions/fun-redmine.sh"
|
|
74
|
+
],
|
|
75
|
+
"args": [
|
|
76
|
+
"scripts/args/arg-redmine.sh",
|
|
77
|
+
"scripts/args/arg-redmine-cli.sh"
|
|
78
|
+
],
|
|
79
|
+
"machine": [
|
|
80
|
+
"scripts/docker-compose.redmine.yaml",
|
|
81
|
+
"scripts/redmine-site.rb",
|
|
82
|
+
"scripts/redmine-serve.sh",
|
|
83
|
+
"testing/site.feature"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"ai": {
|
|
87
|
+
"agents": [
|
|
88
|
+
"ai/agents/redmine-site-builder.md",
|
|
89
|
+
"ai/agents/redmine-tester.md",
|
|
90
|
+
"ai/agents/redmine-issue-worker.md"
|
|
91
|
+
],
|
|
92
|
+
"skills": [
|
|
93
|
+
"ai/skills/redmine-scenarios"
|
|
94
|
+
],
|
|
95
|
+
"commands": [
|
|
96
|
+
"ai/commands/redmine-test.md"
|
|
97
|
+
],
|
|
98
|
+
"prompts": [
|
|
99
|
+
"ai/prompts/redmine-build-and-test.md",
|
|
100
|
+
"ai/prompts/redmine-issue-to-branch.md"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"features": [
|
|
104
|
+
"features/redmine.feature",
|
|
105
|
+
"features/redmine-runtimes.feature"
|
|
106
|
+
],
|
|
107
|
+
"featuresSite": "cmd-redmine-project.sh ci-redmine --install --add-users --sample-content --runtime docker"
|
|
108
|
+
},
|
|
109
|
+
"dependencies": {
|
|
110
|
+
"@webship.co/workspace-tracker": "^1.0.2"
|
|
111
|
+
},
|
|
112
|
+
"devDependencies": {
|
|
113
|
+
"@types/node": "^24.0.0",
|
|
114
|
+
"@webship.co/workspace-plugin-api": "^1.0.11",
|
|
115
|
+
"typescript": "^5.9.0"
|
|
116
|
+
},
|
|
117
|
+
"publishConfig": {
|
|
118
|
+
"access": "public"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
argparse "$@" <<ARGEOF || exit 1
|
|
4
|
+
parser.add_argument('PROJECT_NAME',
|
|
5
|
+
help='The name of the Redmine project in this folder.')
|
|
6
|
+
parser.add_argument('-r', '--run',
|
|
7
|
+
default="_none_",
|
|
8
|
+
help='Run one of Redmine\'s own tasks (bundle exec rake <task>) in its container. Example: --run "db:migrate:status"')
|
|
9
|
+
parser.add_argument('-a', '--add-users',
|
|
10
|
+
action='store_true',
|
|
11
|
+
default=False,
|
|
12
|
+
help='Make the default accounts (owner, member, reader, stranger) and their memberships of Webship site, or give them back their names, passwords and roles.')
|
|
13
|
+
parser.add_argument('-c', '--cancel-users',
|
|
14
|
+
action='store_true',
|
|
15
|
+
default=False,
|
|
16
|
+
help='Lock the default accounts: they cannot log in any more, and their work stays.')
|
|
17
|
+
parser.add_argument('-s', '--sample-content',
|
|
18
|
+
action='store_true',
|
|
19
|
+
default=False,
|
|
20
|
+
help='Add the sample content the step pack and the tracker are tested on, where it is missing.')
|
|
21
|
+
parser.add_argument('-t', '--tidy',
|
|
22
|
+
action='store_true',
|
|
23
|
+
default=False,
|
|
24
|
+
help='Remove what a test run that was stopped half way left: its issues ("Webship test …"), with their time.')
|
|
25
|
+
parser.add_argument('--connect',
|
|
26
|
+
default="_none_",
|
|
27
|
+
help='Point the dashboard\'s Redmine at this site as this account: a new API key of it goes into core/config/plugin.redmine.settings.yml (never shown), with the site\'s address. Example: --connect member')
|
|
28
|
+
ARGEOF
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
argparse "$@" <<ARGEOF || exit 1
|
|
4
|
+
parser.add_argument('PROJECT_NAME',
|
|
5
|
+
help='The name of the project: its folder, its project in containers and its host name.')
|
|
6
|
+
parser.add_argument('--runtime',
|
|
7
|
+
dest='RUNTIME',
|
|
8
|
+
default="_none_",
|
|
9
|
+
choices=['ddev', 'docker'],
|
|
10
|
+
help='The container runtime to build on: ddev (the default, or container.runtime of settings.yml) or docker (Docker Compose). Redmine is not proven on the other runtimes yet.')
|
|
11
|
+
parser.add_argument('-i', '--install',
|
|
12
|
+
action='store_true',
|
|
13
|
+
default=False,
|
|
14
|
+
help='Make the workspace account an administrator of the site.')
|
|
15
|
+
parser.add_argument('-a', '--add-users',
|
|
16
|
+
action='store_true',
|
|
17
|
+
default=False,
|
|
18
|
+
help='With --install, add the default accounts (owner: Manager, member: Developer, reader: Reporter of the project Webship site; stranger: no membership): the ones the test scenarios log in as.')
|
|
19
|
+
parser.add_argument('-s', '--sample-content',
|
|
20
|
+
action='store_true',
|
|
21
|
+
default=False,
|
|
22
|
+
help='With --install and --add-users, add the sample content the step pack and the tracker are tested on: the issues of Webship site, its version Sprint 1 and a note.')
|
|
23
|
+
parser.add_argument('-v', '--redmine-version',
|
|
24
|
+
dest='REDMINE_VERSION',
|
|
25
|
+
default="",
|
|
26
|
+
help='The release of the site (a tag of the official image): 7.0.3 by default. Example: --redmine-version 7.0.3')
|
|
27
|
+
parser.add_argument('-l', '--launch',
|
|
28
|
+
action='store_true',
|
|
29
|
+
default=False,
|
|
30
|
+
help='Open the site in a browser when it is ready.')
|
|
31
|
+
ARGEOF
|