Skip to content

The library that automates, in one place, the administration of your github projects on your website.

License

Notifications You must be signed in to change notification settings

DIGOARTHUR/github-automated-repos

Repository files navigation

github-automated-repos

angular-logo
github-automated-repos is the lib that gives you the power to control the visualization of your projects on the website,
in your own GitHub in one place!

https://github-automated-repos.vercel.app

Contributing Guidelines

NPM DOWNLOADS NPM Paackage CodeFactor GitHub Husky Eslint Prettier Husky

ReactJS Check ViteJS Check NextJS Check



1. Installation

Tip

Use the code example in this documentation. Code Example

    npm install github-automated-repos
    # or
    yarn add github-automated-repos

2. Using hook

    import {useGitHubAutomatedRepos} from "github-automated-repos";

    const data = useGitHubAutomatedRepos("GitHubUsername", "KeyWord");

3. Choose the repositories and fill in the Topics field with the keyword you determined.

Important

To insert stack names in the topics field, see web documentation > Stack Icons

image

4. ✅Ready! JSON - Data from repositories chosen by you!

JSON - DATA

Data Example ~ console.log(data) ~

Array(4)
0
: 
{id: 517152367, name: 'Dashgo', html_url: 'https://github.com/DIGOARTHUR/Dashgo', description: 'IGNITE - Trilha ReactJS/ - Neste projeto é aplicad…ate, Components, Props. Recursos do JS como: Map.', topics: Array(7),}
1
: 
{id: 482667387, name: 'DashBoard-Financeiro', html_url: 'https://github.com/DIGOARTHUR/DashBoard-Financeiro', description: 'IGNITE - Trilha ReactJS/ Chapter II - Esta aplicaç…mpanhamento de valores de entrada, saída e total.', topics: Array(6),}
2
: 
{id: 412849316, name: 'Task.TODO', html_url: 'https://github.com/DIGOARTHUR/Task.TODO', description: 'IGNITE - Trilha ReactJS/ - Este projeto aborda con…Filter e Math, Spread. E para estilização o SASS.', topics: Array(7),}
3
: 
{id: 355616217, name: 'Move.it', html_url: 'https://github.com/DIGOARTHUR/Move.it', description: 'NLW#04 - Rocketseat - Utilizando a técnica Pomodor… o objetivo é executar a tarefa do seu interesse.', topics: Array(8),}
length
: 
4
[[Prototype]]
: 
Array(0)
IN PAGE WEB

💡Use your creativity and build the card however you want.

portfolio_page


skills About Library

This library automates the view your GitHub projects on your website in one place. But how? Make the code configuration only once in your application with github-automated-repos, and manage the view of your projects on GitHub in the Topics field. Choose which project will be seen on your website, and you can even customize your project card, for example, with a representative icon and show which stacks were used. All in one place!

Control your projects
image
Customize and represent through icons.
image
In one place
image

skills Library

Import

import { useGitHubAutomatedRepos, ProjectIcons, StackIcons, StackLabels } from 'github-automated-repos';

The package imports four elements:

  • useGitHubAutomatedRepos hook responsible for automating the return of data from repositories. This hook takes two parameters: GitHubUsername & keyword. The return is an array of objects containing 7 properties: id, banner, html_url, homepage, topics, name and description.

    const data = useGitHubAutomatedRepos("GitHubUsername", "KeyWord");
    • return data example:

    [
    {
        banner:"https://raw.githubusercontent.com/DIGOARTHUR/github-automated-repos/main/src/assets/images/banner.png"
        description: "The library that automates, in one place, the administration of your github projects on your website."
        homepage: "https://github-automated-repos.vercel.app"
        html_url: "https://github.com/DIGOARTHUR/github-automated-repos"
        id: 585693873
        name: "github-automated-repos"
        topics: (8) ['automated', 'deploy', 'github', 'library', '
    }
    ]

  • StackIcons The component returns, based on the iteration of the topic array that is contained in data, icons of the stacks used in your project. Enter the stacks used in your repository's topic field.. Check the Stack Icons tab!

     data.map((item) => {
         return (
        ...
        {item.topics.map((icon, index) => {
             return (
               <StackIcons key={index} itemTopics={ icon } className={ } />
        }
        ...
    • Render component StackIcons example:

react-iconsNET_Core_Logo mysql-logo-svgrepo-com mongo-svgrepo-com (1) linux-svgrepo-com vue Vitejs-logo typescript tailwind-svgrepo-com swift swagger-svgrepo-com (1) storybook sqlite-svgrepo-com (1) spring-svgrepo-com scala-svgrepo-com sass-svgrepo-com ruby-svgrepo-com Ruby_On_Rails_Logo react-query-seeklogo com python-svgrepo-com prisma prettier



  • StackLabels component returns, based on the iteration of the topics array that is contained in data, labels of the stacks used in your project. Insert the stacks used in the topics field of your repository. Check the Stack Icons tab!

       data.map((item) => {
         return (
        ...
        {item.topics.map((icon, index) => {
             return (
               <StackLabels key={ index } itemTopics={ icon } className={ } />
        }
        ...
       
    • Render component StackLabels example:



  • ProjectIcons component returns, based on the iteration of the topics array that is contained in data, icons to represent your project. The project tag must be inserted in the topics field of your repository. Check the Project Icons tab!

       data.map((item) => {
         return (
        ...
        {item.topics.map((icon, index) => {
             return (
               <ProjectIcons key={ index } itemTopics={ icon } className={ } />
        }
        ...
       
    • Render component ProjectIcons example:

212284904-0b4f29fa-4141-4212-b516-d4e4fcdb8519 212984732-79dd44aa-23a5-4b83-ae28-7a2ddd443032 212991791-588a6c13-795e-47aa-b496-8bdbaa3cac30 212994060-8d1644c7-96d7-4f3b-8e94-65ff76db0c92 (2) 212984565-a424b06e-db5e-464a-a5df-ddf7c9bab6ad 213131421-fa77f07c-9120-4b40-859d-2bd799de6681



Fill in the fields in the github repository

  • banner: This property returns a .PNG image. For this to be possible, the correct name must be entered in the file called banner.png and also the path. Ex.:
└── src
    └── assets
            └── imgs
                └── `banner.png`
    ├── ...
dashgo_layout dashfincaneiro_layout proffy_layout
  • id: repository identification number. Used as parameter in the key tag. ( This field does not need to be filled in. )
  • html_url: repository link. Used as the link of access. ( This field does not need to be filled in. )
  • homepage: it's the access link to the built page, page deploy. About / Website of your GitHub.
homepage_Props

  • topics: array that brings information about the icons in Project Icons and Stack Icons. Used in both ProjectIcon, StackLabels e StackIcon components. It is in this field that is passed the key configured in the hook. Refers to the field About / Topics of your GitHub.
topics_Props

  • name: This is the name of the repository. Refers to the field Settings / General / Repository name of your GitHub.
name_Props

  • description: This is the description given to your repository. Refers to the About /Description field of your GitHub.
description_Props


Code Example

Caution

❗❗ Don't forget to fill in the fields: your GitHubUsername and keyWord (determined by you).

 const data = useGitHubAutomatedRepos("GitHubUsername", "KeyWord");

Javascript Javascript

  import './App.css';
  import { useGitHubAutomatedRepos, ProjectIcons, StackIcons, StackLabels } from 'github-automated-repos';
  function App() {
                              {/*useGitHubAutomatedRepos hook*/ }
  const data = useGitHubAutomatedRepos("GitHubUsername", "KeyWord");

    return (
      <div className="App">
        {
          data.map((item) => {
            return (
              <div key={item.id}>

                {/*Banner / Layout / Logo*/}
                <img src={item.banner}></img>

                {/*Project Icons*/}
                {item.topics.map((icon) => {
                  return (
                    <ProjectIcons key={icon} className="project_Icon" itemTopics={icon} />
                  )
                })}

                {/*html Url*/}
                <a href={item.html_url}>
                    {/*Name Project*/}
                    <h1>{item.name}</h1>
                </a>

                {/*Description*/}
                <p>{item.description}</p>
    
                {/*Homepage*/}
                <a href={item.homepage}>
                    <h3>Homepage</h3>
                </a>

                {/*Stacks Icon and Stacks Label*/}
                {item.topics.map((icon, index) => {
                  return (
                     <div key={icon} style={{display:'flex', justifyContent:'center'}}>
                      <StackIcons key={icon} className="stack_Icon" itemTopics={icon} />
                      <StackLabels key={index} itemTopics={icon} />
                      </div>
                  )
                })}

              </div>

            )
          })
        }
      </div>
    );

  }
  export default App;

NextJS Framework Settings.

└── My-app
    ├── ...
    ├── next.config.js
    ├── ...
/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  transpilePackages: ['github-automated-repos'],
}

module.exports = nextConfig

Love github-automated-repos? Give our repo a star ⭐ ⬆️.

based in: Api Github

by: @digoarthur