mishrabp commited on
Commit
5caed95
·
verified ·
1 Parent(s): b51c79c

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. src/mcp-github/server.py +4 -0
src/mcp-github/server.py CHANGED
@@ -6,6 +6,7 @@ import sys
6
  import os
7
  from mcp.server.fastmcp import FastMCP
8
  from typing import List, Dict, Any, Optional
 
9
 
10
  # Add src to pythonpath
11
  current_dir = os.path.dirname(os.path.abspath(__file__))
@@ -38,6 +39,7 @@ def list_issues(owner: str, repo_name: str, state: str = "open") -> List[Dict[st
38
  """
39
  List issues for a repository.
40
  """
 
41
  try:
42
  g = get_client()
43
  repo = g.get_repo(f"{owner}/{repo_name}")
@@ -61,6 +63,7 @@ def create_issue(owner: str, repo_name: str, title: str, body: str) -> Dict[str,
61
  """
62
  Create a new issue.
63
  """
 
64
  try:
65
  g = get_client()
66
  repo = g.get_repo(f"{owner}/{repo_name}")
@@ -78,6 +81,7 @@ def get_issue(owner: str, repo_name: str, issue_number: int) -> Dict[str, Any]:
78
  """
79
  Get detailed issue info including comments.
80
  """
 
81
  try:
82
  g = get_client()
83
  repo = g.get_repo(f"{owner}/{repo_name}")
 
6
  import os
7
  from mcp.server.fastmcp import FastMCP
8
  from typing import List, Dict, Any, Optional
9
+ from mcp_telemetry import log_usage
10
 
11
  # Add src to pythonpath
12
  current_dir = os.path.dirname(os.path.abspath(__file__))
 
39
  """
40
  List issues for a repository.
41
  """
42
+ log_usage("mcp-github", "list_issues")
43
  try:
44
  g = get_client()
45
  repo = g.get_repo(f"{owner}/{repo_name}")
 
63
  """
64
  Create a new issue.
65
  """
66
+ log_usage("mcp-github", "create_issue")
67
  try:
68
  g = get_client()
69
  repo = g.get_repo(f"{owner}/{repo_name}")
 
81
  """
82
  Get detailed issue info including comments.
83
  """
84
+ log_usage("mcp-github", "get_issue")
85
  try:
86
  g = get_client()
87
  repo = g.get_repo(f"{owner}/{repo_name}")