You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the documentation for the darker github action, this suggestion:
"""
The revision: "master..." (or "main...") option instructs Darker
to compare the current branch to the branching point from main branch
when determining which source code lines have been changed.
If omitted, the Darker GitHub Action will determine the commit range automatically.
"""
does not actually seem to work, (at least in our repository), but revision: "origin/master..." does. I'm not sure if that means we did something wrong, or if the documentation needs an update.
The error I see is:
ERROR:darker.git:fatal: Not a valid object name master
Error: Process completed with exit code 123.
A related question is, it also seems to only work with running the checkout action with fetch-depth: 0, which in our case is not ideal, because doing a full history checkout can take a long time for a large monorepo that has been around for a while.
I have tried changing the fetch-depth to a large number, (like 100, where there were definitely fewer than 100 commits in the PR), but that fails with a similar error message:
ERROR:darker.git:fatal: Not a valid object name origin/master
Error: Process completed with exit code 123.
So I wonder if anyone here has managed to run the github action on a smaller checkout.
Note: we are using a lint action to run Ruff, in addition to reformatting with black, in case that matters.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the documentation for the darker github action, this suggestion:
"""
The
revision: "master..."
(or"main..."
) option instructs Darkerto compare the current branch to the branching point from main branch
when determining which source code lines have been changed.
If omitted, the Darker GitHub Action will determine the commit range automatically.
"""
does not actually seem to work, (at least in our repository), but
revision: "origin/master..."
does. I'm not sure if that means we did something wrong, or if the documentation needs an update.The error I see is:
A related question is, it also seems to only work with running the checkout action with
fetch-depth: 0
, which in our case is not ideal, because doing a full history checkout can take a long time for a large monorepo that has been around for a while.I have tried changing the fetch-depth to a large number, (like 100, where there were definitely fewer than 100 commits in the PR), but that fails with a similar error message:
So I wonder if anyone here has managed to run the github action on a smaller checkout.
Note: we are using a lint action to run Ruff, in addition to reformatting with black, in case that matters.
Beta Was this translation helpful? Give feedback.
All reactions