[BUG] Add support for pull request close event with merge set to true
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
Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.
@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

@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!
... was this addressed in the v29.09 release?
Looks like it is still an issue 😢
@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.
@a123775 @flexwang2 This has been resolved in the latest release.
@a123775 @flexwang2 This has been resolved in the latest release.
Thanks a lot bro!
@jackton1 we have the same issue on making a squash. Version 29.0.4 works well

Here the workflow https://github.com/EbookFoundation/free-programming-books/actions/runs/3117939659/jobs/5056914818
@davorpa Good to hear, you might also want to upgrade to v31 which includes a number of improvements.