@testomatio/reporter 1.4.12-beta-bitbucket-pipe β†’ 1.4.13-beta-bitbucket-pipe

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 CHANGED
@@ -11,7 +11,7 @@ Testomat.io Reporter (this npm package) supports:
11
11
  - πŸ„ Integarion with all popular [JavaScript/TypeScript frameworks](./docs/frameworks.md)
12
12
  - πŸ—„οΈ Screenshots, videos, traces [uploaded into S3 bucket](./docs/artifacts.md)
13
13
  - πŸ”Ž [Stack traces](./docs/stacktrace.md) and error messages
14
- - πŸ™ [GitHub](./docs/pipes/github.md) & [GitLab](./docs/pipes/gitlab.md) integration
14
+ - πŸ™ [GitHub](./docs/pipes/github.md), [GitLab](./docs/pipes/gitlab.md) & [Bitbucket](./docs/pipes/bitbucket.md) integration
15
15
  - πŸš… Realtime reports
16
16
  - πŸ—ƒοΈ Other test frameworks supported via [JUNit XML](./docs/junit.md)
17
17
  - πŸšΆβ€β™€οΈ Steps _(work in progress)_
@@ -128,6 +128,7 @@ Bring this reporter on CI and never lose test results again!
128
128
  - [Gitlab](./docs/pipes/gitlab.md)
129
129
  - [CSV](./docs/pipes/csv.md)
130
130
  - [HTML report](./docs/pipes/html.md)
131
+ - [Bitbucket](./docs/pipes/bitbucket.md)
131
132
  - πŸ““ [JUnit](./docs/junit.md)
132
133
  - πŸ—„οΈ [Artifacts](./docs/artifacts.md)
133
134
  - πŸ”‚ [Workflows](./docs/workflows.md)
@@ -8,7 +8,7 @@ const { APP_PREFIX, testomatLogoURL } = require('../constants');
8
8
  const { ansiRegExp, isSameTest } = require('../utils/utils');
9
9
  const { statusEmoji, fullName } = require('../utils/pipe_utils');
10
10
 
11
- //! BITBUCKET_PAT environment variable is required for this functionality to work
11
+ //! BITBUCKET_ACCESS_TOKEN environment variable is required for this functionality to work
12
12
  //! and your pipeline trigger should be a pull request
13
13
 
14
14
  /**
@@ -23,7 +23,7 @@ class BitbucketPipe {
23
23
  this.store = store;
24
24
  this.tests = [];
25
25
  // Bitbucket PAT looks like bbpat-*****
26
- this.token = params.BITBUCKET_PAT || process.env.BITBUCKET_PAT || this.ENV.BITBUCKET_PAT;
26
+ this.token = params.BITBUCKET_ACCESS_TOKEN || process.env.BITBUCKET_ACCESS_TOKEN || this.ENV.BITBUCKET_ACCESS_TOKEN;
27
27
  this.hiddenCommentData = `Testomat.io report: ${process.env.BITBUCKET_BRANCH || ''}`;
28
28
 
29
29
  debug(
@@ -32,11 +32,6 @@ class BitbucketPipe {
32
32
  `Project key: ${this.ENV.BITBUCKET_PROJECT_KEY}, Pull request ID: ${this.ENV.BITBUCKET_PR_ID}`,
33
33
  );
34
34
 
35
- if (!this.ENV.BITBUCKET_PROJECT_KEY || !this.ENV.BITBUCKET_PR_ID) {
36
- debug(`CI pipeline should be run in a Pull Request to have the ability to add the report comment.`);
37
- return;
38
- }
39
-
40
35
  if (!this.token) {
41
36
  debug(`Hint: Bitbucket CI variables are unavailable for unprotected branches by default.`);
42
37
  return;
@@ -111,7 +106,7 @@ class BitbucketPipe {
111
106
 
112
107
  if (this.ENV.BITBUCKET_BRANCH && this.ENV.BITBUCKET_COMMIT) {
113
108
  // eslint-disable-next-line max-len
114
- summary += `| **Job** | πŸ‘· [Run: ${this.ENV.BITBUCKET_COMMIT}](https://bitbucket.org/${this.ENV.BITBUCKET_REPO_FULL_NAME}/pipelines/results/${this.ENV.BITBUCKET_BUILD_NUMBER}") Branch: **${this.ENV.BITBUCKET_BRANCH}** |`;
109
+ summary += `| **Job** | πŸ‘· [#${this.ENV.BITBUCKET_BUILD_NUMBER}](https://bitbucket.org/${this.ENV.BITBUCKET_REPO_FULL_NAME}/pipelines/results/${this.ENV.BITBUCKET_BUILD_NUMBER}") by commit: **${this.ENV.BITBUCKET_COMMIT}** |`;
115
110
  }
116
111
 
117
112
  const failures = this.tests
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "1.4.12-beta-bitbucket-pipe",
3
+ "version": "1.4.13-beta-bitbucket-pipe",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "typings": "typings/index.d.ts",