Skip to content

Commit 83877db

Browse files
committed
Update README with enhanced features and usage instructions for gh-react
1 parent dbcaeb9 commit 83877db

File tree

1 file changed

+93
-9
lines changed

1 file changed

+93
-9
lines changed

README.md

Lines changed: 93 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,106 @@
11
# gh-react
22

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
418

519
## Install
620

721
```bash
8-
gh extension install yourusername/gh-react
22+
gh extension install manishraj27/gh-react
923
```
1024

11-
### Usage
25+
## Usage
26+
27+
### Basic Usage
28+
29+
```bash
30+
gh react <pr_number>
31+
```
1232

33+
**Example:**
34+
```bash
35+
gh react 23
1336
```
14-
gh react 123
1537

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! 👍
1661
```
17-
It will:
1862
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

Comments
 (0)