GithubHelp home page GithubHelp logo

Comments (4)

zyxkad avatar zyxkad commented on September 7, 2024

github api似乎在分支不存在的时候会跳转默认分支,因此可以正常抓取

Github api在分支不存在时似乎不会自动跳转到默认分支? 例如 https://api.github.com/repos/Flash-Z/MCDReforgedPlugins/readme/ToDoList?ref=master

默认分支为
https://api.github.com/repos/Flash-Z/MCDReforgedPlugins/readme/ToDoList

from plugincatalogue.

Fallen-Breath avatar Fallen-Breath commented on September 7, 2024

请给出具体的“github api似乎在分支不存在的时候会跳转默认分支,因此可以正常抓取”的例子

插件仓库 meta 分支的数据拉取中,对于仓库内的文件,是从 https://raw.githubusercontent.com 拉取的文件内容,并未使用 github api

对于 ToDoList 这个插件,其仓库中分支为 main,但其 plugin_info.json 中填写的是 master。对此:

猜测可能是 github 自动将 master 重定向至 main,但也仅会做这一个重定向。对于其他不存在的分支,依然无法访问

from plugincatalogue.

alex3236 avatar alex3236 commented on September 7, 2024

因此是有必要检查的

from plugincatalogue.

Fallen-Breath avatar Fallen-Breath commented on September 7, 2024

因此是有必要检查的

请给出理由,以及“请给出具体的“github api似乎在分支不存在的时候会跳转默认分支,因此可以正常抓取” (#260 (comment) )的例子。根据目前情况而言,我认为是无需做检查

from plugincatalogue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.