https://pantsbuild.org/ logo
#general
Title
# general
r

rhythmic-morning-87313

05/05/2022, 4:50 PM
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

hundreds-father-404

05/05/2022, 4:50 PM
it's simply
--changed-since=FOO lint
, w/o the
::
. Are you seeing elsewhere in the docs?
r

rhythmic-morning-87313

05/05/2022, 4:51 PM
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

hundreds-father-404

05/05/2022, 6:23 PM
the top of https://www.pantsbuild.org/docs/using-pants-in-ci links to an example github action
r

rhythmic-morning-87313

05/06/2022, 2:06 AM
yes, i’ve read that page. Though integration with the changed-since option was not demonstrated there.
10 Views