Coding Agent doesn't cope well with pre-commit and pre-push hooks #167906
Replies: 2 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
It’s been a while and really important |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Copilot Feature Area
Copilot Coding Agent
Body
My repository contains pre-commit and pre-push hooks that run some basic checks. They're installed in my
copilot-setup-steps.yml. The hooks are:# pre-commit (quick checks) ruff check --quiet --no-fix ruff format --quiet --check# pre-push (slow checks) basedpyright pytest --quietI added them specifically because Copilot Coding Agent was submitting PRs that couldn't be merged due to basic linting errors. But when they result in an error, Copilot just gives up:
Caution
Copilot stopped work due to an error
Copilot encountered an unknown Git error. If the problem persists, please contact GitHub Support. To retry, leave a comment on this pull request asking Copilot to try again.
Here's an example session where this happens, and the line in the detailed logs.
For now I'll remove the hooks from Coding Agent's environment. But it would be nice to have a way to tell it that it should run certain commands and try to fix any errors before marking the PR as ready for review. In this instance, it could have just run
./go formatto fix the errors before committing again.Beta Was this translation helpful? Give feedback.
All reactions