@aaronshaf/ger 1.2.4 → 1.2.6

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/README.md CHANGED
@@ -4,6 +4,16 @@
4
4
  npm i -g @aaronshaf/ger
5
5
  ```
6
6
 
7
+ ## Assumption: gerrit in known_hosts
8
+
9
+ ```
10
+ # ~/.ssh/known_hosts
11
+ Host gerrit
12
+ HostName gerrit.[your domain].com
13
+ User [your username]
14
+ Port 29418
15
+ ```
16
+
7
17
  ## Usage
8
18
 
9
19
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aaronshaf/ger",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Gerrit CLI",
5
5
  "main": "src/ger.ts",
6
6
  "bin": {
@@ -116,10 +116,14 @@ function output(
116
116
 
117
117
  const approvalText = approvals.join(isVerbose ? "\n" : ", ");
118
118
 
119
+ const topicText = gerritData.topic
120
+ ? ` ${grey(`(${gerritData.topic})`)}`
121
+ : "";
122
+
119
123
  if (isVerbose) {
120
124
  table.push([
121
- `${bold(localBranch)}\n${localBranchDataMap[localBranch].shortHash}`,
122
- labels.join(" "),
125
+ `${bold(localBranch)}${topicText}\n${localBranchDataMap[localBranch].shortHash}`,
126
+ `${labels.join(" ")}`,
123
127
  `${subject}\n${yellow(gerritData.url.replace("https://", ""))}`,
124
128
  approvalText,
125
129
  ]);
package/src/types.d.ts CHANGED
@@ -24,6 +24,7 @@ export type GerritData = {
24
24
  id: string;
25
25
  status: 'MERGED' | 'ABANDONED';
26
26
  subject: string;
27
+ topic?: string;
27
28
  url: string;
28
29
  wip: boolean;
29
30
  number: number
package/src/utils.ts CHANGED
@@ -12,9 +12,9 @@ export function bold(text: string) {
12
12
  return `\x1b[1m${text}\x1b[0m`;
13
13
  }
14
14
 
15
- // grey background
15
+ // grey with transparent background
16
16
  export function grey(text: string) {
17
- return `\x1b[47m\x1b[30m${text}\x1b[0m`;
17
+ return `\x1b[37m\x1b[40m${text}\x1b[0m`;
18
18
  }
19
19
 
20
20
  // brown with transparent background