mlarhrouch / azure-pipeline-gpt-pr-review

Azure DevOps extension adding tools to review Pull Requets using Azure Pipelines
MIT License
56 stars 52 forks source link

Unhandled Error when file is deleted #43

Open varun5001 opened 10 months ago

varun5001 commented 10 months ago

GPTPRReviewer task fails when file is deleted from Repo and a PR is submitted. Below is Run Log of the task

`Changed Files (excluding binary files) : test.py Start deleting existing comments added by the previous Job ... Existing comments deleted. Start reviewing test.py with openai ...

[error]Unhandled: fatal: ambiguous argument 'test.py': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions, like this: 'git [...] -- [...]'

[error]Error: fatal: ambiguous argument 'test.py': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions, like this: 'git [...] -- [...]'

at Object.action (/home/vsts/work/_tasks/GPTPRReviewer_54bfc437-996c-4844-9f68-cd33e7a56682/0.6.58/node_modules/simple-git/dist/cjs/index.js:1274:25)
at PluginStore.exec (/home/vsts/work/_tasks/GPTPRReviewer_54bfc437-996c-4844-9f68-cd33e7a56682/0.6.58/node_modules/simple-git/dist/cjs/index.js:1309:29)
at Promise (/home/vsts/work/_tasks/GPTPRReviewer_54bfc437-996c-4844-9f68-cd33e7a56682/0.6.58/node_modules/simple-git/dist/cjs/index.js:1676:43)
at new Promise (<anonymous>)
at GitExecutorChain.handleTaskData (/home/vsts/work/_tasks/GPTPRReviewer_54bfc437-996c-4844-9f68-cd33e7a56682/0.6.58/node_modules/simple-git/dist/cjs/index.js:1674:16)
at GitExecutorChain.<anonymous> (/home/vsts/work/_tasks/GPTPRReviewer_54bfc437-996c-4844-9f68-cd33e7a56682/0.6.58/node_modules/simple-git/dist/cjs/index.js:1658:44)
at Generator.next (<anonymous>)
at fulfilled (/home/vsts/work/_tasks/GPTPRReviewer_54bfc437-996c-4844-9f68-cd33e7a56682/0.6.58/node_modules/simple-git/dist/cjs/index.js:55:24)
at process._tickCallback (internal/process/next_tick.js:68:7)

`

Jura commented 10 months ago

Same here, review always failing when PR contains deleted files. Error stack is identical to the one above.