How to detect user acceptance, rejection, or modification of code changes using VSCode's Git extension? #2573
Unanswered
animeshj9
asked this question in
Extension Development QnA
Replies: 1 comment
-
Hi @animeshj9 , I didn’t play with the Git API that much, and in the few interactions I had, I don’t remember such info being available. If you didn’t find a solution yourself yet, I would suggest you to open a feature request in the VS Code repo (https://github.com/microsoft/vscode/issues) so the VS Code team could take a look, and improve the Git API, if approved. On the other hand, if you did find a way to detect such info, please share, so other users interested in this topic would learn in the future. Hope this helps. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have developed an extension that updates code on a user's machine. Now, we want to track how much of the code changes were accepted, rejected, or modified by the user. Our goal is to use Git APIs or any hooks available in VSCode's Git extension for this purpose.
Specifically, we want to:
Detect when a user accepts a code block or file change.
Detect when a user rejects a code block or file change.
Track modifications made by the user to the suggested code changes.
We want to know if there's any way to hook into the Git extension's events or APIs in VSCode that can help us achieve this level of tracking.
Questions:
Is there an API or event hook in the VSCode Git extension that can trigger actions when a user accepts, rejects, or modifies a code change?
If no such direct hook exists, what would be the best way to monitor user interactions with code changes using Git APIs in VSCode?
Any guidance, examples, or references would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions