-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
DevOpsbugSomething isn't workingSomething isn't workingexampleexample-related issuer or pull requestexample-related issuer or pull request
Description
🐛 Describe the bug
When we run workflows with GitHub actions, we often need to check what files are changed by the current PR. This will help us to decide the following actions to take. However, the changed file detection is working abnormally. One case which leads to errors is:
- you checkout from the main branch, let's call it branch A
- you push a commit to branch A
- some PRs are merged to the upstream main branch
- you put up a PR from your branch A to upstream main branch
- the list of changed files will not only include those changed on your branch A, but also those changed by other people's PRs
This root cause is the incorrect commit comparison as shown below.
What we really want is to find the files changed since the base commit instead of the remote latest commit.
Environment
No response
Metadata
Metadata
Assignees
Labels
DevOpsbugSomething isn't workingSomething isn't workingexampleexample-related issuer or pull requestexample-related issuer or pull request
