Skip to content

markterence/hoshizora

Repository files navigation

hoshizora

星空 (hoshizora)

markterence-hoshizora

Demo

Show usernames:

demo-with-data

Hide usernames:

demo-do-not-display-username

Empty, when no stargazers yet: (default message is "A quiet night sky" and cannot be changed)

demo-empty

Example snippet:

<img src="https://hoshizora.markterence.me/demo-stargazers?show_usernames=1" alt="demo-with-data" />
<img src="https://hoshizora.markterence.me/demo-stargazers?show_usernames=0" alt="demo-do-not-display-username" /> 
<img src="https://hoshizora.markterence.me/demo-stargazers?empty=1&show_usernames=1" alt="demo-empty" /> 

Live

https://hoshizora.markterence.me/github-stargazers/:github-username/:repo?show=show_usernames=1

Currently, the live version only accept my repositories(markterence) as I haven't set up a caching configuration and it's not production ready. This is also a precaution to avoid hitting GitHub API rate limits. You can open an issue to request adding your GitHub user/org handle to the allowed list (it must be your own not someone else's or your Github org you manage).

Development

To install dependencies:

pnpm install

To run in development

pnpm run dev

Setup Environment Variables:

Create a .env file in your project root with the following variables:

GITHUB_API_TOKEN=github_pat_your_token_here
ALLOWED_GITHUB_OWNERS=user1,user2,organization1
  • GITHUB_API_TOKEN: GitHub Personal Access Token with repo read permissions. (Create token in GitHub Settings > Developer settings
  • ALLOWED_GITHUB_OWNERS: Comma-separated list of GitHub usernames allowed to use the service. Example: markterence,myfriend1

Endpoints

Stargazer SVG Card

GET /github-stargazers/:owner/:repo

Query Params

Query Description Value
show_usernames Should it show the first three user who starred the repo. Example Value: true, 1

LICENSE

  • Website code, design, and content are licensed under CC BY 4.0.
    • TL;DR: You are free to use, share, and adapt as long as you give appropriate credit.
  • All backend source code files (backend logic if present) are licensed under the MIT License.

See the individual license files for full terms.

About

星空 - some basic image or svg thing (a work in progress)

Topics

Resources

License

MIT, CC-BY-4.0 licenses found

Licenses found

MIT
LICENSE
CC-BY-4.0
LICENSE-CC-BY-4.0

Stars

Watchers

Forks