|
6 | 6 | */ |
7 | 7 | export namespace CIUtils { |
8 | 8 | /** |
9 | | - * Automatically extracts a human-readable CI run title when available. |
| 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 | | - * This function attempts to detect the current CI environment and return a |
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 | export function runTitle(): string | undefined { |
29 | | - return githubActionsTitle(); |
| 15 | + return undefined; |
30 | 16 | } |
31 | 17 |
|
32 | 18 | /** |
@@ -57,11 +43,6 @@ export namespace CIUtils { |
57 | 43 | } |
58 | 44 | } |
59 | 45 |
|
60 | | -function githubActionsTitle(): string | undefined { |
61 | | - const title = process.env.GITHUB_WORKFLOW?.trim(); |
62 | | - return title || undefined; |
63 | | -} |
64 | | - |
65 | 46 | function githubActions(): string | undefined { |
66 | 47 | const serverUrl = process.env.GITHUB_SERVER_URL || 'https://github.com'; |
67 | 48 | const repo = process.env.GITHUB_REPOSITORY; |
|
0 commit comments