Giter VIP home page Giter VIP logo

ungh's People

Contributors

intevel avatar nozomuikuta avatar pi0 avatar renovate[bot] avatar thetejasmagade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ungh's Issues

`watchers` count is being returned same as `stars`

Environment

Using the version deployed at https://ungh.cc

Reproduction

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
   }
}

Describe the bug

The repo.watchers value being returned is same as repo.stars which is not true.

Additional context

No response

Logs

No response

Support get repo readme file on default branch

Describe the feature

/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
};

Additional information

  • Would you be willing to help implement this feature?

Relative URLs should be replaced with absolute URLs pointing to GitHub for README

Environment

N/A

Reproduction

  1. Retrieve a repo's README via endpoint
  2. See that links to images and assets are relative

Describe the bug

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

Additional 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

Logs

No response

Access Repo Readme

It would be great to have access to repositories readme (useful to show it in Nuxt modules section):

URL: /nuxt-modules/icon/readme

Unicode Emoji Bug on Website

Actually this is not a really "bug" but the Octo emoji does not render the right way

Chrome, Windows 10 & WSL

image

github token pool from community

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:

  • How we can fairly load the balance
  • How to collect and store them (email?)
  • How to validate them regularly for expiration

`/repos/:repo/releases`

Would be nice to get the releases with their Markdown, really usefull for all of our docs actually.

`ungh` npm client

Using ungh NPM client, we can have full type support and possibly even client-side in-memory cache.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.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
npm
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

  • Check this box to trigger a request for Renovate to run again on this repository

`/repos/:repo/files/{ref}/{path}`

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.

`/contributors`

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)

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.