Skip to content

Commit d30032a

Browse files
committed
Support VS Code authentication APIAlso move the commands into a github-action. namespace.
1 parent 583dd80 commit d30032a

File tree

14 files changed

+838
-907
lines changed

14 files changed

+838
-907
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to the "vscode-github-actions" extension will be documented in this file.
44

5+
## [v0.7.0]
6+
- Support the VS Code authentication API with the VS Code July release (1.48). This replaces the previous, manual PAT-based authentication flow.
7+
8+
Note: Organization features like displaying Organization-level Secrets require the `admin:org` scope. Since not everyone might want to give this scope to the VS Code token, by default this scope is not requested. There is a new setting to request the scope.
9+
10+
- Moved all commands into a `github-actions.` namespace and "GitHub Actions" category in the command palette
11+
512
## [v0.6.0]
613
- Update success icon
714
- Support org secrets

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Simple, **unofficial** extension to interact with GitHub Actions from within VS
88

99
1. Install extension
1010
2. Open a repository with a `github.com` origin
11-
3. When prompted, enter a PAT with `repo` scope to authenticate against the API
11+
3. When prompted, allow `GitHub Actions` to access your `github` account
1212

1313
## Features
1414

package-lock.json

Lines changed: 351 additions & 520 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 69 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77
"url": "https://github.com/cschleiden/vscode-github-actions"
88
},
99
"description": "See GitHub Actions workflows and runs for github.com hosted repositories in VS Code",
10-
"version": "0.6.0",
10+
"version": "0.7.0",
1111
"engines": {
12-
"vscode": "^1.44.0"
12+
"vscode": "^1.48.0"
1313
},
1414
"categories": [
1515
"Other"
1616
],
1717
"activationEvents": [
18-
"onCommand:auth.login",
1918
"onView:workflows",
2019
"onView:settings",
2120
"workspaceContains:**/.github/workflows/**"
2221
],
2322
"main": "./dist/extension",
2423
"extensionDependencies": [
25-
"vscode.git"
24+
"vscode.git",
25+
"vscode.github-authentication"
2626
],
2727
"contributes": {
2828
"configuration": {
@@ -44,35 +44,46 @@
4444
"description": "Time to wait between calls to update pinned workflows in seconds",
4545
"default": 30,
4646
"scope": "window"
47+
},
48+
"github-actions.org-features": {
49+
"type": "boolean",
50+
"description": "Whether org features should be enabled. Requires the `admin:org` scope",
51+
"default": false,
52+
"scope": "machine"
4753
}
4854
}
4955
},
5056
"commands": [
5157
{
52-
"command": "auth.login",
58+
"command": "github-actions.auth.org-login",
59+
"category": "GitHub Actions",
5360
"title": "Login",
54-
"category": "GitHub Actions"
61+
"when": "false"
5562
},
5663
{
57-
"command": "explorer.refresh",
64+
"command": "github-actions.explorer.refresh",
65+
"category": "GitHub Actions",
5866
"title": "Refresh",
5967
"icon": {
6068
"dark": "resources/icons/dark/refresh.svg",
6169
"light": "resources/icons/light/refresh.svg"
6270
}
6371
},
6472
{
65-
"command": "explorer.openRun",
73+
"command": "github-actions.explorer.openRun",
74+
"category": "GitHub Actions",
6675
"title": "Open workflow run",
6776
"when": "viewItem =~ /workflow/"
6877
},
6978
{
70-
"command": "explorer.openWorkflowFile",
79+
"command": "github-actions.explorer.openWorkflowFile",
80+
"category": "GitHub Actions",
7181
"title": "Open workflow",
7282
"when": "viewItem =~ /workflow/"
7383
},
7484
{
75-
"command": "explorer.triggerRun",
85+
"command": "github-actions.explorer.triggerRun",
86+
"category": "GitHub Actions",
7687
"title": "Trigger workflow",
7788
"when": "viewItem =~ /workflow/ && viewItem =~ /rdispatch/",
7889
"icon": {
@@ -81,12 +92,14 @@
8192
}
8293
},
8394
{
84-
"command": "workflow.run.open",
95+
"command": "github-actions.workflow.run.open",
96+
"category": "GitHub Actions",
8597
"title": "Open workflow run",
8698
"when": "viewItem =~ /run/"
8799
},
88100
{
89-
"command": "workflow.logs",
101+
"command": "github-actions.workflow.logs",
102+
"category": "GitHub Actions",
90103
"title": "View logs",
91104
"when": "viewItem =~ /job/ || viewItem =~ /step/",
92105
"icon": {
@@ -95,42 +108,49 @@
95108
}
96109
},
97110
{
98-
"command": "workflow.run.rerun",
111+
"command": "github-actions.workflow.run.rerun",
112+
"category": "GitHub Actions",
99113
"title": "Rerun workflow run",
100114
"when": "viewItem =~ /run/ && viewItem =~ /rerunnable/"
101115
},
102116
{
103-
"command": "workflow.run.cancel",
117+
"command": "github-actions.workflow.run.cancel",
118+
"category": "GitHub Actions",
104119
"title": "Cancel workflow run",
105120
"when": "viewItem =~ /run/ && viewItem =~ /cancelable/"
106121
},
107122
{
108-
"command": "settings.secrets.manage",
123+
"command": "github-actions.settings.secrets.manage",
124+
"category": "GitHub Actions",
109125
"title": "Add new secret",
110126
"icon": "$(globe)"
111127
},
112128
{
113-
"command": "settings.secret.add",
129+
"command": "github-actions.settings.secret.add",
130+
"category": "GitHub Actions",
114131
"title": "Add new secret",
115132
"icon": {
116133
"dark": "resources/icons/dark/add.svg",
117134
"light": "resources/icons/light/add.svg"
118135
}
119136
},
120137
{
121-
"command": "settings.secret.copy",
138+
"command": "github-actions.settings.secret.copy",
139+
"category": "GitHub Actions",
122140
"title": "Copy secret name"
123141
},
124142
{
125-
"command": "settings.secret.update",
143+
"command": "github-actions.settings.secret.update",
144+
"category": "GitHub Actions",
126145
"title": "Update secret",
127146
"icon": {
128147
"dark": "resources/icons/dark/edit.svg",
129148
"light": "resources/icons/light/edit.svg"
130149
}
131150
},
132151
{
133-
"command": "settings.secret.delete",
152+
"command": "github-actions.settings.secret.delete",
153+
"category": "GitHub Actions",
134154
"title": "Delete secret",
135155
"icon": {
136156
"dark": "resources/icons/dark/remove.svg",
@@ -139,21 +159,21 @@
139159
}
140160
],
141161
"views": {
142-
"actions": [
162+
"github-actions": [
143163
{
144-
"id": "workflows",
164+
"id": "github-actions.workflows",
145165
"name": "Workflows"
146166
},
147167
{
148-
"id": "settings",
168+
"id": "github-actions.settings",
149169
"name": "Settings"
150170
}
151171
]
152172
},
153173
"viewsContainers": {
154174
"activitybar": [
155175
{
156-
"id": "actions",
176+
"id": "github-actions",
157177
"title": "GitHub Actions",
158178
"icon": "resources/icons/light/explorer.svg"
159179
}
@@ -162,110 +182,110 @@
162182
"menus": {
163183
"view/title": [
164184
{
165-
"command": "explorer.refresh",
185+
"command": "github-actions.explorer.refresh",
166186
"group": "navigation",
167-
"when": "view == workflows || view == settings"
187+
"when": "view == github-actions.workflows || view == github-actions.settings"
168188
}
169189
],
170190
"editor/title": [
171191
{
172-
"command": "explorer.triggerRun",
192+
"command": "github-actions.explorer.triggerRun",
173193
"when": "githubActions:activeFile =~ /rdispatch/ && resourceExtname =~ /\\.ya?ml/",
174194
"group": "navigation"
175195
}
176196
],
177197
"view/item/context": [
178198
{
179-
"command": "explorer.openWorkflowFile",
199+
"command": "github-actions.explorer.openWorkflowFile",
180200
"when": "viewItem =~ /workflow/"
181201
},
182202
{
183-
"command": "explorer.triggerRun",
203+
"command": "github-actions.explorer.triggerRun",
184204
"when": "viewItem =~ /rdispatch/"
185205
},
186206
{
187-
"command": "workflow.run.open",
207+
"command": "github-actions.workflow.run.open",
188208
"when": "viewItem =~ /run/"
189209
},
190210
{
191-
"command": "workflow.logs",
211+
"command": "github-actions.workflow.logs",
192212
"group": "inline",
193213
"when": "viewItem =~ /job/ && viewItem =~ /completed/"
194214
},
195215
{
196-
"command": "workflow.run.cancel",
216+
"command": "github-actions.workflow.run.cancel",
197217
"when": "viewItem =~ /run/ && viewItem =~ /cancelable/"
198218
},
199219
{
200-
"command": "workflow.run.rerun",
220+
"command": "github-actions.workflow.run.rerun",
201221
"when": "viewItem =~ /run/ && viewItem =~ /rerunnable/"
202222
},
203223
{
204-
"command": "settings.secret.add",
224+
"command": "github-actions.settings.secret.add",
205225
"group": "inline",
206226
"when": "viewItem == 'secrets'"
207227
},
208228
{
209-
"command": "settings.secrets.manage",
229+
"command": "github-actions.settings.secrets.manage",
210230
"group": "inline",
211231
"when": "viewItem == 'org-secrets'"
212232
},
213233
{
214-
"command": "settings.secret.update",
234+
"command": "github-actions.settings.secret.update",
215235
"when": "viewItem == 'secret'",
216236
"group": "inline@1"
217237
},
218238
{
219-
"command": "settings.secret.copy",
239+
"command": "github-actions.settings.secret.copy",
220240
"when": "viewItem == 'secret' || viewItem == 'org-secret'",
221241
"group": "context"
222242
},
223243
{
224-
"command": "settings.secret.delete",
244+
"command": "github-actions.settings.secret.delete",
225245
"when": "viewItem == 'secret'",
226246
"group": "inline@2"
227247
},
228248
{
229-
"command": "explorer.triggerRun",
249+
"command": "github-actions.explorer.triggerRun",
230250
"when": "viewItem =~ /workflow/ && viewItem =~ /rdispatch/",
231251
"group": "inline@1"
232252
}
233253
],
234254
"commandPalette": [
235255
{
236-
"command": "explorer.openWorkflowFile",
256+
"command": "github-actions.explorer.openWorkflowFile",
237257
"when": "false"
238258
},
239259
{
240-
"command": "explorer.triggerRun",
260+
"command": "github-actions.explorer.triggerRun",
241261
"when": "false"
242262
},
243263
{
244-
"command": "workflow.run.open",
264+
"command": "github-actions.workflow.run.open",
245265
"when": "false"
246266
},
247267
{
248-
"command": "workflow.run.cancel",
268+
"command": "github-actions.workflow.run.cancel",
249269
"when": "false"
250270
},
251271
{
252-
"command": "workflow.run.rerun",
272+
"command": "github-actions.workflow.run.rerun",
253273
"when": "false"
254274
},
255275
{
256-
"command": "settings.secrets.manage",
276+
"command": "github-actions.settings.secrets.manage",
257277
"when": "false"
258278
},
259279
{
260-
"command": "settings.secret.add",
280+
"command": "github-actions.settings.secret.add",
261281
"when": "false"
262282
},
263283
{
264-
"command": "settings.secret.update",
284+
"command": "github-actions.settings.secret.update",
265285
"when": "false"
266286
},
267287
{
268-
"command": "settings.secret.delete",
288+
"command": "github-actions.settings.secret.delete",
269289
"when": "false"
270290
}
271291
]
@@ -284,11 +304,10 @@
284304
"devDependencies": {
285305
"@types/glob": "^7.1.1",
286306
"@types/js-yaml": "^3.12.1",
287-
"@types/keytar": "^4.4.2",
288307
"@types/mocha": "^5.2.7",
289308
"@types/node": "^12.11.7",
290309
"@types/uuid": "^3.4.6",
291-
"@types/vscode": "1.44.0",
310+
"@types/vscode": "1.48.0",
292311
"@types/yaml": "^1.2.0",
293312
"glob": "^7.1.5",
294313
"mocha": "^6.2.2",
@@ -299,15 +318,14 @@
299318
"typescript": "^3.6.4",
300319
"vsce": "1.75.0",
301320
"vscode-test": "^1.2.2",
302-
"webpack": "^4.41.5",
321+
"webpack": "^4.44.1",
303322
"webpack-cli": "^3.3.10"
304323
},
305324
"dependencies": {
306325
"@octokit/rest": "^18.0.0",
307326
"atob": "^2.1.2",
308327
"btoa": "^1.2.1",
309328
"js-yaml": "^3.13.1",
310-
"keytar": "^5.0.0",
311329
"ssh-config": "^3.0.0",
312330
"tunnel": "0.0.6",
313331
"tweetsodium": "0.0.4",

0 commit comments

Comments
 (0)