Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement push success notification for issue #39039 #47790

Merged
merged 1 commit into from
Jul 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,11 @@
"default": true,
"description": "%config.showInlineOpenFileAction%"
},
"git.showPushSuccessNotification": {
"type": "boolean",
"description": "%config.showPushSuccessNotification%",
"default": false
},
"git.inputValidation": {
"type": "string",
"enum": [
Expand Down
3 changes: 2 additions & 1 deletion extensions/git/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"config.decorations.enabled": "Controls if Git contributes colors and badges to the explorer and the open editors view.",
"config.promptToSaveFilesBeforeCommit": "Controls whether Git should check for unsaved files before committing.",
"config.showInlineOpenFileAction": "Controls whether to show an inline Open File action in the Git changes view.",
"config.showPushSuccessNotification": "Controls whether to show a notification when a push is successful.",
"config.inputValidation": "Controls when to show commit message input validation.",
"config.detectSubmodules": "Controls whether to automatically detect git submodules.",
"config.detectSubmodulesLimit": "Controls the limit of git submodules detected.",
Expand All @@ -77,4 +78,4 @@
"colors.ignored": "Color for ignored resources.",
"colors.conflict": "Color for resources with conflicts.",
"colors.submodule": "Color for submodule resources."
}
}
4 changes: 4 additions & 0 deletions extensions/git/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,10 @@ export class CommandCenter {

try {
await repository.push(repository.HEAD);
const gitConfig = workspace.getConfiguration('git');
if (gitConfig.get<boolean>('showPushSuccessNotification')) {
window.showInformationMessage(localize('push success', "Successfully pushed."));
}
} catch (err) {
if (err.gitErrorCode !== GitErrorCodes.NoUpstreamBranch) {
throw err;
Expand Down