unjs / ungh Goto Github PK
View Code? Open in Web Editor NEW๐ Unlimited access to github API
Home Page: https://ungh.cc
License: MIT License
๐ Unlimited access to github API
Home Page: https://ungh.cc
License: MIT License
Using the version deployed at https://ungh.cc
Visit https://ungh.cc/repos/unjs/h3, it'll give some result like this:
{
"repo": {
"id": 313641207,
"name": "h3",
"repo": "unjs/h3",
"description": "โก๏ธ Minimal h(ttp) framework built for high performance and portability ",
"createdAt": "2020-11-17T14:15:44Z",
"updatedAt": "2023-04-13T14:21:41Z",
"pushedAt": "2023-04-13T10:42:54Z",
"stars": 1524,
"watchers": 1524, // <-- this value isn't correct
"forks": 79
}
}
The repo.watchers
value being returned is same as repo.stars
which is not true.
No response
No response
/repos/{owner}/{name}/readme
can only get readme from main branch
If it's posible to add a optional query named branch
, without provide a branch get readme file from default branch
// ...
let branch = event.context.query.branch
if (!branch) {
const { default_branch } = await $fetch(`https://api.github.com/repos/${owner}/${repo}`)
branch = default_branch || 'main'
}
const markdown = await $fetch(
`https://raw.githubusercontent.com/${repo}/${branch}/README.md`
);
// ...
I don't know if it's a good way to get default branch......
or add a default branch response field in /repos/{owner}/{name}
?
const repo = <GithubRepo & { defaultBranch: string }>{
id: rawRepo.id,
name: rawRepo.name,
repo: rawRepo.full_name,
description: rawRepo.description,
createdAt: rawRepo.created_at,
updatedAt: rawRepo.updated_at,
pushedAt: rawRepo.pushed_at,
stars: rawRepo.stargazers_count,
watchers: rawRepo.watchers,
forks: rawRepo.forks,
defaultBranch: rawRepo.default_branch
};
N/A
The README of a repository contains only relative links by default because it is meant for GitHub.com. It'd be great to replace them with absolute URLs so the README can be fully used outside the GitHub context
See unjs/website#14 and unjs/website#4
Could be implemented similarly to https://github.com/npm/marky-markdown/blob/master/lib/plugin/github.js
No response
It would be great to have access to repositories readme (useful to show it in Nuxt modules section):
URL: /nuxt-modules/icon/readme
Currently, deployment uses one personal token of mine. Using a token pool from the community, we shall load balance requests.
Using limited GitHub tokens, they will be only and only possible to be used for public repo queries.
Some concerns:
Would be nice to get the releases with their Markdown, really usefull for all of our docs actually.
By browser :)
By access https://ungh.cc/repos/avencera/rustywind/releases
Follow the document and test with https://githubs.com/avencera/rustywind/releases then got below error
422 Unprocessable Entity
422 Unprocessable Entity (https://api.github.com/markdown)
No response
No response
This is really useful to create our own code examples to have a great UX without having to embed CSB or SB.
Using ungh
NPM client, we can have full type support and possibly even client-side in-memory cache.
Example: https://ungh.unjs.io/repo/unjs/h3
Something like
repo/{owner}/{name}/{branches}
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
changelogen
, eslint
, eslint-config-unjs
, nitropack
, pnpm
, prettier
).github/workflows/ci.yml
actions/checkout v3
actions/setup-node v3
.github/workflows/cloudflare.yml
actions/checkout v3
actions/setup-node v3
cloudflare/wrangler-action 2.0.0
package.json
changelogen ^0.4.1
eslint ^8.34.0
eslint-config-unjs ^0.1.0
prettier ^2.8.4
typescript ^4.9.5
pnpm 7.27.0
server/package.json
nitropack ^2.2.2
Ref: #11 (comment)
Since GitHub already has a CDN layer for accessing file contents (https://raw.githubusercontent.com/) with less cache TTL and no token requirement, we can introduce an endpoint as a shortcut that redirects to CDN.
An alternative would be serving contents from workers without KV cache (which can be super costly for serving assets) and let cloudflare's EDGE only cache the assets. But this way we should really mark endpoint as unstable because there is a chance we cannot host it freely and need to move back to redirect mechanism.
Expose /repo/{name}/contributors
for total repository contributors.
We might also open /repo/{name}/contributors/{branch}/{path}
for per-file contributors stats however this is little bit costly and would be probably better to be added when we had token pool in place (#5)
For example mine works https://api.github.com/search/[email protected] while https://api.github.com/search/[email protected] results in nothing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.