Skip to content
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
1 change: 0 additions & 1 deletion Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6612,7 +6612,6 @@
"gulp-typescript": "^5.0.1",
"minimist": "^1.2.8",
"mocha": "^10.4.0",
"parse-git-config": "^3.0.0",
"parse5": "^7.1.2",
"parse5-traverse": "^1.0.3",
"proxyquire": "^2.1.3",
Expand Down
19 changes: 11 additions & 8 deletions Extension/translations_auto_pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const fs = require("fs-extra");
const cp = require("child_process");
const path = require('path');
const parseGitConfig = require('parse-git-config');

const branchName = 'localization';
const mergeTo = 'main';
Expand Down Expand Up @@ -105,8 +104,8 @@ cp.execSync('git fetch');

// Remove old localization branch, if any
if (hasBranch("localization")) {
console.log(`Remove old localization branch, if any (git branch -D localization)`);
cp.execSync('git branch -D localization');
console.log(`Remove old localization branch, if any (git branch -D localization)`);
cp.execSync('git branch -D localization');
}

// Check out local branch
Expand All @@ -128,13 +127,17 @@ if (!hasAnyChanges()) {
// Save existing user name and email, in case already set.
var existingUserName;
var existingUserEmail;
var gitConfigPath = path.resolve(process.cwd(), '../.git/config');
var config = parseGitConfig.sync({ path: gitConfigPath });

if (typeof config === 'object' && config.hasOwnProperty('user')) {
existingUserName = config.user.name;
existingUserEmail = config.user.email;
try {
existingUserName = cp.execSync('git config --local user.name', { encoding: 'utf8', cwd: process.cwd() }).trim() || undefined
} catch {
}

try {
existingUserEmail = cp.execSync('git config --local user.email', { encoding: 'utf8', cwd: process.cwd() }).trim() || undefined
} catch {
}

if (existingUserName === undefined) {
console.log(`Existing user name: undefined`);
} else {
Expand Down
15 changes: 1 addition & 14 deletions Extension/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2430,11 +2430,6 @@ get-symbol-description@^1.1.0:
es-errors "^1.3.0"
get-intrinsic "^1.2.6"

git-config-path@^2.0.0:
version "2.0.0"
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/git-config-path/-/git-config-path-2.0.0.tgz#62633d61af63af4405a5024efd325762f58a181b"
integrity sha1-YmM9Ya9jr0QFpQJO/TJXYvWKGBs=

glob-parent@^3.1.0, glob-parent@^5.1.2, glob-parent@~5.1.2:
version "5.1.2"
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
Expand Down Expand Up @@ -2798,7 +2793,7 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=

ini@^1.3.4, ini@^1.3.5:
ini@^1.3.4:
version "1.3.8"
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
integrity sha1-op2kJbSIBvNHZ6Tvzjlyaa8oQyw=
Expand Down Expand Up @@ -3773,14 +3768,6 @@ parse-filepath@^1.0.2:
map-cache "^0.2.0"
path-root "^0.1.1"

parse-git-config@^3.0.0:
version "3.0.0"
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/parse-git-config/-/parse-git-config-3.0.0.tgz#4a2de08c7b74a2555efa5ae94d40cd44302a6132"
integrity sha1-Si3gjHt0olVe+lrpTUDNRDAqYTI=
dependencies:
git-config-path "^2.0.0"
ini "^1.3.5"

parse-imports@^2.1.1:
version "2.2.1"
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/parse-imports/-/parse-imports-2.2.1.tgz#0a6e8b5316beb5c9905f50eb2bbb8c64a4805642"
Expand Down