|
1 | 1 | # gh-react |
2 | 2 |
|
3 | | -✨ Add emoji reactions to PR comments from your terminal. |
| 3 | +✨ Add emoji reactions to PR comments from your terminal using GitHub CLI. |
| 4 | + |
| 5 | +A GitHub CLI extension that allows you to quickly react to pull request comments, reviews, and descriptions without leaving your terminal. |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- 🎯 React to **all types of PR content**: |
| 10 | + - PR descriptions/body |
| 11 | + - General PR comments |
| 12 | + - Inline code review comments |
| 13 | + - Review summary comments |
| 14 | +- 🚀 Dynamic PR number support |
| 15 | +- 🔍 Automatic comment type detection |
| 16 | +- ✅ Comprehensive error handling |
| 17 | +- 📋 Lists all available comments with IDs |
4 | 18 |
|
5 | 19 | ## Install |
6 | 20 |
|
7 | 21 | ```bash |
8 | | -gh extension install yourusername/gh-react |
| 22 | +gh extension install manishraj27/gh-react |
9 | 23 | ``` |
10 | 24 |
|
11 | | -### Usage |
| 25 | +## Usage |
| 26 | + |
| 27 | +### Basic Usage |
| 28 | + |
| 29 | +```bash |
| 30 | +gh react <pr_number> |
| 31 | +``` |
12 | 32 |
|
| 33 | +**Example:** |
| 34 | +```bash |
| 35 | +gh react 23 |
13 | 36 | ``` |
14 | | -gh react 123 |
15 | 37 |
|
| 38 | +### What happens: |
| 39 | + |
| 40 | +1. **Fetches all comments** from the specified PR |
| 41 | +2. **Lists comments** with their IDs and authors |
| 42 | +3. **Prompts for comment ID** to react to |
| 43 | +4. **Asks for reaction type** from available options |
| 44 | +5. **Sends the reaction** via GitHub API |
| 45 | + |
| 46 | +### Example Output |
| 47 | + |
| 48 | +```bash |
| 49 | +$ gh react 23 |
| 50 | +Fetching comments for PR #23... |
| 51 | +Checking if PR #23 exists... |
| 52 | +Fetching comments... |
| 53 | +PR_BODY|23|manishraj27: fix: update homepage URL in package.json |
| 54 | +ISSUE|3045853431|manishraj27: test |
| 55 | + |
| 56 | +Enter comment ID to react to: 3045853431 |
| 57 | +Pick a reaction: (+1, -1, laugh, heart, hooray, rocket, eyes) |
| 58 | +Reaction: +1 |
| 59 | +Sending reaction... |
| 60 | +Done! 👍 |
16 | 61 | ``` |
17 | | -It will: |
18 | 62 |
|
19 | | -- Show PR comments |
20 | | -- Ask you to pick a comment ID |
21 | | -- Ask which emoji to react with |
22 | | -- Add the reaction via the GitHub API |
| 63 | +## Available Reactions |
| 64 | +
|
| 65 | +| Reaction | Description | |
| 66 | +|----------|-------------| |
| 67 | +| `+1` | 👍 Thumbs up | |
| 68 | +| `-1` | 👎 Thumbs down | |
| 69 | +| `laugh` | 😄 Laugh | |
| 70 | +| `heart` | ❤️ Heart | |
| 71 | +| `hooray` | 🎉 Hooray | |
| 72 | +| `rocket` | 🚀 Rocket | |
| 73 | +| `eyes` | 👀 Eyes | |
| 74 | +
|
| 75 | +## Comment Types Supported |
| 76 | +
|
| 77 | +- **PR_BODY**: The main PR description/body |
| 78 | +- **ISSUE**: General comments on the PR conversation |
| 79 | +- **REVIEW**: Inline comments on specific lines of code |
| 80 | +- **REVIEW_SUMMARY**: Comments submitted with code reviews |
| 81 | +
|
| 82 | +## Requirements |
| 83 | +
|
| 84 | +- [GitHub CLI](https://cli.github.com/) installed and authenticated |
| 85 | +- Access to the repository containing the PR |
| 86 | +- Bash shell environment |
| 87 | +
|
| 88 | +## Error Handling |
| 89 | +
|
| 90 | +The extension handles various scenarios: |
| 91 | +- Invalid or non-existent PR numbers |
| 92 | +- PRs with no comments |
| 93 | +- Authentication issues |
| 94 | +- Network connectivity problems |
| 95 | +
|
| 96 | +## Contributing |
| 97 | +
|
| 98 | +1. Fork the repository |
| 99 | +2. Create your feature branch |
| 100 | +3. Make your changes |
| 101 | +4. Test thoroughly |
| 102 | +5. Submit a pull request |
| 103 | +
|
| 104 | +## License |
| 105 | +
|
| 106 | +MIT License - see LICENSE file for details. |
0 commit comments