Script for `happo-ci-circleci` broken on custom base branch
monokrome opened this issue · 1 comments
monokrome commented
It seems like there's an issue with happo-ci-circleci where it tries to compare BASE_BRANCH against itself after merging into the base branch. I have the BASE_BRANCH set to origin/main. Unfortunately, when that happens it seems like it fails because it tries to treat the base branch as a pull request instead of as a base branch?
I think the relevant error here is Failed to obtain temporary pull-request token
. Any thoughts?
#!/bin/sh -eo pipefail
yarn run snapshot
yarn run v1.22.10
$ BASE_BRANCH=origin/main happo-ci-circleci
Using origin/main as the default branch (change this with the BASE_BRANCH environment variable)
Using the following ENV variables:
PREVIOUS_SHA: 2afb53786e3ee7c0781d61908641f56dc70090fa
CURRENT_SHA: 2afb53786e3ee7c0781d61908641f56dc70090fa
CHANGE_URL: https://github.com/company/design-system/commit/2afb53786e3ee7c0781d61908641f56dc70090fa
INSTALL_CMD:
HAPPO_IS_ASYNC:
HAPPO_GIT_COMMAND: git
HAPPO_COMMAND: node_modules/happo.io/build/cli.js
Detected yarn.lock - using yarn to install dependencies
We're not on a branch, so there's nothing to compare against.
Running a single happo run on 2afb53786e3ee7c0781d61908641f56dc70090fa
No `apiKey` or `apiSecret` found in config. Falling back to pull-request authentication.
Error: Failed to obtain temporary pull-request token
at loadUserConfig (/root/project/node_modules/happo.io/build/loadUserConfig.js:89:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Caused by:
StatusCodeError: 400 - "No pull request found"
at new StatusCodeError (/root/project/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/root/project/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/root/project/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/root/project/node_modules/request/request.js:185:22)
at Request.emit (events.js:314:20)
at Request.<anonymous> (/root/project/node_modules/request/request.js:1154:10)
at Request.emit (events.js:314:20)
at IncomingMessage.<anonymous> (/root/project/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:420:28)
at IncomingMessage.emit (events.js:326:22)
/root/project/node_modules/happo.io/build/loadUserConfig.js:89
throw new _WrappedError.default('Failed to obtain temporary pull-request token', e);
trotzig commented
Since you closed the issue, did you get this resolved @monokrome?