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
* PR-task: support multiple AlertTypes to check
* Add config and load option for "all repos in project"
* Determining the highst version in the extension file
* fix error
* Load main version from AzDo server
* fix pwsh code
* install the tfx extension
* check if we hit all branches
* get all branches
* Updated the output
* fix output
* Map URLS to new area name
* updates
* Updated advanced security review task
* temp checkin
* update extension with PR task support - release to PROD
# show the highest version number in GitHub by writing to the job summary file
81
+
Set-Content -Path $env:GITHUB_STEP_SUMMARY -Value "Highest version of the extension: [$($lastVersion.version)]"
82
+
Set-Content -Path $env:GITHUB_STEP_SUMMARY -Value "Highest version of the PR check extension: [$($highestVersion.Major).$($highestVersion.Minor).$($highestVersion.Patch)]"
if(err.message.includes('Branch does not exist')){
39
-
console.log(`Branch [${branchName}] does not exist in GHAzDo yet. Make sure to run the Dependency Scan task first on this branch (easiest to do in the same pipeline).`);
54
+
console.log(`Branch [${branchName}] does not exist in GHAzDo yet. Make sure to run the Dependency Scan task first on this branch (easiest to do in the same pipeline).`)
40
55
}
41
56
else{
42
-
console.log(`An error occurred: ${err.message}`);
57
+
console.log(`An error occurred: ${err.message}`)
43
58
}
44
59
}
45
60
}
@@ -49,87 +64,136 @@ async function getAlerts(connection: WebApi, orgSlug: string, project: string, r
49
64
asyncfunctionrun(){
50
65
try{
51
66
// test to see if this build was triggered with a PR context
52
-
constbuildReason=tl.getVariable('Build.Reason');
67
+
constbuildReason=tl.getVariable('Build.Reason')
53
68
if(buildReason!='PullRequest'){
54
-
tl.setResult(tl.TaskResult.Skipped,`This extension only works when triggered by a Pull Request and not by a [${buildReason}]`);
69
+
tl.setResult(tl.TaskResult.Skipped,`This extension only works when triggered by a Pull Request and not by a [${buildReason}]`)
console.log(`Found [${sourceBranchResponse.result.count}] alerts for the source branch [${sourceBranchName}] of which [${newAlertIds.length}] are new:`);
tl.setResult(tl.TaskResult.Failed,`Found [${sourceBranchResponse.result.count}] alerts for the source branch [${sourceBranchName}] of which [${newAlertIds.length}] are new`);
119
-
}
120
-
else{
121
-
console.log(`Found no new alerts for the source branch [${sourceBranchName}]`);
122
-
tl.setResult(tl.TaskResult.Succeeded,`Found no new alerts for the source branch [${sourceBranchName}], only [${targetBranchResponse.result.count}] existing ones`);
160
+
//tl.setResult(tl.TaskResult.Succeeded, `Found no alerts for the source branch`)
161
+
return{newAlertsFound: false,message: ``}
162
+
}
163
+
else{
164
+
// check by result.alertId if there is a new alert or not (so alert not in targetBranch)
165
+
166
+
// first get the only the alertid's from the source branch
letmessage=`Found [${sourceBranchResponse.result.count}] alerts for the source branch [${sourceBranchName}] for alert type [${alertTypeString}] of which [${newAlertIds.length}] are new:`
0 commit comments