Q29: I'm going to use `--changed-since` option in ...
# general
r
Q29: I'm going to use
--changed-since
option in GitHub Actions CI. suggestion) The doc says
./pants --changed-since=... lint
but this fails with missing target error and
./pants --changed-since=... lint ::
fails since the
--changed-since
flag and explicit target args are mutually exclusive. I could workaround it by using
./pants lint --changed-since=...
. I believe that the docs should be updated. question) I'm going to use
origin/$GITHUB_BASE_REF
as the argument of
--changed-since
. But it says
fatal: bad revision 'origin/main...HEAD'
in a PR. This may be due to the highly limited fetch-depth (default: 1). How could I fetch the commits that are exactly required for
--changed-since
?
h
it's simply
--changed-since=FOO lint
, w/o the
::
. Are you seeing elsewhere in the docs?
r
it did not work, so i did
lint --changed-since=FOO
.
about the question, i just added
git fetch --no-tags --depth=1 origin $GITHUB_BASE_REF
before executing
./pants lint ...
and it seems to work as expected
it would be helpful if the doc has an application example of
--changed-since
option in github actions workflows.
this is my case
h
the top of https://www.pantsbuild.org/docs/using-pants-in-ci links to an example github action
r
yes, i’ve read that page. Though integration with the changed-since option was not demonstrated there.