@testomatio/reporter 0.8.0-beta.6 → 0.8.0-beta.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.
- package/lib/pipe/github.js +6 -4
- package/lib/pipe/testomatio.js +2 -2
- package/package.json +1 -1
package/lib/pipe/github.js
CHANGED
|
@@ -14,19 +14,21 @@ class GitHubPipe {
|
|
|
14
14
|
this.tests = []
|
|
15
15
|
this.token = params.GH_PAT || process.env.GH_PAT;
|
|
16
16
|
this.ref = process.env.GITHUB_REF
|
|
17
|
-
this.repo = process.env.
|
|
17
|
+
this.repo = process.env.GITHUB_REPOSITORY
|
|
18
18
|
|
|
19
19
|
if (process.env.DEBUG) {
|
|
20
|
-
console.log('GitHub Pipe: ', this.token ? 'TOKEN' : '*no token*', this.ref, this.repo);
|
|
20
|
+
console.log(APP_PREFIX, 'GitHub Pipe: ', this.token ? 'TOKEN' : '*no token*', this.ref, this.repo);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
if (!this.token || !this.ref || !this.repo) return;
|
|
24
24
|
this.isEnabled = true;
|
|
25
|
-
|
|
25
|
+
const matchedIssue = this.ref.match(/refs\/pull\/(\d+)\/merge/);
|
|
26
|
+
if (!matchedIssue) return;
|
|
27
|
+
this.issue = matchedIssue[1]
|
|
26
28
|
this.start = new Date();
|
|
27
29
|
|
|
28
30
|
if (process.env.DEBUG) {
|
|
29
|
-
console.log('GitHub Pipe: Enabled');
|
|
31
|
+
console.log(APP_PREFIX, 'GitHub Pipe: Enabled');
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
|
package/lib/pipe/testomatio.js
CHANGED
|
@@ -16,13 +16,13 @@ class TestomatioPipe {
|
|
|
16
16
|
this.url = params.testomatioUrl || process.env.TESTOMATIO_URL || 'https://app.testomat.io';
|
|
17
17
|
this.apiKey = params.apiKey || process.env.TESTOMATIO;
|
|
18
18
|
if (process.env.DEBUG) {
|
|
19
|
-
console.log('Testomatio Pipe: ', this.apiKey ? 'API KEY' : '*no api key*');
|
|
19
|
+
console.log(APP_PREFIX, 'Testomatio Pipe: ', this.apiKey ? 'API KEY' : '*no api key*');
|
|
20
20
|
}
|
|
21
21
|
if (!this.apiKey) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
if (process.env.DEBUG) {
|
|
25
|
-
console.log('Testomatio Pipe: Enabled');
|
|
25
|
+
console.log(APP_PREFIX, 'Testomatio Pipe: Enabled');
|
|
26
26
|
}
|
|
27
27
|
this.store = store;
|
|
28
28
|
this.title = params.title || process.env.TESTOMATIO_TITLE;
|