CircleCI-Public / path-filtering-orb

MIT License
24 stars 62 forks source link

Cannot compare revision with any branch except default one #23

Closed mitsos1os closed 2 years ago

mitsos1os commented 3 years ago

Orb version: 0.0.3

What happened:

Trying to compare against any branch set in base-revision parameter, (except for the default repo one), fails to execute in set-parameters. For example, we have set up staging to be our default repo branch. The command fails as follows:

Traceback (most recent call last):
  File "<string>", line 10, in <module>
  File "/home/circleci/.pyenv/versions/3.8.12/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'merge-base', 'main', 'b4179ecc5c56120214d452e9f474dc3378bf5911']' returned non-zero exit status 128.

Expected behavior:

It should be able to compare against existing branches as well. Maybe checking them out before comparison?

Additional Information:

If using the git-remote prefix such as origin (ex: origin/main), it works, so it's a matter of branch not being checked out before comparison

Galya-Bogdanova commented 2 years ago

Is it released? Seems to be still reproducible with latest circleci/path-filtering@0.1.2.