playwright-slack-report-burak 3.0.6 → 3.0.8
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.
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
|
|
11
11
|
// Helper function to get build URL and CI platform name
|
|
12
12
|
const getBuildInfo = () => {
|
|
13
|
-
if (process.env.GITHUB_ACTIONS || process.env.
|
|
13
|
+
if (process.env.GITHUB_ACTIONS || process.env.SAFETYWINGTEST_GITHUB_TOKEN) {
|
|
14
14
|
const repo = process.env.GITHUB_REPOSITORY;
|
|
15
15
|
const runId = process.env.GITHUB_RUN_ID;
|
|
16
16
|
const serverUrl = process.env.GITHUB_SERVER_URL || 'https://github.com';
|
|
@@ -429,12 +429,12 @@ class ResultsParser {
|
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
async fetchArtifactFromGitHubActions(i, file, filePath) {
|
|
432
|
-
const githubToken = process.env.
|
|
432
|
+
const githubToken = process.env.SAFETYWINGTEST_GITHUB_TOKEN;
|
|
433
433
|
const repo = process.env.GITHUB_REPOSITORY;
|
|
434
434
|
const runId = process.env.GITHUB_RUN_ID;
|
|
435
435
|
|
|
436
436
|
if (!githubToken || !repo) {
|
|
437
|
-
console.error('GitHub Actions: Missing
|
|
437
|
+
console.error('GitHub Actions: Missing SAFETYWINGTEST_GITHUB_TOKEN or GITHUB_REPOSITORY');
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
440
|
|
|
@@ -80,12 +80,12 @@ class SlackReporter {
|
|
|
80
80
|
if (!process.env.GITHUB_ACTIONS || process.env.GITHUB_ACTIONS !== 'true') {
|
|
81
81
|
return null;
|
|
82
82
|
}
|
|
83
|
-
const githubToken = process.env.
|
|
83
|
+
const githubToken = process.env.SAFETYWINGTEST_GITHUB_TOKEN;
|
|
84
84
|
const repo = process.env.GITHUB_REPOSITORY;
|
|
85
85
|
const runId = process.env.GITHUB_RUN_ID;
|
|
86
86
|
const currentJobId = process.env.GITHUB_JOB;
|
|
87
87
|
if (!githubToken || !repo || !runId) {
|
|
88
|
-
this.log(`🔍 [GitHub Actions Detection] Missing required env vars:
|
|
88
|
+
this.log(`🔍 [GitHub Actions Detection] Missing required env vars: SAFETYWINGTEST_GITHUB_TOKEN=${!!githubToken}, GITHUB_REPOSITORY=${!!repo}, GITHUB_RUN_ID=${!!runId}`);
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
91
|
if (!axios) {
|
|
@@ -270,7 +270,7 @@ class SlackReporter {
|
|
|
270
270
|
this.log(`💡 env:`);
|
|
271
271
|
this.log(`💡 MATRIX_SHARD: $\{\{ strategy.job-index \}\} # 0-based (only shard 0 posts)`);
|
|
272
272
|
this.log(`💡 MATRIX_COUNT: $\{\{ strategy.job-total \}\}`);
|
|
273
|
-
this.log(`💡 OR ensure
|
|
273
|
+
this.log(`💡 OR ensure SAFETYWINGTEST_GITHUB_TOKEN has workflow permissions for API detection`);
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
"@slack/web-api": "^6.8.1",
|
|
4
4
|
"@slack/webhook": "^6.1.0",
|
|
5
5
|
"https-proxy-agent": "^7.0.1",
|
|
6
|
-
"adm-zip": "^0.5.10"
|
|
6
|
+
"adm-zip": "^0.5.10",
|
|
7
|
+
"axios": "^1.0.0"
|
|
7
8
|
},
|
|
8
9
|
"devDependencies": {
|
|
9
10
|
"@playwright/test": "^1.23.3",
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"lint-fix": "npx eslint . --ext .ts --fix"
|
|
32
33
|
},
|
|
33
34
|
"name": "playwright-slack-report-burak",
|
|
34
|
-
"version": "3.0.
|
|
35
|
+
"version": "3.0.8",
|
|
35
36
|
"main": "index.js",
|
|
36
37
|
"types": "dist/index.d.ts",
|
|
37
38
|
"author": "Burak B. <burak.boluk@hotmail.com>",
|