bdy 1.9.11-dev → 1.9.12-dev

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.9.11-dev",
4
+ "version": "1.9.12-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -130,10 +130,11 @@ async function getCiAndGitInfo(baseBranch) {
130
130
  const forceCommit = process.env.SNAPSHOTS_COMMIT;
131
131
  const forceBaseCommit = process.env.SNAPSHOTS_BASE_COMMIT;
132
132
  if (isBuddy) {
133
- const isPR = process.env.BUDDY_EXECUTION_PULL_REQUEST_ID;
133
+ const pullRequestNumber = Number(process.env.BUDDY_RUN_PR_NO);
134
+ const isPR = !!pullRequestNumber;
134
135
  const branch = forceBranch ||
135
136
  (isPR
136
- ? process.env.BUDDY_EXECUTION_PULL_REQUEST_HEAD_BRANCH
137
+ ? process.env.BUDDY_RUN_PR_HEAD_BRANCH
137
138
  : process.env.BUDDY_EXECUTION_BRANCH);
138
139
  const commit = forceCommit || process.env.BUDDY_EXECUTION_REVISION;
139
140
  const baseCommit = forceBaseCommit ||
@@ -145,6 +146,7 @@ async function getCiAndGitInfo(baseBranch) {
145
146
  return {
146
147
  ci: ciInfo_js_1.CI.BUDDY,
147
148
  branch,
149
+ pullRequestNumber,
148
150
  commit,
149
151
  baseCommit,
150
152
  pipelineName: process.env.BUDDY_PIPELINE_NAME,
@@ -157,6 +159,9 @@ async function getCiAndGitInfo(baseBranch) {
157
159
  }
158
160
  if (isGithubAction) {
159
161
  const isPR = process.env.GITHUB_EVENT_NAME === 'pull_request';
162
+ const pullRequestNumber = isPR && process.env.GITHUB_REF
163
+ ? Number(process.env.GITHUB_REF.split('/')[2])
164
+ : undefined;
160
165
  const branch = forceBranch ||
161
166
  (isPR ? process.env.GITHUB_HEAD_REF : process.env.GITHUB_REF_NAME);
162
167
  const commit = forceCommit ||
@@ -166,6 +171,7 @@ async function getCiAndGitInfo(baseBranch) {
166
171
  return {
167
172
  ci: ciInfo_js_1.CI.GITHUB_ACTION,
168
173
  branch,
174
+ pullRequestNumber,
169
175
  commit,
170
176
  baseCommit,
171
177
  commitDetails: await getCommitDetails(commit),
@@ -174,6 +180,9 @@ async function getCiAndGitInfo(baseBranch) {
174
180
  }
175
181
  if (isCircleCI) {
176
182
  const isPR = process.env.CIRCLE_PULL_REQUEST;
183
+ const pullRequestNumber = isPR
184
+ ? Number(process.env.CIRCLE_PR_NUMBER)
185
+ : undefined;
177
186
  const branch = forceBranch || process.env.CIRCLE_BRANCH;
178
187
  const commit = forceCommit || process.env.CIRCLE_SHA1;
179
188
  const baseCommit = forceBaseCommit ||
@@ -181,6 +190,7 @@ async function getCiAndGitInfo(baseBranch) {
181
190
  return {
182
191
  ci: ciInfo_js_1.CI.CIRCLE_CI,
183
192
  branch: process.env.CIRCLE_BRANCH,
193
+ pullRequestNumber,
184
194
  commit,
185
195
  baseCommit,
186
196
  commitDetails: await getCommitDetails(commit),
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.debug = exports.executionUrl = exports.browserPath = exports.commitDetails = exports.invokerId = exports.executionId = exports.actionId = exports.pipelineName = exports.pipelineId = exports.baseCommit = exports.commit = exports.branch = exports.ci = exports.defaultTimeout = exports.cliId = exports.buildId = exports.token = exports.parallel = exports.skipDiscovery = exports.oneByOne = exports.cliVersion = void 0;
3
+ exports.debug = exports.executionUrl = exports.browserPath = exports.commitDetails = exports.invokerId = exports.executionId = exports.actionId = exports.pipelineName = exports.pipelineId = exports.baseCommit = exports.commit = exports.pullRequestNumber = exports.branch = exports.ci = exports.defaultTimeout = exports.cliId = exports.buildId = exports.token = exports.parallel = exports.skipDiscovery = exports.oneByOne = exports.cliVersion = void 0;
4
4
  exports.setOptions = setOptions;
5
5
  exports.setBrowserPath = setBrowserPath;
6
6
  exports.setCiAndCommitInfo = setCiAndCommitInfo;
@@ -34,6 +34,7 @@ function setBrowserPath(path) {
34
34
  function setCiAndCommitInfo(ciInfo) {
35
35
  exports.ci = ciInfo.ci;
36
36
  exports.branch = ciInfo.branch;
37
+ exports.pullRequestNumber = ciInfo.pullRequestNumber;
37
38
  exports.commit = ciInfo.commit;
38
39
  exports.baseCommit = ciInfo.baseCommit;
39
40
  exports.commitDetails = ciInfo.commitDetails;
@@ -63,6 +63,7 @@ async function sendSnapshot(snapshot, firstSnapshot) {
63
63
  parallel: context_js_1.parallel,
64
64
  ci: context_js_1.ci,
65
65
  branch: context_js_1.branch,
66
+ pullRequestNumber: context_js_1.pullRequestNumber,
66
67
  commit: context_js_1.commit,
67
68
  baseCommit: context_js_1.baseCommit,
68
69
  pipelineId: context_js_1.pipelineId,
@@ -97,6 +98,7 @@ async function sendSnapshots(snapshots) {
97
98
  parallel: context_js_1.parallel,
98
99
  ci: context_js_1.ci,
99
100
  branch: context_js_1.branch,
101
+ pullRequestNumber: context_js_1.pullRequestNumber,
100
102
  commit: context_js_1.commit,
101
103
  baseCommit: context_js_1.baseCommit,
102
104
  pipelineId: context_js_1.pipelineId,
@@ -151,6 +153,7 @@ async function sendStorybook(snapshots, filePaths) {
151
153
  cliVersion: context_js_1.cliVersion,
152
154
  ci: context_js_1.ci,
153
155
  branch: context_js_1.branch,
156
+ pullRequestNumber: context_js_1.pullRequestNumber,
154
157
  commit: context_js_1.commit,
155
158
  baseCommit: context_js_1.baseCommit,
156
159
  pipelineId: context_js_1.pipelineId,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.9.11-dev",
4
+ "version": "1.9.12-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {