Open natdm opened 1 year ago
Yes, the token would need to be given (https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28)
But where to stock it?
I don't think in settings.json
would be good choice...
Maybe in an env variable or in a file?? "token": "env:MY_TOKEN"
or "token": "file:~/mytoken.txt"
?
Agreed, I've got them in env vars now, so a setting to point to an env var would be a good idea. That's probably a pretty common usecase.
@daiyam Any idea about an implementation as outlined?
We will need to add a new source type (GitHub) to have something like
"vsix.sources": {
"mgh": {
"type": "github",
"repository": "<username>",
"token": "env:MY_TOKEN",
},
},
"vsix.extensions": [
"mgh:<project>",
],
Sounds good, I'd suggest to go with vscode's ${env:MY_TOKEN}
and support ${env:name}
also in the repository
, serviceUrl
and path
properties
It doesn't look like this code is set to look at private github repos, no spot for an auth token or parsing of an environmental variable for it. Is there a way to do this?