Skip to content

An application that retrieves GitHub repositories and issues (read README section on expected behavior)

Notifications You must be signed in to change notification settings

strategicmarket/issues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 

Repository files navigation

Repos & Issues

Getting set up and running.

Here are detailed instructions on how to download this repository and get the application running. To achieve this, we will be working heavily in the terminal. Below you'll find a general overview of the application's expected behavior.

  1. In your computer's terminal, navigate to the directory of your choice and git clone this repository.

    • When you're in the directory of your choice, paste this command into your terminal: git clone https://github.com/jsdev17/issues.git then hit Enter.
  2. Once you've cloned the repository, you should see two directories at the root level: one named server and another named client. Go into each of these directories and run the command npm install inside the terminal.

    • For the sake of clarity, this means you'll be running npm install twice; once inside server and another inside client. You can do this one at a time, or you can open a second tab in your terminal and run these commands simultaneously on two separate tabs.
  3. Once npm install is finished in server, then

    1. Create a .env file _at the root level. In this file, add three varibles: TOKEN=(ask the owner this repo for a token), DB_URI=mongodb://localhost/strategic-test, and TESTING=false. Creating a .env file with these environment variables is very important. If you don't have the first two, the server won't start properly.
    2. Start MongoDB in your computer. You can do this by opening a new terminal tab, or window, and running the mongod command.
    3. Once Mongo is running, run npm start inside the server directory. This will start the server.
  4. In client, all you have to do is run npm start once npm install is done. This will automatically open the application on your browser.

A note on expected behavior.

The application is a working prototype, and is thus tailored to retrieve and render data from GitHub repositories and issues for this account only. If you wish to fetch and render repositories from another GitHub account, you may do so by making a slight change in the source code; however, you will not be able to see each repository's issues (assuming there are any). This is because in order for issues to be rendered, they need to be matched with documents in the database; that is to say, if there's not a document (in the database) for each issue retrieved from GitHub, there will be no match and the issue won't be rendered. When you start the server, data will be automatically initialized into MongoDB; however, this data currently only matches issues in this repository. This behavior may or may not change in future versions of this application. For now, just keep in mind its present limitations.

Fetching repos for another GitHub User

There's a file named ReposPage.js in the client directory. The path to this file is the following: client/src/components/ReposPage.js.

On line 13, inside the component's state, change the value of user to fetch repositories of another GitHub user. Like so:

    this.state = {
      repos: [],
      loaded: false,
      user: 'change the value of this'
    }

You must enter a valid GitHub username.

About

An application that retrieves GitHub repositories and issues (read README section on expected behavior)

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published