Welcome to Repo Land! View all of your favorite organization's repositories!
cd [project directory]
npm install
npm start
Open http://localhost:3000 to view project in the browser.
May see warnings if not using placeholder data.
npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
To avoid exceeding Github API's rate limit, I provided some placeholder data for repositories and commits that can be accessed in src/temp/data.js
Comments are provided where AJAX calls are made and can be switched with the placeholder data provided.
// ! COMMENT OUT LINES BELOW IF USING PLACEHOLDER DATA
const resp = await axios.get(`${REPO_BASE_URL}/${organization}/repos`);
setRepositories(resp);
// get owner's avatar to display in Header component
setOwnerAvatar(resp.data[0].owner.avatar_url);
// * USE PLACEHOLDER DATA BELOW
setRepositories(repoData.response);
setOwnerAvatar(repoData.response.data[0].owner.avatar_url);
src/components/commits/Commits.jsx
// ! COMMENT OUT LINES BELOW IF USING PLACEHOLDER DATA
const resp = await axios.get(`${COMMIT_BASE_URL}/${organization}/${name}/commits?page=1&per_page=${perPage}`);
setCommits(resp);
// * USE PLACEHOLDER DATA BELOW
setCommits(commitData.response);
Unauthenticated requests have a rate limit up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the user making requests. Read more about Github's API rate limits here.