changed-files icon indicating copy to clipboard operation
changed-files copied to clipboard

[BUG] Changes since Last commit on the branch brings all files since the beggining of the branch

Open iamtheef opened this issue 2 months ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Does this issue exist in the latest version?

  • [X] I'm using the latest release

Describe the bug?

I am using the tool as documented but I still get all the files that were changed since the branch started

To Reproduce

  - name: Get changed files
    id: changed-files
    uses: tj-actions/changed-files@v44
    # To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
    with:
      since_last_remote_commit: "true"
  
  - name: List all changed files
    env:
      ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
    run: |
      for file in ${ALL_CHANGED_FILES}; do
        echo "$file was changed"
      done

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-22.04

Expected behavior?

Only the files since the last commit in the branch

Relevant log output

src/caf/Dockerfile.api was changed
src/caf/Dockerfile.cron was changed
src/hqm/Dockerfile.api was changed
src/hqm/Dockerfile.cron was changed
src/ins/Dockerfile.api was changed
src/ins/Dockerfile.cron was changed
tracetag.sh was changed
.DS_Store was changed
.github/workflows/main.yaml was changed # ONLY THIS WAS CHANGED SINCE LAST COMMIT IN THE BRANCH
.github/workflows/release.yaml was changed
manage.py was changed
src/.DS_Store was changed
src/shared/core/minio.py was changed
src/aco/Dockerfile.api was changed
src/aco/Dockerfile.cron was changed

Has all relevant logs been included?

  • [X] I've included all relevant logs

Anything else?

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

iamtheef avatar Apr 26 '24 14:04 iamtheef

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

tj-actions-bot avatar Apr 26 '24 14:04 tj-actions-bot

Hey, sure! Let me know when this is patched ;) Glad to use your code

iamtheef avatar Apr 26 '24 15:04 iamtheef

Hi, @iamtheef there are several missing details required to provide feedback or replicate this issue.

  1. Can you provide the entire log output with debugging enabled, which includes details of the commit hashes compared.
  2. List the relevant commits you have in the PR/Branch where the action was triggered.
  3. Can you also provide more details of the workflow file including the event and checkout action configuration.

jackton1 avatar Apr 26 '24 21:04 jackton1

Example

A short example of this is the following logs

Screenshot 2024-04-26 at 3 17 36 PM

Commits compared

9f8502e58178464eefa82a2374eafdb01e016029 (feat/reduce-the-default-fetch-depth) → 22e061a3a53470796bc50dbe1fa9fb6b9973dd27 (feat/reduce-the-default-fetch-depth)

Commits of the branch

Screenshot 2024-04-26 at 3 19 59 PM

jackton1 avatar Apr 26 '24 21:04 jackton1

Hi @iamtheef I haven't heard back from you, I'll be closing this issue for now pending your response.

jackton1 avatar Apr 29 '24 18:04 jackton1