Get all files changed by PR after squash-merging #1379
-
I am using a workflow that triggers after a PR is merged into on:
pull_request:
types:
# closed could be merged or closed without merging
# jobs must check if PR was merged
- closed
branches:
- main
jobs:
get-affected-files:
runs-on: ubuntu-22.04
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v36 I noticed that this includes additional files (that are not part of the PR / merge commit) if the PR wasn't up-to-date with Our repo has mandatory squash-merging in case it's relevant. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @dionhaefner, You'll have to upgrade to the latest major version. |
Beta Was this translation helpful? Give feedback.
-
I have a same requirement and going to implement something similar. I think you need to double check if the commit you're comparing is the correct pull request commit. For example before |
Beta Was this translation helpful? Give feedback.
Hi @dionhaefner, You'll have to upgrade to the latest major version.