@flakiness/sdk 2.5.0 → 2.6.0
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/README.md +1 -1
- package/lib/index.js +1 -5
- package/package.json +1 -1
- package/types/src/ciUtils.d.ts +3 -17
- package/types/src/ciUtils.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ const env = ReportUtils.createEnvironment({ name: 'CI' });
|
|
|
34
34
|
const report: FlakinessReport.Report = {
|
|
35
35
|
category: 'testreport',
|
|
36
36
|
commitId: worktree.headCommitId(),
|
|
37
|
-
title:
|
|
37
|
+
title: process.env.FLAKINESS_TITLE,
|
|
38
38
|
url: CIUtils.runUrl(),
|
|
39
39
|
environments: [env],
|
|
40
40
|
suites: [{
|
package/lib/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __export = (target, all) => {
|
|
|
8
8
|
var CIUtils;
|
|
9
9
|
((CIUtils2) => {
|
|
10
10
|
function runTitle() {
|
|
11
|
-
return
|
|
11
|
+
return void 0;
|
|
12
12
|
}
|
|
13
13
|
CIUtils2.runTitle = runTitle;
|
|
14
14
|
function runUrl() {
|
|
@@ -16,10 +16,6 @@ var CIUtils;
|
|
|
16
16
|
}
|
|
17
17
|
CIUtils2.runUrl = runUrl;
|
|
18
18
|
})(CIUtils || (CIUtils = {}));
|
|
19
|
-
function githubActionsTitle() {
|
|
20
|
-
const title = process.env.GITHUB_WORKFLOW?.trim();
|
|
21
|
-
return title || void 0;
|
|
22
|
-
}
|
|
23
19
|
function githubActions() {
|
|
24
20
|
const serverUrl = process.env.GITHUB_SERVER_URL || "https://github.com";
|
|
25
21
|
const repo = process.env.GITHUB_REPOSITORY;
|
package/package.json
CHANGED
package/types/src/ciUtils.d.ts
CHANGED
|
@@ -6,24 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare namespace CIUtils {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* @deprecated Use the `title` reporter option or `FLAKINESS_TITLE` environment variable instead.
|
|
10
|
+
* See https://docs.flakiness.io/report/customization/#title
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
* stable title that identifies the workflow or pipeline generating the report.
|
|
13
|
-
*
|
|
14
|
-
* Supported CI providers (checked in order):
|
|
15
|
-
* - GitHub Actions (via `GITHUB_WORKFLOW`)
|
|
16
|
-
*
|
|
17
|
-
* @returns {string | undefined} The CI run title, or `undefined` if no supported
|
|
18
|
-
* CI environment exposes a stable human-readable title.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```typescript
|
|
22
|
-
* const report: FlakinessReport.Report = {
|
|
23
|
-
* // ... other report properties
|
|
24
|
-
* title: CIUtils.runTitle(),
|
|
25
|
-
* };
|
|
26
|
-
* ```
|
|
12
|
+
* @returns {undefined} Always returns `undefined`.
|
|
27
13
|
*/
|
|
28
14
|
function runTitle(): string | undefined;
|
|
29
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ciUtils.d.ts","sourceRoot":"","sources":["../../src/ciUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,yBAAiB,OAAO,CAAC;IACvB
|
|
1
|
+
{"version":3,"file":"ciUtils.d.ts","sourceRoot":"","sources":["../../src/ciUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,yBAAiB,OAAO,CAAC;IACvB;;;;;OAKG;IACH,SAAgB,QAAQ,IAAI,MAAM,GAAG,SAAS,CAE7C;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAgB,MAAM,IAAI,MAAM,GAAG,SAAS,CAE3C;CACF"}
|