Building commit file path from repo root instead of execution dir#2456
Building commit file path from repo root instead of execution dir#2456Maxim-Durand wants to merge 3 commits intointuit:mainfrom
Conversation
|
@hipstersmoothie Can you restart the CI ? |
|
The CI failures seem unrelated to my code changes but not sure. @hipstersmoothie Should I investigate more or is this a known issue ? |
|
@hipstersmoothie I'm really sorry for the spam but I'm also really eager to see this bug fix released so I'm able to use auto with https://github.com/restfulhead/npm-auto-plugins/tree/main/packages/filter-by-workspace-path Considering the very small change involved in this PR and the fact CI pipelines seem broken, would you consider accepting the risk of merging without a green CI to release this bug fix sooner rather than later ? On a different note, what is the process to add/reference a new plugin ? Does it have to be hosted in the plugins folder or can I just make a PR to change the readme and reference https://github.com/restfulhead/npm-auto-plugins/tree/main/packages/filter-by-workspace-path ? |
|
@Maxim-Durand maybe it's the node version in the actions that's causing the tests to fail? we need those passing before a merge |
@hipstersmoothie Sorry for the long wait before an answer, I updated my fork with the latest code and tried running the tests locally but it fails on what feels unrelated errors to my changes: With these error logs Are there specific instruction to setup the testing suites ? Otherwise it looks like it's made to run on the CI only and I don't have access to it :( |
What Changed
Modified
packages/core/src/git.tsso thatgetGitLogreturns a list of commit object with the modified files path resolved from the root of the git repository instead of the execution directory.Why
Commits objects were built with
auto/packages/core/src/git.ts
Line 388 in 335fadb
But the documentation of path.resolve states:
Since it was only passing the file path returned by git log (which is a relative path) there was no absolute path generated and it would hence append the current directory (i.e the directory from where
autois run from) as a prefix to what git log returned. Meaning this would produce the correct absolute path only ifautois run from the root of the repository.Todo:
Change Type
Indicate the type of change your pull request is:
documentationpatchminormajor