An open API service indexing awesome lists of open source software.

https://github.com/krisnaajiep/java-github-user-activity

A simple command line interface (CLI) to fetch the recent activity of a GitHub user built with Java and Github API.
https://github.com/krisnaajiep/java-github-user-activity

api-consumption cli cli-app command-line command-line-interface command-line-tool github-api github-events gson http-client http-requests http-response java json maven

Last synced: 8 months ago
JSON representation

A simple command line interface (CLI) to fetch the recent activity of a GitHub user built with Java and Github API.

Awesome Lists containing this project

README

          

# Java GitHub User Activity

> A simple command line interface (CLI) built with Java to fetch the recent activity of a GitHub user and display it in the terminal.

## Table of Contents

* [General Info](#general-information)
* [Technologies Used](#technologies-used)
* [Features](#features)
* [Setup](#setup)
* [Usage](#usage)
* [Project Status](#project-status)
* [Acknowledgements](#acknowledgements)
* [License](#license)

## General Information

Java GitHub User Activity is a simple command line interface (CLI) that accept the GitHub username as an argument, fetch
the user’s recent activity using the GitHub API, and display it in the terminal. This project is designed to explore and
practice working with the command line interface (CLI) and API consumption in Java.

## Technologies Used

* Java 21.0.6 (LTS)
* Maven 3.9.9
* Gson 2.12.1

## Features

* Fetch recent activities of a GitHub user.
* Display a variety of activities including repository creation, commits, branch creation, and starred repositories.
* Simple, clear output for easy tracking of a user's GitHub contributions.

## Setup

To run this CLI tool, you’ll need:

* **Java**: Version 21 or higher
* **Maven**: Version 3.x

How to Build:

1. Clone the repository

```bash
git clone https://github.com/krisnaajiep/java-github-user-activity.git
```

2. Change the current working directory

```bash
cd java-github-user-activity
```

3. Build the project

```bash
mvn clean package
```

4. Copy the JAR file from the `target/` directory

```bash
cp target/github-user-activity-1.0-SNAPSHOT-jar-with-dependencies.jar github-activity.jar
```

5. Run the JAR file

```bash
java -jar github-activity.jar
```

## Usage

```bash
java -jar github-activity.jar
```

Example Output:

```
Output:
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed 2 commits to kamranahmedse/reminder
- Opened pull request #27 in asim/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed 6 commits to kamranahmedse/reminder
- Created comment on issue #24 in asim/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Opened pull request #24 in asim/reminder
- Pushed 4 commits to kamranahmedse/reminder
- Pushed 10 commits to kamranahmedse/reminder
- Opened pull request #21 in asim/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed a commit to kamranahmedse/reminder
- Pushed 3 commits to kamranahmedse/reminder
- Forked asim/reminder to reminder
- created Review comment by for pull request #8506 in kamranahmedse/developer-roadmap
```

## Project Status

Project is: _complete_.

## Acknowledgements

This project was inspired by [roadmap.sh](https://roadmap.sh/projects/github-user-activity).

## License

This project is licensed under the MIT License—see the [LICENSE](./LICENSE) file for details.