Skip to content

LuisCoralesM/fetchdata-sborg-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fetch GitHub Organization Repos

A JavaScript pet project that retrieve important info from the Stack Builders organization (or any org) repositories by using the GitHub API.

Features

  • Scrape all repositories from the Stack Builders organization from the GitHub API.
    • For each repo, get its name, url, update date and stars.
  • Get the repos data sorted by most recent updates (top 5).
  • Get only the repos with more than 5 stars.
  • Automated unit testing to check the fetched data, the sorting and filter functions work correctly.

Package dependency

  • Axios → HTTP client library
  • Jest → Automated testing framework (DEV ONLY)

How to run it?

Assuming you already have downloaded Node.JS and NPM: Clone or download the code and just run the following command on the directory:

npm install

Wait for the package installation.

npm run start

Wait for the execution of the code to get the fetched data as .json files.

How to test it?

By installing Jest and using the next command, you can validate all the fetched data is correct and all the functions work properly:

npm test

What the tests check:

  • Checks if the fetching returns something valid.
  • Checks if the getReposWithFiveStars works properly by checking each filtered repo.
  • Checks if the getStarsSum add stars to the total count correctly.
  • Checks if the sortReposByUpdateDate sorts each repo correctly by checking if the first repo update date is latest than the next one.

About

A JavaScript pet project that retrieve important info from the Stack Builders organization repositories by using the GitHub API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors