PicGo / vs-picgo

A VSCode plugin of PicGo
https://marketplace.visualstudio.com/items?itemName=Spades.vs-picgo
MIT License
373 stars 52 forks source link

[github] uploaded img url with tag if the repo taged #129

Closed Zhengqbbb closed 2 years ago

Zhengqbbb commented 2 years ago

Describe the bug

My image repo has a tag operation, which caused me to upload it to jsdelivr. The parsing finally has a tag in the url, but I have set github branch to main in the settings. image

try open the link: https://cdn.jsdelivr.net/gh/Zhengqbbb/img/cz/README-2022-07-20-12-11-07.png

To Reproduce

  1. Go to setting the tag for upload repo
  2. upload img
  3. click link
  4. check the final link

Expected behavior

https://cdn.jsdelivr.net/gh/Zhengqbbb/img/cz/README-2022-07-20-12-11-07.png No: https://raw.githubusercontent.com/Zhengqbbb/img/v1.0.1/cz/README-2022-07-20-12-11-07.png Yes: https://raw.githubusercontent.com/Zhengqbbb/img/main/cz/README-2022-07-20-12-11-07.png

Screenshots

image

System information

VSCode information

Additional context

Is this bug picBed specific, i.e. only the picBed you use is affected? Yes

Is there any error in the console (Help -> Toggle Developer tools)?: No.

Zhengqbbb commented 2 years ago

BTW I have deleted the tag, but it seems that there is still a problem. The setting of the branch does not seem to take effect

Because the final parsed URL is a master branch

https://cdn.jsdelivr.net/gh/Zhengqbbb/img/cz/README-2022-07-20-12-39-21.png Expected https://raw.githubusercontent.com/zhengqbbbb/img/main/cz/readme-2022-07-20-12-39-21.png But https://raw.githubusercontent.com/zhengqbbbbb/img/master/cz/readme-2022-07-20-12-39-21.png

Zhengqbbb commented 2 years ago

Oh I checked the rules of jsDelivr about Github CDN and solved https://www.jsdelivr.com/?docs=gh