Simek / yarn-lock-changes

Creates a comment inside Pull Request with the human-readable summary of changes to the Yarn lock file. Works with every Yarn version (classic and berry).
https://github.com/marketplace/actions/yarn-lock-changes
MIT License
132 stars 20 forks source link

`yarn-lock-changes` gets confused when a PR is on an older commit than default branch #33

Open tido64 opened 3 years ago

tido64 commented 3 years ago

When the default branch has a yarn.lock with more recent packages than the branch that a PR is based on, yarn-lock-changes thinks that the PR is downgrading said packages even though it doesn't actually change yarn.lock. Example:

See https://github.com/microsoft/react-native-test-app/pull/426.

Simek commented 3 years ago

@tido64 Thank you for the report! This is something weird, I'm not even sure what have triggered the lock check which results in base yarn.lock related comment in PR where only examples/yarn.lock has been changed. Maybe auto-merge event is related to this behaviour somehow, I'm not familiar with this operation, but will look on the details later.

As a temporary solution I would recommend to setup dorny/paths-filter@v2 action which allows to run certain step in the workflow only when given file has been changed. Hope that fix the issue for you.