@bakers-build/addon-remote-drupal 0.11.1-next.8 → 0.12.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/dist/src/index.js +12 -1
- package/package.json +6 -6
package/dist/src/index.js
CHANGED
|
@@ -172,7 +172,7 @@ export class DrupalBbRemote {
|
|
|
172
172
|
// workspace_id` include resolves the ticket's project AND its workspace
|
|
173
173
|
// in the SAME request — a `bb_project` belongs to a `bb_group` (the
|
|
174
174
|
// OG group), and a `bb_group` belongs to a `bb_workspace`.
|
|
175
|
-
const doc = (await this.api.get(`bb_ticket/bb_ticket/${uuid}?include=labels,environments,ticket_type,recipe,project_id.group_id.workspace_id,conductor_id.owner_user_id`));
|
|
175
|
+
const doc = (await this.api.get(`bb_ticket/bb_ticket/${uuid}?include=labels,environments,ticket_type,recipe,project_id.group_id.workspace_id,conductor_id.owner_user_id,reviewers`));
|
|
176
176
|
const attrs = doc.data?.attributes ?? {};
|
|
177
177
|
const issueUrl = typeof attrs.origin === 'string' ? attrs.origin : undefined;
|
|
178
178
|
const included = Array.isArray(doc.included) ? doc.included : [];
|
|
@@ -204,6 +204,16 @@ export class DrupalBbRemote {
|
|
|
204
204
|
: undefined;
|
|
205
205
|
return typeof value === 'string' ? value : undefined;
|
|
206
206
|
};
|
|
207
|
+
// A mail the server's field access hides stays absent; forge_pr_upsert skips that reviewer.
|
|
208
|
+
const reviewers = refs('reviewers').map((r) => {
|
|
209
|
+
const a = byId.get(`${r.type}:${r.id}`)?.attributes ?? {};
|
|
210
|
+
return {
|
|
211
|
+
name: typeof a.display_name === 'string' ? a.display_name : r.id,
|
|
212
|
+
...(typeof a.mail === 'string' && a.mail !== ''
|
|
213
|
+
? { mail: a.mail }
|
|
214
|
+
: {}),
|
|
215
|
+
};
|
|
216
|
+
});
|
|
207
217
|
const type = termName('ticket_type');
|
|
208
218
|
const recipe = termName('recipe');
|
|
209
219
|
const projectRef = ref(doc.data, 'project_id');
|
|
@@ -258,6 +268,7 @@ export class DrupalBbRemote {
|
|
|
258
268
|
...(recipe ? { recipe } : {}),
|
|
259
269
|
labels,
|
|
260
270
|
environments,
|
|
271
|
+
...(reviewers.length > 0 ? { reviewers } : {}),
|
|
261
272
|
};
|
|
262
273
|
}
|
|
263
274
|
async getReachableWorkspaces() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/addon-remote-drupal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "bakers.build conductor remote addon: the Drupal/JSON:API control-plane remote.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"dropsh": "^0.8.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@bakers-build/conductor": "^0.
|
|
28
|
-
"@bakers-build/core": "^0.
|
|
29
|
-
"@bakers-build/message": "^0.
|
|
27
|
+
"@bakers-build/conductor": "^0.12.0",
|
|
28
|
+
"@bakers-build/core": "^0.12.0",
|
|
29
|
+
"@bakers-build/message": "^0.12.0"
|
|
30
30
|
},
|
|
31
31
|
"bakersBuild": {
|
|
32
|
-
"commit": "
|
|
33
|
-
"channel": "
|
|
32
|
+
"commit": "4c0c7ffab0be833fb9cbb50b0784a949593f08e6",
|
|
33
|
+
"channel": "latest"
|
|
34
34
|
}
|
|
35
35
|
}
|