Skip to content

Commit 6e548fd

Browse files
committed
updates
1 parent 156b4b2 commit 6e548fd

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

components/azure_devops_microsoft_entra_id_oauth/azure_devops_microsoft_entra_id_oauth.app.mjs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,21 @@ export default {
1010
description: "Event type to receive events for",
1111
async options() {
1212
const types = await this.listEventTypes();
13-
return types?.map((type) => type.id);
13+
return types.filter(({ id }) => id !== "tfvc.checkin" && id !== "build.complete").map(({ id }) => id);
14+
},
15+
},
16+
projectId: {
17+
type: "string",
18+
label: "Project ID",
19+
description: "Project ID to receive events for",
20+
async options() {
21+
const projects = await this.listProjects();
22+
return projects?.map(({
23+
id: value, name: label,
24+
}) => ({
25+
value,
26+
label,
27+
})) || [];
1428
},
1529
},
1630
},
@@ -41,6 +55,13 @@ export default {
4155
});
4256
return value;
4357
},
58+
async listProjects(opts = {}) {
59+
const { value } = await this._makeRequest({
60+
path: "/projects",
61+
...opts,
62+
});
63+
return value;
64+
},
4465
createSubscription(opts = {}) {
4566
return this._makeRequest({
4667
method: "POST",

components/azure_devops_microsoft_entra_id_oauth/sources/new-event/new-event.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ export default {
1717
"eventType",
1818
],
1919
},
20+
projectId: {
21+
propDefinition: [
22+
azureDevops,
23+
"projectId",
24+
],
25+
},
2026
},
2127
hooks: {
2228
async activate() {
@@ -29,6 +35,9 @@ export default {
2935
consumerInputs: {
3036
url: this.http.endpoint,
3137
},
38+
publisherInputs: {
39+
projectId: this.projectId,
40+
},
3241
eventType: this.eventType,
3342
};
3443
const { id } = await this.azureDevops.createSubscription({

0 commit comments

Comments
 (0)