Cannot find remote ref <branchname>
mxstbr opened this issue ยท 7 comments
This is happening here: styled-components/styled-components-website#158
/cc @hugomd this is on your branch, maybe related?
No, that's on stage-ci.
From what I can tell it's failing on this line:
log.info(`> Fetching ${ref}...`);
await git.fetch('origin', ref);
It could be an underlying git
issue (unlikely), an issue with simple-git
or we're grabbing the wrong ref
and other git information, maybe?
I've attempted to replicate locally with this code, but I don't have any issues:
const git = require('simple-git/promise')();
(async () => {
await git.clone('https://github.com/styled-components/styled-components-website.git', './style-comp', ['--depth=1', '--branch=add/alogliadocs']);
await git.cwd('./styled-components');
await git.fetch('origin', 'add/alogliadocs');
})();
@mxstbr It'd be super helpful if you could grab the payload sent to the webhook and paste it in here ๐
just picked back up stage-ci.. its' been a while.
I can see this when a contributor forks and stage-ci is trying to checkout their branch:
Line 108 in 408f6a0
You can see stage-ci is really only used to fetching the origin remote. Other remotes aren't a thing. :)
Thanks for the PR @paulirish ! ๐