Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix change detection in PR when pullRequest.changed_files is incorrect #83

Merged
merged 1 commit into from Apr 11, 2021

Conversation

dorny
Copy link
Owner

@dorny dorny commented Apr 11, 2021

This PR modifies change detection when workflow is triggered by pull request.
In issue #81 it was reported that event data contained github.context.payload.pull_request.changed_files field set to 0 while actual pull request contained lot of changed files.

I've no idea why changed_files was set to 0, but if this filed is not reliable it shouldn't be used.
This PR changed implementation so now it fetches pages with changed files from GitHub API until response is empty array.

Closes #81

@dorny dorny changed the base branch from master to v2.10 April 11, 2021 19:22
@dorny dorny merged commit f093f35 into v2.10 Apr 11, 2021
@dorny dorny deleted the issue-81-gh-api-reports-no-changes branch April 11, 2021 19:23
@dorny dorny mentioned this pull request Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Github API reports 0 files changed on merge to main
1 participant