Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements support for searching pyproject.toml files in parent directories, fixing issue #164 where the action didn't find pyproject.toml files located in parent directories of the specified source path.
Changes:
- Added a new
pyproject-finder.tsutility module that searches for pyproject.toml starting from a given directory and traversing upwards to the workspace root - Updated
ruff-action.tsto use the new finder instead of checking only the source directory - Added comprehensive unit tests and an integration test to verify the parent directory search functionality
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/pyproject-finder.ts | New utility module implementing upward directory search for pyproject.toml files |
| src/utils/pyproject-finder.test.ts | Unit tests for the pyproject finder (includes some misleading test descriptions) |
| src/ruff-action.ts | Updated to use the new finder and removed unused fs import |
| dist/ruff-action/index.js | Bundled distribution file with the new module |
| tests/fixtures/parent-config-project/ | New test fixture with parent/child directory structure |
| .github/workflows/test.yml | Added integration test verifying version detection from parent directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tory search tests Address review feedback from Copilot: - The previous tests used python-project which actually has a pyproject.toml, making the tests not properly verify parent directory search functionality - Now using parent-config-project/subproject which has no pyproject.toml, ensuring the tests actually verify searching upward to find parent's config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #164