screwdriver-coverage-sonar 3.4.0 → 3.4.1
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/index.js +7 -7
- package/package.json +7 -7
package/index.js
CHANGED
|
@@ -281,8 +281,7 @@ class CoverageSonar extends CoverageBase {
|
|
|
281
281
|
pipelineId,
|
|
282
282
|
pipelineName,
|
|
283
283
|
projectKey,
|
|
284
|
-
prParentJobId
|
|
285
|
-
prNum
|
|
284
|
+
prParentJobId
|
|
286
285
|
}) {
|
|
287
286
|
let jobId = buildJobId;
|
|
288
287
|
let jobName = buildJobName;
|
|
@@ -315,12 +314,14 @@ class CoverageSonar extends CoverageBase {
|
|
|
315
314
|
}
|
|
316
315
|
|
|
317
316
|
// Use prParentJobId as ID for PRs
|
|
318
|
-
if (
|
|
317
|
+
if (coverageScope === 'job' && enterpriseEnabled) {
|
|
319
318
|
const prRegex = /^PR-(\d+)(?::([\w-]+))?$/;
|
|
320
319
|
const prNameMatch = jobName.match(prRegex);
|
|
321
320
|
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
if (prNameMatch && prNameMatch.length > 1) {
|
|
322
|
+
jobId = prParentJobId;
|
|
323
|
+
jobName = prNameMatch[2];
|
|
324
|
+
}
|
|
324
325
|
}
|
|
325
326
|
|
|
326
327
|
return {
|
|
@@ -412,8 +413,7 @@ class CoverageSonar extends CoverageBase {
|
|
|
412
413
|
pipelineName,
|
|
413
414
|
jobName,
|
|
414
415
|
projectKey: coverageProjectKey,
|
|
415
|
-
prParentJobId
|
|
416
|
-
prNum
|
|
416
|
+
prParentJobId
|
|
417
417
|
});
|
|
418
418
|
|
|
419
419
|
const infoObject = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "screwdriver-coverage-sonar",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "SonarQube implementation of the coverage-base class",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"Tiffany Kyi <tiffanykyi@gmail.com>"
|
|
30
30
|
],
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"chai": "^4.
|
|
33
|
-
"eslint": "^7.
|
|
32
|
+
"chai": "^4.3.6",
|
|
33
|
+
"eslint": "^7.32.0",
|
|
34
34
|
"eslint-config-screwdriver": "^5.0.1",
|
|
35
|
-
"mocha": "^9.
|
|
35
|
+
"mocha": "^9.2.2",
|
|
36
36
|
"mocha-multi-reporters": "^1.5.1",
|
|
37
37
|
"mocha-sonarqube-reporter": "^1.0.2",
|
|
38
38
|
"mockery": "^2.1.0",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"sinon": "^9.0.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@hapi/hoek": "^9.
|
|
44
|
-
"joi": "^17.
|
|
43
|
+
"@hapi/hoek": "^9.3.0",
|
|
44
|
+
"joi": "^17.6.0",
|
|
45
45
|
"screwdriver-coverage-base": "^2.1.0",
|
|
46
46
|
"screwdriver-logger": "^1.1.0",
|
|
47
|
-
"screwdriver-request": "^1.0.
|
|
47
|
+
"screwdriver-request": "^1.0.3",
|
|
48
48
|
"uuid": "^3.4.0"
|
|
49
49
|
},
|
|
50
50
|
"release": {
|