A simple command line interface (CLI) to fetch the recent activity of a GitHub user and display it in the terminal.
This project is built using the Go programming language and is a solution to the challenge provided by roadmap.sh.
- Fetches recent public activity for any GitHub user
- Supports filtering by event type (e.g., PushEvent, CreateEvent, etc.)
- Displays activity in a human-readable format in the terminal
- Clone the repository:
git clone https://github.com/jaygaha/roadmap-go-projects.git cd roadmap-go-projects/github-user-activity - Build the project:
go build -o github-activity
Run the CLI with a GitHub username to fetch their recent activity:
./github-activity <username>Filter by event type using the -filter flag:
./github-activity -filter=PushEvent <github-username>./github-activity jaygaha
./github-activity -filter=PushEvent jaygahaPlease refer to the GitHub event types documentation for a list of supported event types.
- main.go : Entry point of the application
- cmd/command.go : Command-line parsing and execution logic
- api/github.go : Functions to interact with the GitHub API
- api/types.go : Data structures for GitHub API responses
- utils/utils.go : Utility functions for formatting and filtering events
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
Happy coding! 馃殌