Gissues is a CLI application that fetches and displays issues from a specified GitHub repository in a markdown table format.
-
Clone the repository:
git clone https://github.com/your_username/gissues.git
-
Navigate to the project directory:
cd gissues -
Install dependencies:
mix deps.get
-
Compile the project:
mix compile
Configure the GitHub API base URL and HTTP client in config/config.exs:
config :gissues, :github_url, "https://api.github.com/"
config :gissues, :http_adapter, HTTPoison
config :gissues, :provider, Gissues.Providers.GithubTo run the CLI application, use the following command:
mix run -e 'Gissues.CLI.main(["user", "project", "count"])'Replace user, project, and count with the appropriate values:
user: The GitHub username.project: The GitHub repository name.count: (Optional) The number of issues to display. Defaults to 4 if not specified.
Example:
mix run -e 'Gissues.CLI.main(["elixir-lang", "elixir", "5"])'To display the help message, use:
mix run -e 'Gissues.CLI.main(["--help"])'or
mix run -e 'Gissues.CLI.main(["-h"])'-
Install test dependencies:
mix deps.get --only test -
Run the tests:
mix test
Ensure the setup and configurations for mocks are correctly implemented in test_helper.exs:
Mox.defmock(Gissues.MockHTTPoison, for: HTTPoison.Base)
Application.put_env(:gissues, :http_adapter, Gissues.MockHTTPoison)To format the code, run:
mix formatFeel free to submit issues and enhancement requests.
This project is licensed under the MIT License - see the LICENSE file for details.