gpt4 book ai didi

api - 如何通过 GitHub API 获取项目徽章?

转载 作者:行者123 更新时间:2023-12-04 00:08:06 25 4
gpt4 key购买 nike

我已经为自己建立了一个简历页面,并使用 GitHub API 列出了我所有的项目。一些项目是具有 rtfd 构建传递 标记的文档,一些是具有 travis-ci 和 pep-lint 标记的 python 项目。

现在,我想像项目一样显示徽章,我应该如何使用 API?

我的页面在这里:http://gh.windrunner.info/resume/#/github

最佳答案

您还可以通过 https://github-shields.com/ 使用不同的 API

参见“How to embed live Github PR status in your blogs & docs

Consider the PR https://github.com/cloudfoundry/bosh/pull/715.
The URL doesn't indicate if the PR is open/merged/closed.

The cloudfoundry/bosh/pull/715 portion of the URL is copied directly into the following base URL:

https://github-shields.com/github/ + cloudfoundry/bosh/pull/715 + .svg gives a URL that redirects to the PR.

https://github-shields.com/github/cloudfoundry/bosh/pull/715.svg

As an image URL it gives cloudfoundry/bosh/pull/715

Awesome, it was merged!


对于项目的状态,OP kxxoling报告 in the comments找到了shields.io :

https://img.shields.io/badge/<SUBJECT>-<STATUS>-<COLOR>.svg

it indicates how to get the status of a badge.
If there none badge added for that project, it will return a inaccessible badge like this: https://img.shields.io/travis/kxxoling/z42-doc.svg => inaccessible

关于api - 如何通过 GitHub API 获取项目徽章?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28804771/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com