Skip to content

Commit 90facd9

Browse files
authored
Merge branch 'master' into sandy081/workbench/toggleAwareCommandActions
2 parents 3511b28 + da3a711 commit 90facd9

158 files changed

Lines changed: 3220 additions & 1125 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/copycat.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CopyCat
2+
on:
3+
issues:
4+
types: [opened]
5+
6+
jobs:
7+
main:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Actions
11+
uses: actions/checkout@v2
12+
with:
13+
repository: 'JacksonKearl/vscode-triage-github-actions'
14+
ref: master
15+
- name: Run CopyCat
16+
uses: ./copycat
17+
with:
18+
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
19+
owner: JacksonKearl
20+
repo: testissues

build/lib/i18n.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ let XLF = /** @class */ (() => {
114114
for (let file in this.files) {
115115
this.appendNewLine(`<file original="${file}" source-language="en" datatype="plaintext"><body>`, 2);
116116
for (let item of this.files[file]) {
117-
this.addStringItem(item);
117+
this.addStringItem(file, item);
118118
}
119119
this.appendNewLine('</body></file>', 2);
120120
}
@@ -154,9 +154,12 @@ let XLF = /** @class */ (() => {
154154
this.files[original].push({ id: realKey, message: message, comment: comment });
155155
}
156156
}
157-
addStringItem(item) {
158-
if (!item.id || !item.message) {
159-
throw new Error(`No item ID or value specified: ${JSON.stringify(item)}`);
157+
addStringItem(file, item) {
158+
if (!item.id || item.message === undefined || item.message === null) {
159+
throw new Error(`No item ID or value specified: ${JSON.stringify(item)}. File: ${file}`);
160+
}
161+
if (item.message.length === 0) {
162+
log(`Item with id ${item.id} in file ${file} has an empty message.`);
160163
}
161164
this.appendNewLine(`<trans-unit id="${item.id}">`, 4);
162165
this.appendNewLine(`<source xml:lang="en">${item.message}</source>`, 6);

build/lib/i18n.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class XLF {
201201
for (let file in this.files) {
202202
this.appendNewLine(`<file original="${file}" source-language="en" datatype="plaintext"><body>`, 2);
203203
for (let item of this.files[file]) {
204-
this.addStringItem(item);
204+
this.addStringItem(file, item);
205205
}
206206
this.appendNewLine('</body></file>', 2);
207207
}
@@ -243,9 +243,12 @@ export class XLF {
243243
}
244244
}
245245

246-
private addStringItem(item: Item): void {
247-
if (!item.id || !item.message) {
248-
throw new Error(`No item ID or value specified: ${JSON.stringify(item)}`);
246+
private addStringItem(file: string, item: Item): void {
247+
if (!item.id || item.message === undefined || item.message === null) {
248+
throw new Error(`No item ID or value specified: ${JSON.stringify(item)}. File: ${file}`);
249+
}
250+
if (item.message.length === 0) {
251+
log(`Item with id ${item.id} in file ${file} has an empty message.`);
249252
}
250253

251254
this.appendNewLine(`<trans-unit id="${item.id}">`, 4);

extensions/git/package.json

Lines changed: 18 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@
4040
"command": "git.init",
4141
"title": "%command.init%",
4242
"category": "Git",
43-
"icon": {
44-
"light": "resources/icons/light/git.svg",
45-
"dark": "resources/icons/dark/git.svg"
46-
}
43+
"icon": "$(add)"
4744
},
4845
{
4946
"command": "git.openRepository",
@@ -59,37 +56,25 @@
5956
"command": "git.refresh",
6057
"title": "%command.refresh%",
6158
"category": "Git",
62-
"icon": {
63-
"light": "resources/icons/light/refresh.svg",
64-
"dark": "resources/icons/dark/refresh.svg"
65-
}
59+
"icon": "$(refresh)"
6660
},
6761
{
6862
"command": "git.openChange",
6963
"title": "%command.openChange%",
7064
"category": "Git",
71-
"icon": {
72-
"light": "resources/icons/light/open-change.svg",
73-
"dark": "resources/icons/dark/open-change.svg"
74-
}
65+
"icon": "$(compare-changes)"
7566
},
7667
{
7768
"command": "git.openFile",
7869
"title": "%command.openFile%",
7970
"category": "Git",
80-
"icon": {
81-
"light": "resources/icons/light/open-file.svg",
82-
"dark": "resources/icons/dark/open-file.svg"
83-
}
71+
"icon": "$(go-to-file)"
8472
},
8573
{
8674
"command": "git.openFile2",
8775
"title": "%command.openFile%",
8876
"category": "Git",
89-
"icon": {
90-
"light": "resources/icons/light/open-file.svg",
91-
"dark": "resources/icons/dark/open-file.svg"
92-
}
77+
"icon": "$(go-to-file)"
9378
},
9479
{
9580
"command": "git.openHEADFile",
@@ -100,37 +85,25 @@
10085
"command": "git.stage",
10186
"title": "%command.stage%",
10287
"category": "Git",
103-
"icon": {
104-
"light": "resources/icons/light/stage.svg",
105-
"dark": "resources/icons/dark/stage.svg"
106-
}
88+
"icon": "$(add)"
10789
},
10890
{
10991
"command": "git.stageAll",
11092
"title": "%command.stageAll%",
11193
"category": "Git",
112-
"icon": {
113-
"light": "resources/icons/light/stage.svg",
114-
"dark": "resources/icons/dark/stage.svg"
115-
}
94+
"icon": "$(add)"
11695
},
11796
{
11897
"command": "git.stageAllTracked",
11998
"title": "%command.stageAllTracked%",
12099
"category": "Git",
121-
"icon": {
122-
"light": "resources/icons/light/stage.svg",
123-
"dark": "resources/icons/dark/stage.svg"
124-
}
100+
"icon": "$(add)"
125101
},
126102
{
127103
"command": "git.stageAllUntracked",
128104
"title": "%command.stageAllUntracked%",
129105
"category": "Git",
130-
"icon": {
131-
"light": "resources/icons/light/stage.svg",
132-
"dark": "resources/icons/dark/stage.svg"
133-
}
106+
"icon": "$(add)"
134107
},
135108
{
136109
"command": "git.stageSelectedRanges",
@@ -146,37 +119,25 @@
146119
"command": "git.stageChange",
147120
"title": "%command.stageChange%",
148121
"category": "Git",
149-
"icon": {
150-
"light": "resources/icons/light/stage.svg",
151-
"dark": "resources/icons/dark/stage.svg"
152-
}
122+
"icon": "$(add)"
153123
},
154124
{
155125
"command": "git.revertChange",
156126
"title": "%command.revertChange%",
157127
"category": "Git",
158-
"icon": {
159-
"light": "resources/icons/light/clean.svg",
160-
"dark": "resources/icons/dark/clean.svg"
161-
}
128+
"icon": "$(discard)"
162129
},
163130
{
164131
"command": "git.unstage",
165132
"title": "%command.unstage%",
166133
"category": "Git",
167-
"icon": {
168-
"light": "resources/icons/light/unstage.svg",
169-
"dark": "resources/icons/dark/unstage.svg"
170-
}
134+
"icon": "$(remove)"
171135
},
172136
{
173137
"command": "git.unstageAll",
174138
"title": "%command.unstageAll%",
175139
"category": "Git",
176-
"icon": {
177-
"light": "resources/icons/light/unstage.svg",
178-
"dark": "resources/icons/dark/unstage.svg"
179-
}
140+
"icon": "$(remove)"
180141
},
181142
{
182143
"command": "git.unstageSelectedRanges",
@@ -187,46 +148,31 @@
187148
"command": "git.clean",
188149
"title": "%command.clean%",
189150
"category": "Git",
190-
"icon": {
191-
"light": "resources/icons/light/clean.svg",
192-
"dark": "resources/icons/dark/clean.svg"
193-
}
151+
"icon": "$(discard)"
194152
},
195153
{
196154
"command": "git.cleanAll",
197155
"title": "%command.cleanAll%",
198156
"category": "Git",
199-
"icon": {
200-
"light": "resources/icons/light/clean.svg",
201-
"dark": "resources/icons/dark/clean.svg"
202-
}
157+
"icon": "$(discard)"
203158
},
204159
{
205160
"command": "git.cleanAllTracked",
206161
"title": "%command.cleanAllTracked%",
207162
"category": "Git",
208-
"icon": {
209-
"light": "resources/icons/light/clean.svg",
210-
"dark": "resources/icons/dark/clean.svg"
211-
}
163+
"icon": "$(discard)"
212164
},
213165
{
214166
"command": "git.cleanAllUntracked",
215167
"title": "%command.cleanAllUntracked%",
216168
"category": "Git",
217-
"icon": {
218-
"light": "resources/icons/light/clean.svg",
219-
"dark": "resources/icons/dark/clean.svg"
220-
}
169+
"icon": "$(discard)"
221170
},
222171
{
223172
"command": "git.commit",
224173
"title": "%command.commit%",
225174
"category": "Git",
226-
"icon": {
227-
"light": "resources/icons/light/check.svg",
228-
"dark": "resources/icons/dark/check.svg"
229-
}
175+
"icon": "$(check)"
230176
},
231177
{
232178
"command": "git.commitStaged",

extensions/git/resources/icons/dark/check.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

extensions/git/resources/icons/dark/clean.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

extensions/git/resources/icons/dark/git.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

extensions/git/resources/icons/dark/open-change.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

extensions/git/resources/icons/dark/open-file.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

extensions/git/resources/icons/dark/refresh.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)