only: [merge-requests]
and i want to apply a git diff between the source and the target branches, to run pre-commit on it.
i tried something like
- export DIFFBRANCHES=$(git diff --name-only $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME $CI_MERGE_REQUEST_TARGET_BRANCH_NAME --)
- xargs pre-commit run --show-diff-on-failure --files ${DIFFBRANCHES}
but i have a `fatal: bad revision 'improvements/ci_diffing' [the $CI_MERGE_REQUEST_SOURCE_BRANCH_NAM]
any hint how to achieve that? this stuff driving me crazy
solved doing git remote update, git fetch and then checkout to the origin branches
Обсуждают сегодня