File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
components/azure_devops_microsoft_entra_id_oauth Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff 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 ( {
You can’t perform that action at this time.
0 commit comments