-
Notifications
You must be signed in to change notification settings - Fork 158
Only include changed files in PR preview #4405
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
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 3de94d2.
…H/preview-changed-files
Eric-Arellano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This overall looks great
|
|
||
| def _copy_local_content(root_dir: Path, changed_files: set[str]) -> None: | ||
|
|
||
| def ignore_contents(dir: str, contents: list[str]) -> list[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Often I'm a fan of inlined functions, but here I think it makes the code more confusing than necessary. You aren't using anything from the outer closure, and the helper function is quite verbose. I recommend moving it to a standalone function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does actually use the changed_files variable from the outer closure. Is there something else I can do to make it clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. You could fix that though by adding a new changed_files arg to the function`. I'd still recommend splitting it out because both functions are now quite big
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Eric-Arellano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to use the new approach for changed files
This reverts commit 489d238. The function closure includes `changed_files`
This reverts commit 63a4381.
Closes #4366