You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enhance GitHub integration with inline PR comment support (#41)
* feat: Update GitHub integration
- Refactor GitHub API interaction module
- Add support for new GitHub event type
- Update documentation for GitHub integration setup
* fix: ci workflow
Copy file name to clipboardExpand all lines: README.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,8 @@ The toolset enables automated PR analysis, issue tracking, tagging and release m
13
13
| PR Content Retrieval |`get_github_pr_content`| Fetch PR metadata including title, description, author, and state. |
14
14
| PR Diff Analysis |`get_github_pr_diff`| Retrieve the diff/patch content showing file changes in the PR. |
15
15
| PR Description Updates |`update_github_pr_description`| Update PR titles and descriptions with What/Why/How sections and file changes. |
16
+
| PR General Comments |`add_github_pr_comment`| Add general discussion comments to pull requests. |
17
+
| PR Inline Code Comments |`add_github_pr_inline_comment`| Add inline review comments to specific lines in PR files for code review. |
16
18
| Issue Creation |`create_github_issue`| Create new issues with conventional commit prefixes (feat/fix/chore) and MCP label. |
17
19
| Issue Updates |`update_github_issue`| Modify existing issues with new title, body, and state (open/closed). |
18
20
| Tag Management |`create_github_tag`| Create new git tags with associated messages for versioning. |
@@ -80,11 +82,21 @@ cd mcp-github-pr-issue-analyser
80
82
```
81
83
82
84
2.**Install dependencies:**
85
+
86
+
Launch MCP in `stdio` mode.
83
87
```sh
84
-
uv init
85
-
uv venv
86
-
uv pip install -r requirements.txt
88
+
export GITHUB_TOKEN="<github-token>"
89
+
uvx ./
87
90
```
91
+
92
+
Alternatively, launch MCP in `sse` mode.
93
+
```sh
94
+
export GITHUB_TOKEN="<github-token>"
95
+
export MCP_ENABLE_REMOTE=true
96
+
uvx ./
97
+
```
98
+
> You can access it via `sse` i.e. `http(s)://localhost:8080/sse`
99
+
88
100
## Local Integration with Desktop LLMs
89
101
90
102
To add an MCP server to your desktop LLM such as Claude etc.., you need to add this section to the configuration file. The basic structure involves defining a server name and providing the command and any necessary arguments to run the server.
Adds an inline review comment to a specific line in a GitHub pull request file.
171
+
Only comment if there is an issue with the code, otherwise do not comment.
172
+
Args:
173
+
repo_owner (str): The owner of the repository.
174
+
repo_name (str): The name of the repository.
175
+
pr_number (int): The pull request number to add the comment to.
176
+
path (str): The relative path to the file (e.g., 'src/main.py').
177
+
line (int): The line number in the file to comment on.
178
+
comment_body (str): The content of the review comment.
179
+
180
+
Returns:
181
+
str: A message indicating the result of the comment addition. Returns a success message if the comment is added successfully, or an error message if an exception occurs.
182
+
183
+
Error Handling:
184
+
Catches and logs any exceptions that occur during the comment addition process. If an error is encountered, the error message is logged and returned.
185
+
"""
186
+
logging.info(f"Adding inline review comment to PR #{pr_number}")
0 commit comments