bdy 1.9.8-dev → 1.9.9-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.
- package/distTs/package.json +1 -1
- package/distTs/src/visualTest/ci.js +14 -18
- package/package.json +1 -1
package/distTs/package.json
CHANGED
|
@@ -131,13 +131,13 @@ async function getCiAndGitInfo(baseBranch) {
|
|
|
131
131
|
const forceBaseCommit = process.env.SNAPSHOTS_BASE_COMMIT;
|
|
132
132
|
if (isBuddy) {
|
|
133
133
|
const isPR = process.env.BUDDY_EXECUTION_PULL_REQUEST_ID;
|
|
134
|
-
const branch = forceBranch ||
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
const branch = forceBranch ||
|
|
135
|
+
(isPR
|
|
136
|
+
? process.env.BUDDY_EXECUTION_PULL_REQUEST_HEAD_BRANCH
|
|
137
|
+
: process.env.BUDDY_EXECUTION_BRANCH);
|
|
137
138
|
const commit = forceCommit || process.env.BUDDY_EXECUTION_REVISION;
|
|
138
|
-
const baseCommit = forceBaseCommit ||
|
|
139
|
-
? await getBaseCommit(baseBranch, branch, true)
|
|
140
|
-
: undefined;
|
|
139
|
+
const baseCommit = forceBaseCommit ||
|
|
140
|
+
(isPR ? await getBaseCommit(baseBranch, branch, true) : undefined);
|
|
141
141
|
const invokerId = Number(process.env.BUDDY_INVOKER_ID);
|
|
142
142
|
const pipelineId = Number(process.env.BUDDY_PIPELINE_ID);
|
|
143
143
|
const actionId = Number(process.env.BUDDY_ACTION_ID);
|
|
@@ -157,15 +157,12 @@ async function getCiAndGitInfo(baseBranch) {
|
|
|
157
157
|
}
|
|
158
158
|
if (isGithubAction) {
|
|
159
159
|
const isPR = process.env.GITHUB_EVENT_NAME === 'pull_request';
|
|
160
|
-
const branch = forceBranch ||
|
|
161
|
-
? process.env.GITHUB_HEAD_REF
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
:
|
|
166
|
-
const baseCommit = forceBaseCommit || isPR
|
|
167
|
-
? await getBaseCommit(baseBranch, branch, true)
|
|
168
|
-
: undefined;
|
|
160
|
+
const branch = forceBranch ||
|
|
161
|
+
(isPR ? process.env.GITHUB_HEAD_REF : process.env.GITHUB_REF_NAME);
|
|
162
|
+
const commit = forceCommit ||
|
|
163
|
+
(isPR ? await getGithubPullRequestCommit() : process.env.GITHUB_SHA);
|
|
164
|
+
const baseCommit = forceBaseCommit ||
|
|
165
|
+
(isPR ? await getBaseCommit(baseBranch, branch, true) : undefined);
|
|
169
166
|
return {
|
|
170
167
|
ci: ciInfo_js_1.CI.GITHUB_ACTION,
|
|
171
168
|
branch,
|
|
@@ -179,9 +176,8 @@ async function getCiAndGitInfo(baseBranch) {
|
|
|
179
176
|
const isPR = process.env.CIRCLE_PULL_REQUEST;
|
|
180
177
|
const branch = forceBranch || process.env.CIRCLE_BRANCH;
|
|
181
178
|
const commit = forceCommit || process.env.CIRCLE_SHA1;
|
|
182
|
-
const baseCommit = forceBaseCommit ||
|
|
183
|
-
? await getBaseCommit(baseBranch, branch)
|
|
184
|
-
: undefined;
|
|
179
|
+
const baseCommit = forceBaseCommit ||
|
|
180
|
+
(isPR ? await getBaseCommit(baseBranch, branch) : undefined);
|
|
185
181
|
return {
|
|
186
182
|
ci: ciInfo_js_1.CI.CIRCLE_CI,
|
|
187
183
|
branch: process.env.CIRCLE_BRANCH,
|