You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
body: `Heya @${requestingUser}, I've started to run the ${suiteName} on this PR at ${refSha}. You can monitor the build [here](${buildQueue._links.web.href}).`
67
+
body: `Heya @${requestingUser}, I've started to run the ${suiteName} on this PR at ${refSha}. You can monitor the build [here](${buildUrl}).`
83
68
});
84
69
log(`Updated to "build is queued" comment ${commentId}`)
85
70
}
86
71
87
72
/**
88
-
* Authenticate with vsts and schedule the build
73
+
* @typedef {{
74
+
* definition: {
75
+
* id: number;
76
+
* };
77
+
* queue: {
78
+
* id: number;
79
+
* };
80
+
* project: {
81
+
* id: string;
82
+
* };
83
+
* sourceBranch: string;
84
+
* sourceVersion: string;
85
+
* parameters: string;
86
+
* }} BuildVars
87
+
*/
88
+
89
+
/**
90
+
* Authenticate with github and vsts, make a comment saying what's being done, then schedule the build
91
+
* and update the comment with the build log URL.
89
92
* @param {*} request The request object
90
-
* @param {*} pr The github PR data object
93
+
* @param {string} suiteName The frindly name to call the suite in the associated comment
91
94
* @param {number} definitionId The VSTS id of the build definition to trigger
92
95
* @param {(s: string) => void} log
93
96
* @param {(x: BuildVars) => (Promise<BuildVars> | BuildVars)} buildTriggerAugmentor maps the intial build request into an enhanced one
* templateParameters?: Record<string, string | number | boolean | undefined>;
127
+
* queue?: undefined;
128
+
* sourceBranch?: undefined;
129
+
* sourceVersion?: undefined;
130
+
* parameters?: undefined;
131
+
* }} PipelineRunArgs
132
+
*/
133
+
134
+
/**
135
+
* Authenticate with github and vsts, make a comment saying what's being done, then schedule the build
136
+
* and update the comment with the build log URL.
137
+
* @param {*} request The request object
138
+
* @param {string} suiteName The frindly name to call the suite in the associated comment
139
+
* @param {number} definitionId The VSTS id of the build definition to trigger
140
+
* @param {(s: string) => void} log
141
+
* @param {(x: PipelineRunArgs) => (Promise<PipelineRunArgs> | PipelineRunArgs)} buildTriggerAugmentor maps the intial build request into an enhanced one
// The new pipelines API is not yet supported by the node client, so we have to do this manually.
150
+
// The request was reverse engineered from the HTTP requests made by the azure devops UI, the node client, and the Go client (which has implemented this).
.set(/perftest(?:this)?(?!this)(?!faster)/,action(async(request,log)=>awaitmakeNewBuildWithComments(request,"perf test suite",22,log,p=>({...p,queue: {id: 22}}))))
240
308
.set(/perftest(?:this)?faster/,action(async(request,log)=>awaitmakeNewBuildWithComments(request,"abridged perf test suite",45,log,p=>({...p,queue: {id: 22}}))))
0 commit comments