diff --git a/.changelog/2707.trivial.md b/.changelog/2707.trivial.md new file mode 100644 index 00000000000..241c085997f --- /dev/null +++ b/.changelog/2707.trivial.md @@ -0,0 +1 @@ +github: Keep git history intact in Change Log fragment check diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 9c751ccb3f1..57902c3ef7e 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -47,7 +47,7 @@ jobs: # Fetch the pull request' base branch so towncrier will be able to # compare the current branch with the base branch. # Source: https://github.com/actions/checkout/#fetch-all-branches. - git fetch --no-tags --prune --depth=1 origin +refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH} + git fetch --no-tags origin +refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH} towncrier check --compare-with origin/${BASE_BRANCH} env: BASE_BRANCH: ${{ github.base_ref }}