-
I confused about how this works. I make multiple commits to branches after PRs are opened. I want to return all files apart of the PR every time. This seems to only show changes between specific commits, I want to get all files in the PR every time:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I tried with |
Beta Was this translation helpful? Give feedback.
-
Hi @red8888 I believe you'll need to use the pull_request event to always to get a list of all changed files not just the most recent ones. on:
pull_request:
branches:
- main
jobs:
changed_files:
runs-on: ubuntu-latest
name: Test changed-files
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
- 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 |
Beta Was this translation helpful? Give feedback.
Hi @red8888 I believe you'll need to use the pull_request event to always to get a list of all changed files not just the most recent ones.