1.0.3 โ€ข Published 5 months ago

get-repo-insights v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

get-repo-insights ๐Ÿš€โœจ๐Ÿ”ฅ

GitHub package License GitHub issues

๐Ÿš€ Get Your GitHub Repository Insights Effortlessly โœจ๐Ÿ“Š๐Ÿ”

get-repo-insights is a simple package that helps you fetch insights about your GitHub repositories, including metadata like stars, forks, and languages. It also allows you to retrieve specific files from your repositories. ๐Ÿ“‚๐Ÿ“ก๐Ÿ”—

This package is built in a Bun environment, ensuring faster execution and optimized performance. โšก๐Ÿฐ๐Ÿš€

โœจ Features ๐ŸŽฏ๐Ÿ“Œ๐Ÿš€

  • Fetch all repositories of a user with metadata
  • Retrieve specific details of a particular repository
  • Fetch specific file data from repositories
  • Sort repositories by creation date (newest first)
  • Simple and efficient API requests

๐Ÿ“ฆ Installation ๐Ÿ”ง๐Ÿ› ๏ธโš™๏ธ

npm i get-repo-insights

๐Ÿ›  Usage ๐Ÿ“–๐Ÿ’กโšก

Importing the package ๐Ÿ“ฆ๐Ÿš€โœจ

import RepoInsights from "get-repo-insights";

Fetch all repositories of a user ๐Ÿ”๐Ÿ“‚๐Ÿ“Š

const fetcher = new RepoInsights("maxAnii");
fetcher.fetchInsights().then((repos) => console.log(repos));

Example Output ๐Ÿ“œ๐Ÿ“Š๐Ÿ–ฅ๏ธ

[
	{
		"name": "ProjectHarbor",
		"description": "A powerful project management tool",
		"topics": ["project-management", "tasks"],
		"language": "TypeScript",
		"repoURL": "https://github.com/maxAnii/ProjectHarbor",
		"liveURL": "https://projectharbor.com",
		"stars": 120,
		"forks": 30,
		"createdAt": "2023-05-15T10:00:00Z",
		"updatedAt": "2024-02-25T08:00:00Z"
	}
]

Fetch insights for a all repository ๐Ÿ”๐Ÿ“Š๐Ÿ’ก

const fetcher = new RepoInsights("maxAnii");
fetcher.fetchInsights().then((repo) => console.log(repo));

Fetch a specific file from all repositories ๐Ÿ“‚๐Ÿ”๐Ÿ“Š

const fetcher = new RepoInsights("maxAnii", "description.json");
fetcher.fetchInsights().then((files) => console.log(files));

Fetch a specific file from a particular repository ๐Ÿ“‚๐Ÿ”๐Ÿ”—

const fetcher = new RepoInsights(
	"maxAnii",
	"description.json",
	"ProjectHarbor"
);
fetcher.fetchInsights().then((file) => console.log(file));

๐Ÿ”ฅ Use Cases ๐Ÿš€๐ŸŽฏ๐Ÿ’ก

  • Portfolio Integration: Fetch and display GitHub projects dynamically on a personal portfolio.
  • Project Analytics: Analyze and compare repositories based on stars, forks, and languages.
  • Repository Backup: Retrieve specific files from repositories for backup or migration.
  • Showcasing Open Source Work: Display project insights directly in blogs or websites.

๐Ÿ“„ License ๐Ÿ“โš–๏ธโœ…

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿค Contributing ๐Ÿ’ก๐Ÿ’ป๐Ÿ“ฌ

Contributions are welcome! Feel free to open an issue or submit a pull request.

๐Ÿ“ฌ Support ๐Ÿ“ฉ๐Ÿ™Œ๐Ÿ“ข

For any issues, check out the GitHub Issues or contact me at GitHub.

1.0.3

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago