@webship.co/workspace-openproject 0.0.0-stage → 1.0.1
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 +183 -2
- package/ai/agents/openproject-site-builder.md +106 -0
- package/ai/agents/openproject-tester.md +118 -0
- package/ai/agents/openproject-work-package-worker.md +90 -0
- package/ai/commands/openproject-test.md +66 -0
- package/ai/prompts/openproject-build-and-test.md +28 -0
- package/ai/prompts/openproject-work-package-to-branch.md +24 -0
- package/ai/skills/openproject-scenarios/SKILL.md +74 -0
- package/ai/skills/openproject-scenarios/examples/roles.feature +17 -0
- package/ai/skills/openproject-scenarios/examples/session.feature +24 -0
- package/ai/skills/openproject-scenarios/examples/work-package.feature +17 -0
- package/commands/cmd-openproject-project.sh +31 -0
- package/commands/cmd-tools-openproject-cli.sh +24 -0
- package/config/plugin.openproject.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 +26 -0
- package/dist/src/lib/tracker.js +323 -0
- package/dist/src/lib/tracker.js.map +1 -0
- package/features/openproject-runtimes.feature +32 -0
- package/features/openproject.feature +53 -0
- package/package.json +118 -4
- package/scripts/args/arg-openproject-cli.sh +28 -0
- package/scripts/args/arg-openproject.sh +31 -0
- package/scripts/docker-compose.openproject.yaml +46 -0
- package/scripts/functions/fun-openproject.sh +590 -0
- package/scripts/openproject-serve.sh +17 -0
- package/scripts/openproject-site.rb +246 -0
- package/testing/site.feature +28 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* OpenProject, as a provider of the tracker family (@webship.co/workspace-tracker): the work packages of an OpenProject
|
|
4
|
+
* project, over the API v3 with an API token (basic auth as `apikey`), in a header file, never on a command line.
|
|
5
|
+
*
|
|
6
|
+
* Reads: the open work packages, mine, assigned to someone, the current sprint, and a search; one work package with
|
|
7
|
+
* its comments. Each author's standing is their membership of the project: Project admin and Member are inside, a
|
|
8
|
+
* global admin too; a Reader, a commenter or someone with no membership is outside, so the base keeps their work
|
|
9
|
+
* packages analyze-only unless a person confirms by name.
|
|
10
|
+
*
|
|
11
|
+
* Writes, which the base offers only with writes on, each after a person's click: a comment, a worklog (a time
|
|
12
|
+
* entry), a move through the workflow (the statuses the work package's form allows), an assignee, and a new work
|
|
13
|
+
* package. OpenProject is not a forge: the pull request of the work is opened from the project's forge menu.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.idOf = void 0;
|
|
20
|
+
exports.roleAssociation = roleAssociation;
|
|
21
|
+
exports.stateClassOf = stateClassOf;
|
|
22
|
+
exports.itemOf = itemOf;
|
|
23
|
+
exports.currentSprint = currentSprint;
|
|
24
|
+
exports.openprojectTracker = openprojectTracker;
|
|
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
|
+
/** The id at the end of an API link: '/api/v3/users/6' -> '6'. */
|
|
31
|
+
const idOf = (href) => String(href || '').split('/').pop() || '';
|
|
32
|
+
exports.idOf = idOf;
|
|
33
|
+
/** A project role, as the base reads an author's standing. */
|
|
34
|
+
function roleAssociation(roles) {
|
|
35
|
+
if (roles.some((r) => /project admin/i.test(r)))
|
|
36
|
+
return 'owner';
|
|
37
|
+
if (roles.some((r) => /^member$/i.test(r)))
|
|
38
|
+
return 'member';
|
|
39
|
+
if (roles.some((r) => /editor/i.test(r)))
|
|
40
|
+
return 'collaborator';
|
|
41
|
+
return roles.length ? 'contributor' : 'outside';
|
|
42
|
+
}
|
|
43
|
+
/** How a status reads: closed and rejected are done; new is open; the rest is work going on. */
|
|
44
|
+
function stateClassOf(status) {
|
|
45
|
+
if (/^(closed|rejected|done|resolved)$/i.test(status))
|
|
46
|
+
return 'done';
|
|
47
|
+
if (/^new$/i.test(status))
|
|
48
|
+
return 'open';
|
|
49
|
+
return 'doing';
|
|
50
|
+
}
|
|
51
|
+
/** A work package of the API, as the base reads an item. */
|
|
52
|
+
function itemOf(wp, base) {
|
|
53
|
+
const l = wp._links || {};
|
|
54
|
+
const state = String((l.status && l.status.title) || '');
|
|
55
|
+
return {
|
|
56
|
+
id: String(wp.id),
|
|
57
|
+
title: String(wp.subject || ''),
|
|
58
|
+
url: `${base}/work_packages/${wp.id}`,
|
|
59
|
+
state,
|
|
60
|
+
stateClass: stateClassOf(state),
|
|
61
|
+
type: l.type && l.type.title ? String(l.type.title) : undefined,
|
|
62
|
+
assignees: l.assignee && l.assignee.title ? [String(l.assignee.title)] : [],
|
|
63
|
+
labels: l.category && l.category.title ? [String(l.category.title)] : [],
|
|
64
|
+
iteration: l.sprint && l.sprint.title ? `sprint ${l.sprint.title}` : undefined,
|
|
65
|
+
updated: wp.updatedAt || undefined,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** The sprint a "current sprint" view means: the active one, else the one whose dates hold today. */
|
|
69
|
+
function currentSprint(list, now = new Date()) {
|
|
70
|
+
const all = (list || []).filter((s) => s && s.id);
|
|
71
|
+
const active = all.find((s) => /:active$/.test(String((s._links && s._links.status && s._links.status.href) || '')));
|
|
72
|
+
if (active)
|
|
73
|
+
return String(active.id);
|
|
74
|
+
const day = now.toISOString().slice(0, 10);
|
|
75
|
+
const dated = all.find((s) => s.startDate && s.finishDate && s.startDate <= day && day <= s.finishDate);
|
|
76
|
+
return dated ? String(dated.id) : '';
|
|
77
|
+
}
|
|
78
|
+
const filters = (f) => encodeURIComponent(JSON.stringify(f));
|
|
79
|
+
function openprojectTracker(api) {
|
|
80
|
+
const lib = api.lib;
|
|
81
|
+
const settings = () => api.settings.read() || {};
|
|
82
|
+
const base = () => configured(settings().url).replace(/\/+$/, '');
|
|
83
|
+
const token = () => configured(settings().token);
|
|
84
|
+
/** One call of the API v3: the token and the body in files only this user reads, removed after. */
|
|
85
|
+
async function call(method, p, body) {
|
|
86
|
+
const dir = fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), 'ws-openproject-'));
|
|
87
|
+
try {
|
|
88
|
+
const h = path_1.default.join(dir, 'headers');
|
|
89
|
+
fs_1.default.writeFileSync(h, `Authorization: Basic ${Buffer.from(`apikey:${token()}`).toString('base64')}\nAccept: application/hal+json\n`, { mode: 0o600 });
|
|
90
|
+
const args = ['-sS', '-m', '30', '-X', method, '-w', '\n%{http_code}', '-H', `@${h}`];
|
|
91
|
+
if (body !== undefined) {
|
|
92
|
+
const b = path_1.default.join(dir, 'body.json');
|
|
93
|
+
fs_1.default.writeFileSync(b, JSON.stringify(body), { mode: 0o600 });
|
|
94
|
+
args.push('-H', 'Content-Type: application/json', '--data-binary', `@${b}`);
|
|
95
|
+
}
|
|
96
|
+
args.push(`${base()}/api/v3${p}`);
|
|
97
|
+
const r = await lib.run('curl', args, process.env.HOME || '/', { timeoutMs: 40 * 1000, env: process.env });
|
|
98
|
+
const out = String(r.stdout || '');
|
|
99
|
+
const at = out.lastIndexOf('\n');
|
|
100
|
+
const status = Number(out.slice(at + 1)) || 0;
|
|
101
|
+
if (!status)
|
|
102
|
+
throw new Error(lib.cliError(String(r.stderr || 'curl did not answer')));
|
|
103
|
+
let data = null;
|
|
104
|
+
try {
|
|
105
|
+
data = JSON.parse(at >= 0 ? out.slice(0, at) : out);
|
|
106
|
+
}
|
|
107
|
+
catch (_) {
|
|
108
|
+
data = null;
|
|
109
|
+
}
|
|
110
|
+
return { status, data };
|
|
111
|
+
}
|
|
112
|
+
finally {
|
|
113
|
+
fs_1.default.rmSync(dir, { recursive: true, force: true });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const why = (r) => `OpenProject answered ${r.status}: ${String((r.data && r.data.message) || '').slice(0, 200)}`;
|
|
117
|
+
async function get(p) {
|
|
118
|
+
const r = await call('GET', p);
|
|
119
|
+
if (r.status < 200 || r.status >= 300)
|
|
120
|
+
throw new Error(why(r));
|
|
121
|
+
return r.data;
|
|
122
|
+
}
|
|
123
|
+
async function write(method, p, body, url) {
|
|
124
|
+
try {
|
|
125
|
+
const r = await call(method, p, body);
|
|
126
|
+
return r.status >= 200 && r.status < 300 ? { ok: true, error: '', url, data: r.data } : { ok: false, error: why(r) };
|
|
127
|
+
}
|
|
128
|
+
catch (e) {
|
|
129
|
+
return { ok: false, error: String(e.message || e) };
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const projectIds = new Map();
|
|
133
|
+
async function projectId(scope) {
|
|
134
|
+
if (!projectIds.has(scope.id))
|
|
135
|
+
projectIds.set(scope.id, String((await get(`/projects/${encodeURIComponent(scope.id)}`)).id));
|
|
136
|
+
return projectIds.get(scope.id);
|
|
137
|
+
}
|
|
138
|
+
/** Someone who can be assigned in a project (or to a work package), by login or by name: their id. */
|
|
139
|
+
async function assigneeId(where, who) {
|
|
140
|
+
const d = await get(`${where}/available_assignees?pageSize=200`);
|
|
141
|
+
const people = (d && d._embedded && d._embedded.elements) || [];
|
|
142
|
+
const w = who.trim().toLowerCase();
|
|
143
|
+
const found = people.find((u) => String(u.login || '').toLowerCase() === w) || people.find((u) => String(u.name || '').toLowerCase() === w);
|
|
144
|
+
if (!found)
|
|
145
|
+
throw new Error(`${who} cannot be assigned here (not a member who takes work packages)`);
|
|
146
|
+
return String(found.id);
|
|
147
|
+
}
|
|
148
|
+
// A user's name and whether they administer the whole site, asked once per user for a few minutes: an activity's
|
|
149
|
+
// link to its user carries no name.
|
|
150
|
+
const users = new Map();
|
|
151
|
+
async function userInfo(uid) {
|
|
152
|
+
const hit = users.get(uid);
|
|
153
|
+
if (hit && Date.now() - hit.at < 5 * 60 * 1000)
|
|
154
|
+
return hit;
|
|
155
|
+
let info = { name: 'unknown', admin: false };
|
|
156
|
+
try {
|
|
157
|
+
const u = await get(`/users/${uid}`);
|
|
158
|
+
info = { name: String((u && (u.name || u.login)) || 'unknown'), admin: !!(u && u.admin) };
|
|
159
|
+
}
|
|
160
|
+
catch (_) { /* a deleted or hidden user */ }
|
|
161
|
+
users.set(uid, { at: Date.now(), ...info });
|
|
162
|
+
return info;
|
|
163
|
+
}
|
|
164
|
+
// The members of a project and their roles, asked once per project for a few minutes. Asking for one person by a
|
|
165
|
+
// filter is refused (400) for a person the account cannot see, which is everyone outside its projects: the whole list
|
|
166
|
+
// answers for them too. Without the right to see the members (403) every standing is unknown.
|
|
167
|
+
const memberships = new Map();
|
|
168
|
+
async function membersOf(scope) {
|
|
169
|
+
const hit = memberships.get(scope.id);
|
|
170
|
+
if (hit && Date.now() - hit.at < 5 * 60 * 1000)
|
|
171
|
+
return hit.roles;
|
|
172
|
+
let roles = null;
|
|
173
|
+
try {
|
|
174
|
+
const pid = await projectId(scope);
|
|
175
|
+
const d = await get(`/memberships?pageSize=1000&filters=${filters([{ project: { operator: '=', values: [pid] } }])}`);
|
|
176
|
+
roles = new Map();
|
|
177
|
+
for (const m of ((d && d._embedded && d._embedded.elements) || [])) {
|
|
178
|
+
const uid = (0, exports.idOf)(m._links && m._links.principal && m._links.principal.href);
|
|
179
|
+
const names = ((m._links && m._links.roles) || []).map((r) => String(r.title || ''));
|
|
180
|
+
roles.set(uid, [...(roles.get(uid) || []), ...names]);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch (_) {
|
|
184
|
+
roles = null;
|
|
185
|
+
}
|
|
186
|
+
memberships.set(scope.id, { at: Date.now(), roles });
|
|
187
|
+
return roles;
|
|
188
|
+
}
|
|
189
|
+
async function standing(scope, href) {
|
|
190
|
+
const uid = (0, exports.idOf)(href);
|
|
191
|
+
if (!/^\d+$/.test(uid))
|
|
192
|
+
return 'unknown';
|
|
193
|
+
const roles = await membersOf(scope);
|
|
194
|
+
if (!roles)
|
|
195
|
+
return 'unknown';
|
|
196
|
+
const a = roleAssociation(roles.get(uid) || []);
|
|
197
|
+
// An administrator of the whole site who is no member of the project, when the account may see that.
|
|
198
|
+
return a === 'outside' && (await userInfo(uid)).admin ? 'owner' : a;
|
|
199
|
+
}
|
|
200
|
+
/** A person of a link: its title when it carries one, else the user's name. */
|
|
201
|
+
async function personOf(scope, link) {
|
|
202
|
+
const href = link && link.href;
|
|
203
|
+
const uid = (0, exports.idOf)(href);
|
|
204
|
+
const name = link && link.title ? String(link.title) : (/^\d+$/.test(uid) ? (await userInfo(uid)).name : 'unknown');
|
|
205
|
+
return { name, association: await standing(scope, href) };
|
|
206
|
+
}
|
|
207
|
+
const wpUrl = (id) => `${base()}/work_packages/${id}`;
|
|
208
|
+
return {
|
|
209
|
+
id: api.name,
|
|
210
|
+
title: 'OpenProject',
|
|
211
|
+
label: 'OPENPROJECT',
|
|
212
|
+
noun: { one: 'work package', many: 'work packages' },
|
|
213
|
+
capabilities: {
|
|
214
|
+
views: ['open', 'mine', 'assigned', 'iteration', 'query'],
|
|
215
|
+
iterationWord: 'sprint',
|
|
216
|
+
comment: true, worklog: true, transition: true, labels: false, assign: true, create: true,
|
|
217
|
+
request: 'none',
|
|
218
|
+
},
|
|
219
|
+
idPattern: /^[1-9][0-9]{0,9}$/,
|
|
220
|
+
tokenVariables: ['OPENPROJECT_API_KEY', 'OPENPROJECT_TOKEN'],
|
|
221
|
+
// OpenProject's own tokens: opapi- (an API token), opal- (a login cookie), opbk- (a backup), opical- (a calendar
|
|
222
|
+
// feed), each followed by 64 hex digits. The base refuses them in what is about to be posted.
|
|
223
|
+
tokenShapes: [['an OpenProject token', /\bop(?:api|al|bk|ical)-[0-9a-f]{32,}/]],
|
|
224
|
+
secret: () => token(),
|
|
225
|
+
ready: () => (!base() ? `no OpenProject address in ${api.settings.file} (url)` : !token() ? `no API token in ${api.settings.file} (token)` : ''),
|
|
226
|
+
// A workspace project has no OpenProject project of its own: it remembers one, or the default is used.
|
|
227
|
+
scopeOf: () => null,
|
|
228
|
+
parseScope: (text) => {
|
|
229
|
+
const t = String(text || '').trim();
|
|
230
|
+
return SCOPE_RE.test(t) && base() ? { id: t, name: t, web: `${base()}/projects/${t}` } : null;
|
|
231
|
+
},
|
|
232
|
+
urlOf: (_s, id) => wpUrl(id),
|
|
233
|
+
account: async () => { try {
|
|
234
|
+
return String((await get('/users/me')).login || '');
|
|
235
|
+
}
|
|
236
|
+
catch (_) {
|
|
237
|
+
return '';
|
|
238
|
+
} },
|
|
239
|
+
scopes: async () => {
|
|
240
|
+
const d = await get('/projects?pageSize=200');
|
|
241
|
+
return ((d && d._embedded && d._embedded.elements) || []).filter((x) => x.identifier && SCOPE_RE.test(String(x.identifier)))
|
|
242
|
+
.map((x) => ({ id: String(x.identifier), name: String(x.name || x.identifier), web: `${base()}/projects/${x.identifier}` }));
|
|
243
|
+
},
|
|
244
|
+
list: async (scope, q) => {
|
|
245
|
+
const f = [{ status: { operator: 'o', values: [] } }];
|
|
246
|
+
if (q.view === 'mine')
|
|
247
|
+
f.push({ assignee: { operator: '=', values: ['me'] } });
|
|
248
|
+
if (q.view === 'assigned') {
|
|
249
|
+
if (!q.who)
|
|
250
|
+
return [];
|
|
251
|
+
f.push({ assignee: { operator: '=', values: [await assigneeId(`/projects/${await projectId(scope)}`, q.who)] } });
|
|
252
|
+
}
|
|
253
|
+
if (q.view === 'iteration') {
|
|
254
|
+
const sprints = await get(`/sprints?filters=${filters([{ definingWorkspace: { operator: '=', values: [await projectId(scope)] } }])}`);
|
|
255
|
+
const sid = currentSprint((sprints && sprints._embedded && sprints._embedded.elements) || []);
|
|
256
|
+
if (!sid)
|
|
257
|
+
return [];
|
|
258
|
+
f.push({ sprint: { operator: '=', values: [sid] } });
|
|
259
|
+
}
|
|
260
|
+
if (q.view === 'query')
|
|
261
|
+
f.push({ search: { operator: '**', values: [String(q.text || '')] } });
|
|
262
|
+
const sort = encodeURIComponent(JSON.stringify([['updatedAt', 'desc']]));
|
|
263
|
+
const d = await get(`/projects/${encodeURIComponent(scope.id)}/work_packages?pageSize=${Math.max(1, Math.min(q.limit, 100))}&sortBy=${sort}&filters=${filters(f)}`);
|
|
264
|
+
return ((d && d._embedded && d._embedded.elements) || []).map((wp) => itemOf(wp, base()));
|
|
265
|
+
},
|
|
266
|
+
get: async (scope, id) => {
|
|
267
|
+
const [wp, acts] = await Promise.all([get(`/work_packages/${id}`), get(`/work_packages/${id}/activities`)]);
|
|
268
|
+
const l = wp._links || {};
|
|
269
|
+
const author = await personOf(scope, l.author);
|
|
270
|
+
const list = (acts && acts._embedded && acts._embedded.elements) || [];
|
|
271
|
+
// The description's last editor: the newest journal that changed it, when it is not the author.
|
|
272
|
+
let lastEditor;
|
|
273
|
+
const edit = [...list].reverse().find((a) => (a.details || []).some((d) => /^description (changed|set)/i.test(String(d.raw || ''))));
|
|
274
|
+
const editorLink = edit && edit._links && edit._links.user;
|
|
275
|
+
if (editorLink && (0, exports.idOf)(editorLink.href) !== (0, exports.idOf)(l.author && l.author.href))
|
|
276
|
+
lastEditor = await personOf(scope, editorLink);
|
|
277
|
+
const comments = [];
|
|
278
|
+
for (const a of list) {
|
|
279
|
+
const raw = a.comment && String(a.comment.raw || '').trim();
|
|
280
|
+
if (!raw)
|
|
281
|
+
continue;
|
|
282
|
+
comments.push({ author: await personOf(scope, a._links && a._links.user), body: raw, at: String(a.createdAt || '') });
|
|
283
|
+
}
|
|
284
|
+
const full = { ...itemOf(wp, base()), body: String((wp.description && wp.description.raw) || ''), author, ...(lastEditor ? { lastEditor } : {}), comments };
|
|
285
|
+
return full;
|
|
286
|
+
},
|
|
287
|
+
comment: async (_scope, id, markdown) => write('POST', `/work_packages/${id}/activities`, { comment: { raw: markdown } }, `${wpUrl(id)}/activity`),
|
|
288
|
+
worklog: async (_scope, id, entry) => write('POST', '/time_entries', {
|
|
289
|
+
hours: `PT${entry.minutes}M`, spentOn: new Date().toISOString().slice(0, 10), comment: { raw: entry.text },
|
|
290
|
+
_links: { workPackage: { href: `/api/v3/work_packages/${id}` } },
|
|
291
|
+
}, wpUrl(id)),
|
|
292
|
+
transitions: async (_scope, id) => {
|
|
293
|
+
const wp = await get(`/work_packages/${id}`);
|
|
294
|
+
const form = await call('POST', `/work_packages/${id}/form`, { lockVersion: wp.lockVersion });
|
|
295
|
+
const allowed = (((form.data || {})._embedded || {}).schema || {}).status;
|
|
296
|
+
const now = (wp._links && wp._links.status && wp._links.status.title) || '';
|
|
297
|
+
return ((allowed && allowed._links && allowed._links.allowedValues) || [])
|
|
298
|
+
.filter((s) => s.title && s.title !== now).map((s) => ({ id: (0, exports.idOf)(s.href), name: String(s.title) }));
|
|
299
|
+
},
|
|
300
|
+
transition: async (_scope, id, to) => {
|
|
301
|
+
if (!/^\d+$/.test(to))
|
|
302
|
+
return { ok: false, error: `not a status: ${to}` };
|
|
303
|
+
const wp = await get(`/work_packages/${id}`);
|
|
304
|
+
return write('PATCH', `/work_packages/${id}`, { lockVersion: wp.lockVersion, _links: { status: { href: `/api/v3/statuses/${to}` } } }, wpUrl(id));
|
|
305
|
+
},
|
|
306
|
+
assign: async (_scope, id, whom) => {
|
|
307
|
+
let uid = '';
|
|
308
|
+
try {
|
|
309
|
+
uid = await assigneeId(`/work_packages/${id}`, whom);
|
|
310
|
+
}
|
|
311
|
+
catch (e) {
|
|
312
|
+
return { ok: false, error: String(e.message || e) };
|
|
313
|
+
}
|
|
314
|
+
const wp = await get(`/work_packages/${id}`);
|
|
315
|
+
return write('PATCH', `/work_packages/${id}`, { lockVersion: wp.lockVersion, _links: { assignee: { href: `/api/v3/users/${uid}` } } }, wpUrl(id));
|
|
316
|
+
},
|
|
317
|
+
create: async (scope, item) => {
|
|
318
|
+
const r = await write('POST', `/projects/${encodeURIComponent(scope.id)}/work_packages`, { subject: item.title, description: { raw: item.body } }, '');
|
|
319
|
+
return r.ok ? { ok: true, error: '', id: String(r.data && r.data.id), url: wpUrl(String(r.data && r.data.id)) } : r;
|
|
320
|
+
},
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
//# sourceMappingURL=tracker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracker.js","sourceRoot":"","sources":["../../../src/lib/tracker.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;AAcH,0CAKC;AAGD,oCAIC;AAGD,wBAeC;AAGD,sCAOC;AAID,gDA8MC;AAtQD,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;AAC5H,kEAAkE;AAC3D,MAAM,IAAI,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;AAApE,QAAA,IAAI,QAAgE;AAEjF,8DAA8D;AAC9D,SAAgB,eAAe,CAAC,KAAe;IAC7C,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAE,OAAO,OAAO,CAAC;IAChE,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,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AC,CAAC;YAC7C,OAAO,KAAK,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,iBAAiB,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QACpJ,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC5B,MAAM,CAAC,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE,aAAa,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,gBAAgB,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YACvJ,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACtH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Feature: An OpenProject site on Docker Compose
|
|
2
|
+
The builder builds on DDEV by default, and with --runtime docker on Docker Compose: the publisher's 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 OpenProject in its Tests menu.
|
|
5
|
+
|
|
6
|
+
# Each scenario drives a real OpenProject site built with cmd-openproject-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-openproject
|
|
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-openproject
|
|
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
|
+
# The login page asks the site's API who is logged in, and a visitor gets a 401 the browser logs: @js-off.
|
|
26
|
+
@needs-runtime-docker @needs-platform-openproject @js-off
|
|
27
|
+
Scenario: The site on Docker Compose is installed: its login screen
|
|
28
|
+
Given I am on the folder of the "docker" site
|
|
29
|
+
When I open "/login" on the "docker" site
|
|
30
|
+
Then I should see "Username"
|
|
31
|
+
And I should see "Password"
|
|
32
|
+
And I should see "Forgot your password?"
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Feature: The OpenProject plugin on the dashboard
|
|
2
|
+
Once the plugin is activated and installed, the sites folders offer the OpenProject 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 OPENPROJECT menu of work packages once an OpenProject 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 "OpenProject"
|
|
10
|
+
When I go to "/settings/plugin/openproject"
|
|
11
|
+
Then I should see "@webship.co/workspace-openproject"
|
|
12
|
+
And I should see "cmd-openproject-project.sh"
|
|
13
|
+
And I should see "openproject-site-builder"
|
|
14
|
+
And I should see "Writes to OpenProject (work packages as work items)"
|
|
15
|
+
|
|
16
|
+
Scenario: A sites folder offers the OpenProject builder
|
|
17
|
+
Given I am on "/dev"
|
|
18
|
+
Then "option[value='cmd-openproject-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=openproject-"
|
|
23
|
+
Then I should see "openproject-site-builder"
|
|
24
|
+
And I should see "openproject-tester"
|
|
25
|
+
And I should see "openproject-work-package-worker"
|
|
26
|
+
|
|
27
|
+
Scenario: The AI Skills folder lists the skill the plugin ships
|
|
28
|
+
Given I am on "/ai-skills?q=openproject-scenarios"
|
|
29
|
+
Then I should see "openproject-scenarios"
|
|
30
|
+
|
|
31
|
+
Scenario: The AI Commands folder lists the command the plugin ships
|
|
32
|
+
Given I am on "/ai-commands?q=openproject-test"
|
|
33
|
+
Then I should see "openproject-test"
|
|
34
|
+
|
|
35
|
+
Scenario: The AI Prompts folder lists the prompts the plugin ships
|
|
36
|
+
Given I am on "/ai-prompts?q=openproject-"
|
|
37
|
+
Then I should see "openproject-build-and-test"
|
|
38
|
+
And I should see "openproject-work-package-to-branch"
|
|
39
|
+
|
|
40
|
+
# The work packages as work items (@webship.co/workspace-tracker). The list asks OpenProject again when its View or
|
|
41
|
+
# its filter changes, and Enter submits it. It needs an OpenProject 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-openproject-token @needs-setting-openproject-default_scope @needs-project-dev
|
|
44
|
+
Scenario: The work package list follows its View and its filter
|
|
45
|
+
Given I am on "/dev"
|
|
46
|
+
When I click on the element ".act-menu-openproject > button"
|
|
47
|
+
And I click on the element ".act-menu-openproject a[hx-get*='/tracker/list/']"
|
|
48
|
+
Then eventually I should see "All open work packages ·" within 30 seconds
|
|
49
|
+
When I select "Current sprint" from "view"
|
|
50
|
+
Then eventually I should see "Current sprint ·" within 30 seconds
|
|
51
|
+
When I fill in "q" with "#38"
|
|
52
|
+
And I press the key "Enter" on the element "input[name=q]"
|
|
53
|
+
Then eventually I should see "OpenProject work package #38 ·" within 30 seconds
|
package/package.json
CHANGED
|
@@ -1,6 +1,120 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webship.co/workspace-openproject",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "OpenProject for Webship Workspace: the builder (`cmd-openproject-project.sh`, a site of the open-source project management software from the publisher's 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 work packages and sprint) and its tool in every sites folder, the OpenProject step pack wired into the testing setup, the work packages of an OpenProject as work items of the tracker family (list, read, analyze, and do the work with the workspace's AI CLI on a branch; comments, 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-openproject.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": "openproject",
|
|
33
|
+
"label": "OpenProject",
|
|
34
|
+
"summary": "A builder for OpenProject sites (the publisher's image, default accounts, a sample project and sprint), and its work packages 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
|
+
"openproject": [
|
|
49
|
+
"sites",
|
|
50
|
+
"code"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"settingsFile": "plugin.openproject.settings.yml",
|
|
54
|
+
"settingsTemplate": "config/plugin.openproject.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-openproject-project.sh",
|
|
68
|
+
"commands/cmd-tools-openproject-cli.sh"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"functions": [
|
|
73
|
+
"scripts/functions/fun-openproject.sh"
|
|
74
|
+
],
|
|
75
|
+
"args": [
|
|
76
|
+
"scripts/args/arg-openproject.sh",
|
|
77
|
+
"scripts/args/arg-openproject-cli.sh"
|
|
78
|
+
],
|
|
79
|
+
"machine": [
|
|
80
|
+
"scripts/docker-compose.openproject.yaml",
|
|
81
|
+
"scripts/openproject-site.rb",
|
|
82
|
+
"scripts/openproject-serve.sh",
|
|
83
|
+
"testing/site.feature"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"ai": {
|
|
87
|
+
"agents": [
|
|
88
|
+
"ai/agents/openproject-site-builder.md",
|
|
89
|
+
"ai/agents/openproject-tester.md",
|
|
90
|
+
"ai/agents/openproject-work-package-worker.md"
|
|
91
|
+
],
|
|
92
|
+
"skills": [
|
|
93
|
+
"ai/skills/openproject-scenarios"
|
|
94
|
+
],
|
|
95
|
+
"commands": [
|
|
96
|
+
"ai/commands/openproject-test.md"
|
|
97
|
+
],
|
|
98
|
+
"prompts": [
|
|
99
|
+
"ai/prompts/openproject-build-and-test.md",
|
|
100
|
+
"ai/prompts/openproject-work-package-to-branch.md"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"features": [
|
|
104
|
+
"features/openproject.feature",
|
|
105
|
+
"features/openproject-runtimes.feature"
|
|
106
|
+
],
|
|
107
|
+
"featuresSite": "cmd-openproject-project.sh ci-openproject --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 OpenProject project in this folder.')
|
|
6
|
+
parser.add_argument('-r', '--run',
|
|
7
|
+
default="_none_",
|
|
8
|
+
help='Run one of OpenProject\'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 work packages ("Webship test …"), with their time.')
|
|
25
|
+
parser.add_argument('--connect',
|
|
26
|
+
default="_none_",
|
|
27
|
+
help='Point the dashboard\'s OpenProject at this site as this account: a new API token of it goes into core/config/plugin.openproject.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). OpenProject 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: Project admin, member: Member, reader: Reader 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 work packages of Webship site, its active sprint and a comment.')
|
|
23
|
+
parser.add_argument('-v', '--openproject-version',
|
|
24
|
+
dest='OPENPROJECT_VERSION',
|
|
25
|
+
default="",
|
|
26
|
+
help='The release of the site (a tag of the publisher\'s image): 17.9.8 by default. Example: --openproject-version 17.9.8')
|
|
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
|