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

[BUG] Add support for pull request close event with merge set to true

Open flexwang2 opened this issue 3 years ago • 2 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 want to achieve that - when I create a pull request from a non-master branch and then merge it into master and then print all the files changed.

To Reproduce

I used below config

name: CI

on:
  pull_request:
    types:
      - closed
    paths:
      - "serving/data/**"

jobs:
  build:
    runs-on: ubuntu-latest  # windows-latest | macos-latest
    name: Test changed-files
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0   # OR "2" -> To retrieve the preceding commit.
      
      # Example 2
      - name: Get changed files in the docs folder
        id: changed-files-specific
        uses: tj-actions/changed-files@v29
        with:
          files: |
            serving/cdpush/data/**

      - name: Run step if any file(s) in the docs folder change
        if: steps.changed-files-specific.outputs.any_changed == 'true'
        run: |
          echo "One or more files in the docs folder has changed."
          echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"

What OS are you seeing the problem on?

all, macos-latest or macos-10.15

Expected behavior?

Echo all the files changed

Relevant log output

Verifying git version...
  Valid git version found: (2.37.3)
  remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
  Error: Similar commit hashes detected: previous sha: 63cd1ed2db57eb1d08505186c190d19f11454014 is equivalent to the current sha: 63cd1ed2db57eb1d08505186c190d19f11454014
  Error: You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage
  Error: Process completed with exit code 1.

Anything else?

No response

Code of Conduct

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

flexwang2 avatar Sep 21 '22 00:09 flexwang2

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

github-actions[bot] avatar Sep 21 '22 00:09 github-actions[bot]

@flexwang2 Can you also include a copy of the full log output when you rerun the failed job with debug enabled would be super helpful to provide feedback

Screen Shot 2022-09-20 at 11 30 41 PM

jackton1 avatar Sep 21 '22 05:09 jackton1

@jackton1 - love the work you've done with this action!

I've been encountering the same issue... was this addressed in the v29.09 release?

Thanks!

a123775 avatar Sep 22 '22 16:09 a123775

... was this addressed in the v29.09 release?

Looks like it is still an issue 😢

Screen Shot 2022-09-22 at 1 17 45 PM

a123775 avatar Sep 22 '22 20:09 a123775

@a123775 I planned to debug the issue this weekend and would be rolling out a fix as soon as possible. Thanks for the support much appreciated and sorry for the delay.

jackton1 avatar Sep 23 '22 07:09 jackton1

@a123775 @flexwang2 This has been resolved in the latest release.

jackton1 avatar Sep 24 '22 06:09 jackton1

@a123775 @flexwang2 This has been resolved in the latest release.

Thanks a lot bro!

flexwang2 avatar Sep 24 '22 07:09 flexwang2

@jackton1 we have the same issue on making a squash. Version 29.0.4 works well

image

Here the workflow https://github.com/EbookFoundation/free-programming-books/actions/runs/3117939659/jobs/5056914818

davorpa avatar Sep 24 '22 12:09 davorpa

@davorpa Good to hear, you might also want to upgrade to v31 which includes a number of improvements.

jackton1 avatar Sep 25 '22 20:09 jackton1