|
| 1 | +# GitHub-Style Issue Tracker |
| 2 | + |
| 3 | +A web-based issue tracker that fetches issues from a GitHub repository using the GitHub CLI and API, downloads relevant images, and displays them in a user-friendly interface. |
| 4 | + |
| 5 | +## Features |
| 6 | +- Fetches issues from a specified GitHub repository using the GitHub CLI. |
| 7 | +- Retrieves comments for each issue via the GitHub API. |
| 8 | +- Downloads and displays images embedded in issue descriptions and comments. |
| 9 | +- Provides filtering options to view open, closed, or all issues. |
| 10 | +- Responsive UI built with Bootstrap 5 and Font Awesome icons. |
| 11 | +- Uses Marked.js for rendering Markdown content. |
| 12 | + |
| 13 | +## Installation & Setup |
| 14 | + |
| 15 | +### Prerequisites |
| 16 | +Ensure you have the following installed on your system: |
| 17 | +- Python (3.x) |
| 18 | +- GitHub CLI (`gh`) |
| 19 | +- A GitHub personal access token (PAT) with access to issues |
| 20 | + |
| 21 | +### Clone the Repository |
| 22 | +```sh |
| 23 | + git clone https://github.com/nazmul-rion/github-issue-exporter.git |
| 24 | + cd github-issue-exporter |
| 25 | +``` |
| 26 | + |
| 27 | +### Generating a GitHub Personal Access Token (PAT) |
| 28 | +1. Go to [GitHub Developer Settings](https://github.com/settings/tokens). |
| 29 | +2. Click **Generate new token** (or **Generate new token (classic)** for older versions). |
| 30 | +3. Select the necessary scopes: |
| 31 | + - `repo` (for private repositories) |
| 32 | + - `read:org` (if accessing organization repositories) |
| 33 | + - `issues` (to read and fetch issue data) |
| 34 | +4. Generate the token and copy it. **Store it securely**, as you won’t be able to see it again. |
| 35 | +5. Use this token when prompted by `fetch_issues.py`. |
| 36 | + |
| 37 | +### Setting up GitHub CLI (`gh`) |
| 38 | +1. Install GitHub CLI by following the official guide: [GitHub CLI Installation](https://cli.github.com/) |
| 39 | +2. Authenticate GitHub CLI by running: |
| 40 | + ```sh |
| 41 | + gh auth login |
| 42 | + ``` |
| 43 | + Follow the prompts to authenticate with your GitHub account. |
| 44 | +3. Verify authentication: |
| 45 | + ```sh |
| 46 | + gh auth status |
| 47 | + ``` |
| 48 | + If authentication is successful, you can proceed with using the script. |
| 49 | + |
| 50 | +### Fetch Issues from GitHub |
| 51 | +Run the `fetch_issues.py` script to fetch and save issues in JSON format: |
| 52 | +```sh |
| 53 | +python fetch_issues.py |
| 54 | +``` |
| 55 | +You'll be prompted to enter: |
| 56 | +- GitHub repository owner |
| 57 | +- Repository name |
| 58 | +- Your GitHub token |
| 59 | +- Number of issues to fetch (default: 10) |
| 60 | +- Issue state (open, closed, all; default: all) |
| 61 | + |
| 62 | +### Run the Web Interface |
| 63 | +Simply open `index.html` in your browser to view the issues in a GitHub-style interface. |
| 64 | + |
| 65 | +## Project Structure |
| 66 | +``` |
| 67 | +📂 your-repo |
| 68 | + ├── 📜 fetch_issues.py # Python script to fetch issues and download images |
| 69 | + ├── 📜 index.html # Main web interface |
| 70 | + ├── 📜 issues_with_comments_and_images.json # Fetched issue data |
| 71 | + ├── 📂 downloaded_images # Directory for storing downloaded images |
| 72 | + ├── 📜 README.md # Project documentation |
| 73 | +``` |
| 74 | + |
| 75 | +## Usage |
| 76 | +1. Run `fetch_issues.py` to fetch issues and comments. |
| 77 | +2. Open `index.html` in a browser to view the issues. |
| 78 | +3. Use the filter dropdown to switch between open, closed, and all issues. |
| 79 | + |
| 80 | +## Dependencies |
| 81 | +- Python Modules: `requests`, `json`, `subprocess`, `os`, `time`, `re` |
| 82 | +- GitHub CLI: `gh` |
| 83 | +- Web Technologies: Bootstrap 5, Font Awesome, Marked.js |
| 84 | + |
| 85 | +## Author |
| 86 | +Developed by [Nazmul Islam Rion](https://github.com/nazmul-rion) |
| 87 | + |
0 commit comments