File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 * the prepareCommitMsg module to a target branch.
66 */
77import * as vscode from "vscode" ;
8+ import { TextDocument } from "vscode" ;
89import { API } from "./api/git" ;
910import { makeAndFillCommitMsg } from "./autofill" ;
1011import { getGitExtension } from "./gitExtension" ;
@@ -73,7 +74,15 @@ export function activate(context: vscode.ExtensionContext) {
7374 ) ;
7475
7576 context . subscriptions . push ( disposable ) ;
77+ context . subscriptions . push (
78+ vscode . workspace . onDidSaveTextDocument ( ( e : TextDocument ) => {
79+ vscode . window . showInformationMessage (
80+ `Generating commit message because file was saved - ${ e . fileName } `
81+ ) ;
82+ _chooseRepoForAutofill ( e . uri ) ;
83+ } )
84+ ) ;
7685}
7786
7887// eslint-disable-next-line @typescript-eslint/no-empty-function
79- export function deactivate ( ) { }
88+ export function deactivate ( ) { }
You can’t perform that action at this time.
0 commit comments