Closed carlocardella closed 2 years ago
I'm not sure if it is related, just found this in VSCode 1.66 release notes: https://code.visualstudio.com/updates/v1_66#_remote-repositories
Previously, the Azure Repos extension depended directly on the GitHub Repositories extension. Azure Repos and GitHub Repositories now depend on a common extension, Remote Repositories, which supports common workflows across GitHub and Azure Repos. All APIs previously exposed by the GitHub Repositories extension are now exposed by Remote Repositories.
Interesting that the API change touches the Remote Repositories area
I am trying to take a look, it seems parent.files
here is always undefined
but I have not yet figured out why
getFileNodes(parent: Repository | RepositoryFile, repo: Repository) {
return parent.files?.map((file) => new RepositoryFileNode(repo, file));
}
Quick update: I have a propotype of a fix working for public repos, I need to figure out what's changed to get private repos too
What was the fix for public repos?
Do you want me to submit a PR with this first partial fix?
For private repos it looks like the token we get from
does not have enough permission, which is odd because other extensions authorized to use my github authentication can work with private repos. Anyway, if I use the token from that call with Postman I get the same 404 error for a private repo.
It turns out there was a problem with the private repo I was using for testing 😮 I can work with other private repos just fine so I have published the PR, please take a look; for the time being I am sideloading my vsix package for day to day use till the fix will be out.
One more note: to be able to debug the extension I had to modify a bunch of vscode files (tasks, launch.json, webpack etc.), let me know if you want me to add those to the PR:
It turns out there was a problem with the private repo I was using for testing 😮
The problem is the branch: I have created a brand new private repo for testing today and the default branch on Github is now main
, but Gispad has master
hardcoded in a bunch of places. I'll see if I can make a fix for that as well
Uhm... it looks like, after todays Stable verision 1.66 Recovery 2, Gists are not loading anymore 😮
Weird! I haven't touched the gist logic in forever, so VS Code must have shipped an update that included a breaking change in Node.Js or something.
Agreed, even when Repos was broken last time (and with the current issues), Gists has always worked perfectly... I don't know what changed with this update but it feels like something in the runtime is less stable. I'll see if I can spend a bit of time on it
It turns out there was a problem with the private repo I was using for testing 😮
The problem is the branch: I have created a brand new private repo for testing today and the default branch on Github is now
main
, but Gispad hasmaster
hardcoded in a bunch of places. I'll see if I can make a fix for that as well
I just filed a separate PR (#284) for this
Hi, I have the same problem. I have private repositories with any files listed. I create them with the suffix #main because gistpad uses the master branch by default. Once the fix has been found, wouldn't it be useful to choose the default branch name from the settings panel for the next extension update?
@valentino-90, with the PR I filed (#284) the default branch is read automatically from GitHub, no need to choose manually: is it ok for your use case?
@carlocardella, ok... but if i create a repository directly from GistPad (in sidebar panel), gistpad will use "master" by default. I always prefer to use "main" everywhere for compatibility with other tools, but currently i can't choose this option.
Good point, thanks, I didn't think about that (I always create my repos on GitHub first); I'll try to add it
@valentino-90, maybe this deserves a conversation in a dedicated issue: anyway, I just tried to create a new repo and and it automatically used main
. Do you want to be able to choose the branch name instead?
Note, in this short video I am using the change in my PR, you do not get this behavior without it:
@carlocardella great, it works because your fix is active in your case. It's ok, but in my opinion there are developers who prefer the "old" style. Maybe using main by default and allow the editing is a good idea for future releases. But, now the priority is the problem of missing files in repository tree.
Your PR looks great, and I really appreciate the contribution/help here! I left a few minor comments, but we can go ahead and try to get this merged and released today 🙌
Describe the bug Seems to be a reoccurrence of #274, unfortunately this time it affects both Stable and Insiders release. GistPad Repositories no longer show the repo content (see screenshot below).
To Reproduce Steps to reproduce the behavior:
Install VSCode 1.66 Just open an existing repo
Expected behavior See and edit files in the repo
Screenshots
Desktop (please complete the following information): GistPad v0.3.0
Additional context Add any other context about the problem here.