azure-pr-manager 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +22 -37
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -54,7 +54,7 @@ function showBanner(subtitle) {
|
|
|
54
54
|
|
|
55
55
|
console.log(c(" ║") + EMPTY + c("║"));
|
|
56
56
|
console.log(c(" ║") + centerText(chalk.gray("Azure DevOps Pull Request Automation")) + c("║"));
|
|
57
|
-
console.log(c(" ║") + centerText(chalk.gray("v2.1.
|
|
57
|
+
console.log(c(" ║") + centerText(chalk.gray("v2.1.1 — Desenvolvido por ") + chalk.white("Higor Santos")) + c("║"));
|
|
58
58
|
console.log(c(" ║") + EMPTY + c("║"));
|
|
59
59
|
|
|
60
60
|
if (subtitle) {
|
|
@@ -71,7 +71,7 @@ const program = new Command();
|
|
|
71
71
|
program
|
|
72
72
|
.name("azure-pr")
|
|
73
73
|
.description("CLI para criar Pull Requests no Azure DevOps automaticamente")
|
|
74
|
-
.version("2.1.
|
|
74
|
+
.version("2.1.1")
|
|
75
75
|
.addHelpText("after", "\n Desenvolvido por Higor Santos");
|
|
76
76
|
|
|
77
77
|
// ==================== INIT ====================
|
|
@@ -843,47 +843,32 @@ program
|
|
|
843
843
|
}
|
|
844
844
|
|
|
845
845
|
// Confirmacao
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
);
|
|
853
|
-
console.log(
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
);
|
|
857
|
-
console.log(
|
|
858
|
-
chalk.cyan(" ║") + ` ${chalk.gray("Titulo:")} ${title}`
|
|
859
|
-
);
|
|
846
|
+
const BOX_W = 60;
|
|
847
|
+
const boxLine = "═".repeat(BOX_W);
|
|
848
|
+
const bx = (text) => chalk.cyan(" ║") + " " + text;
|
|
849
|
+
|
|
850
|
+
console.log(chalk.cyan("\n ╔" + boxLine + "╗"));
|
|
851
|
+
console.log(chalk.cyan(" ║") + chalk.white(" Resumo do PR") + " ".repeat(BOX_W - 14) + chalk.cyan("║"));
|
|
852
|
+
console.log(chalk.cyan(" ╠" + boxLine + "╣"));
|
|
853
|
+
console.log(bx(`${chalk.gray("Source:")} ${chalk.green(sourceBranch)}`));
|
|
854
|
+
console.log(bx(`${chalk.gray("Target:")} ${chalk.yellow(targetBranch)}`));
|
|
855
|
+
console.log(bx(`${chalk.gray("Titulo:")} ${title}`));
|
|
860
856
|
if (description) {
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
857
|
+
const descLines = description.split("\n").filter((l) => l.trim());
|
|
858
|
+
console.log(bx(`${chalk.gray("Descricao:")}`));
|
|
859
|
+
descLines.forEach((line) => {
|
|
860
|
+
console.log(bx(` ${chalk.gray(line)}`));
|
|
861
|
+
});
|
|
865
862
|
}
|
|
866
|
-
console.log(
|
|
867
|
-
|
|
868
|
-
` ${chalk.gray("Draft:")} ${isDraft ? "Sim" : "Nao"}`
|
|
869
|
-
);
|
|
870
|
-
console.log(
|
|
871
|
-
chalk.cyan(" ║") +
|
|
872
|
-
` ${chalk.gray("Auto-complete:")} ${autoComplete ? "Sim" : "Nao"}`
|
|
873
|
-
);
|
|
863
|
+
console.log(bx(`${chalk.gray("Draft:")} ${isDraft ? "Sim" : "Nao"}`));
|
|
864
|
+
console.log(bx(`${chalk.gray("Auto-complete:")} ${autoComplete ? "Sim" : "Nao"}`));
|
|
874
865
|
if (resolvedRequired.length > 0) {
|
|
875
|
-
console.log(
|
|
876
|
-
chalk.cyan(" ║") +
|
|
877
|
-
` ${chalk.gray("Required:")} ${resolvedRequired.map((r) => r.displayName).join(", ")}`
|
|
878
|
-
);
|
|
866
|
+
console.log(bx(`${chalk.gray("Required:")} ${resolvedRequired.map((r) => r.displayName).join(", ")}`));
|
|
879
867
|
}
|
|
880
868
|
if (resolvedOptional.length > 0) {
|
|
881
|
-
console.log(
|
|
882
|
-
chalk.cyan(" ║") +
|
|
883
|
-
` ${chalk.gray("Optional:")} ${resolvedOptional.map((r) => r.displayName).join(", ")}`
|
|
884
|
-
);
|
|
869
|
+
console.log(bx(`${chalk.gray("Optional:")} ${resolvedOptional.map((r) => r.displayName).join(", ")}`));
|
|
885
870
|
}
|
|
886
|
-
console.log(chalk.cyan("
|
|
871
|
+
console.log(chalk.cyan(" ╚" + boxLine + "╝\n"));
|
|
887
872
|
|
|
888
873
|
const { confirm } = await inquirer.prompt([
|
|
889
874
|
{
|