Skip to content

Commit ca2c712

Browse files
committed
feat: support for the file git blame
1 parent b7a8f69 commit ca2c712

15 files changed

Lines changed: 497 additions & 13 deletions

File tree

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

extensions/github1s/package.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
5555
]
5656
},
5757
"commands": [
58+
{
59+
"command": "github1s.dev-test",
60+
"title": "GitHub1s Dev Test",
61+
"category": "GitHub1s"
62+
},
5863
{
5964
"command": "github1s.update-token",
6065
"title": "Update GitHub OAuth Token",
@@ -167,6 +172,32 @@
167172
"category": "GitHub1s",
168173
"icon": "$(arrow-right)",
169174
"enablement": "resource =~ /^[^?]*\\?[^#]*(%26|\\b)hasNextRevision(=|%3D|%3d)true/"
175+
},
176+
{
177+
"command": "github1s.toggle-editor-gutter-blame",
178+
"title": "Toggle File Blame",
179+
"category": "GitHub1s",
180+
"enablement": "!isInDiffEditor && resourceScheme =~ /^github1s$/"
181+
},
182+
{
183+
"command": "github1s.open-editor-gutter-blame",
184+
"title": "Toggle File Blame",
185+
"category": "GitHub1s",
186+
"icon": {
187+
"dark": "assets/icons/dark/open-blame.svg",
188+
"light": "assets/icons/light/open-blame.svg"
189+
},
190+
"enablement": "!isInDiffEditor && resourceScheme =~ /^github1s$/"
191+
},
192+
{
193+
"command": "github1s.close-editor-gutter-blame",
194+
"title": "Toggle File Blame",
195+
"category": "GitHub1s",
196+
"icon": {
197+
"dark": "assets/icons/dark/close-blame.svg",
198+
"light": "assets/icons/light/close-blame.svg"
199+
},
200+
"enablement": "!isInDiffEditor && resourceScheme =~ /^github1s$/"
170201
}
171202
],
172203
"colors": [
@@ -214,6 +245,24 @@
214245
"dark": "#1890ff",
215246
"highContrast": "#1890ff"
216247
}
248+
},
249+
{
250+
"id": "github1s.colors.gutterBlameBackground",
251+
"description": "gutter blame background color",
252+
"defaults": {
253+
"light": "#00000013",
254+
"dark": "#ffffff13",
255+
"highContrast": "#ffffff13"
256+
}
257+
},
258+
{
259+
"id": "github1s.colors.highlightGutterBlameBackground",
260+
"description": "highlight gutter blame background color",
261+
"defaults": {
262+
"light": "#00bcf233",
263+
"dark": "#00bce233",
264+
"highContrast": "#00bce233"
265+
}
217266
}
218267
],
219268
"menus": {
@@ -261,6 +310,14 @@
261310
{
262311
"command": "github1s.editor-view-open-next-revision",
263312
"when": "false"
313+
},
314+
{
315+
"command": "github1s.open-editor-gutter-blame",
316+
"when": "false"
317+
},
318+
{
319+
"command": "github1s.close-editor-gutter-blame",
320+
"when": "false"
264321
}
265322
],
266323
"view/title": [
@@ -323,6 +380,16 @@
323380
"when": "isInDiffEditor",
324381
"group": "navigation@3"
325382
},
383+
{
384+
"command": "github1s.open-editor-gutter-blame",
385+
"when": "!isInDiffEditor && resourceScheme =~ /^github1s$/ && !github1s.context.gutterBlameOpening",
386+
"group": "navigation@4"
387+
},
388+
{
389+
"command": "github1s.close-editor-gutter-blame",
390+
"when": "!isInDiffEditor && resourceScheme =~ /^github1s$/ && github1s.context.gutterBlameOpening",
391+
"group": "navigation@4"
392+
},
326393
{
327394
"command": "github1s.editor-view-open-prev-revision",
328395
"when": "resourceScheme =~ /^github1s/",

0 commit comments

Comments
 (0)