How to get all files changed compared to another branch? #1327
-
For example, our main branch is Here are my checkout and changed-files steps:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
@bearhuglily Can you also include the GitHub event that triggers the workflow? |
Beta Was this translation helpful? Give feedback.
-
Trigger:
|
Beta Was this translation helpful? Give feedback.
-
Okay, It appears that the name: CI
on:
pull_request:
branches:
- master |
Beta Was this translation helpful? Give feedback.
-
If I added the |
Beta Was this translation helpful? Give feedback.
The push event, in this case, means the workflow runs every time a new commit is pushed and in such a case the concept of comparing the current commit is limited to either the previous commit or the last remote commit.
For pull_request on the other hand, it's triggered by other activities to the PR branch including pushing a new commit to the same branch. But in this case, the diff compares the current commit to the last commit on the target branch which in your case is
master
.So no keeping push wouldn't cause any problems it solves a different problem i.e. what changed since I last pushed to a branch.
My recommendation would be to remove the push event since that's not the desired outco…