stage-ci icon indicating copy to clipboard operation
stage-ci copied to clipboard

Cannot find remote ref <branchname>

Open mxstbr opened this issue 7 years ago • 7 comments

This is happening here: https://github.com/styled-components/styled-components-website/pull/158

screen shot 2017-11-01 at 1 30 09 pm

/cc @hugomd this is on your branch, maybe related?

mxstbr avatar Nov 01 '17 12:11 mxstbr

@mxstbr I haven’t seen this before, I’ll take a look and try to replicate 👍

hugomd avatar Nov 01 '17 12:11 hugomd

@mxstbr Should I do something? Did I break this? btw What is this? :)

morajabi avatar Nov 01 '17 18:11 morajabi

No, that's on stage-ci.

mxstbr avatar Nov 01 '17 18:11 mxstbr

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 🙏

hugomd avatar Nov 01 '17 22:11 hugomd

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:

https://github.com/zpnk/stage-ci/blob/408f6a02a09b642b85ab92797c5646eabf1a6a72/src/core.js#L108

You can see stage-ci is really only used to fetching the origin remote. Other remotes aren't a thing. :)

paulirish avatar May 11 '18 22:05 paulirish

put up a fix for this in https://github.com/zpnk/stage-ci/issues/38

paulirish avatar May 11 '18 22:05 paulirish

Thanks for the PR @paulirish ! 🙏

hugomd avatar May 13 '18 06:05 hugomd