Inserting snippets is broken for newly created snippets
Summary
Newly created snippets can't be inserted. Applies only to gitlab.com (and soon to 14.0)
This issue is caused by GitLab switching to main branch name.
Steps to reproduce
- Create a project snippet
- Try to insert it with
GitLab: Insert snippetcommand
What is the current bug behavior?
When calling API to get the snippet blob, you get 404
What is the expected correct behavior?
inserting the snippet
Relevant logs and/or screenshots
The extension makes a call like:
curl -H "PRIVATE-TOKEN: $TOKEN" "https://gitlab.com/api/v4/projects/20486274/snippets/2128747/files/master/blah.patch/raw"
(notice the master branch in the request)
We should instead make call to
curl -H "PRIVATE-TOKEN: $TOKEN" "https://gitlab.com/api/v4/projects/20486274/snippets/2128747/files/main/blah.patch/raw"
(notice the main branch in the request)