Skip to content

Conversation

@gregory-entro
Copy link
Contributor

@gregory-entro gregory-entro commented Sep 15, 2025

Using docker action with 2 inputs. It will scan all commits in repo
so it should be used with fetch-depth in actions/checkout@v4.

Example:

    steps:
      - name: 'Get PR commits'
        run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"

      - name: 'Checkout PR branch and all PR commits'
        uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.ref }}
          fetch-depth: ${{ env.PR_FETCH_DEPTH }}

Using docker action with 2 inputs. It will scan all commits in repo
so it should be used with `fetch-depth` in `actions/checkout@v4`.

Example:
```
    steps:
      - name: 'Get PR commits'
        run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"

      - name: 'Checkout PR branch and all PR commits'
        uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.ref }}
          fetch-depth: ${{ env.PR_FETCH_DEPTH }}
```
@gregory-entro gregory-entro merged commit 68a849f into main Sep 15, 2025
3 checks passed
@gregory-entro gregory-entro deleted the added-action branch September 16, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants