Set 'changed_only' to 'no' if commits cannot be found in diff-only action (#16)
Fixes #12 https://github.com/apache/pulsar/issues/9526
The current solution causes the build to skip tests in Pulsar builds when the pull request commits cannot be found. It's better that diff-only script sets 'changed_only' to 'no' when it's not able to determine the correct result.
The commit for a PR won't be found when shallow clones are used and there are more commits in the PR than the depth of the shallow clone. The Pulsar GitHub Action workflows use shallow clone with the depth of 25 commits. This PR will support such PRs by defaulting to `changed_only` to `no` when the commit cannot be found.
This PR also fixes support for non-PR events such as `push` event. `changed_only` is set to `no` when the triggering event isn't a `pull_request` event.
1 file changed