fastmcp-tools-github 0.1.0__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.4
2
- Name: fastmcp-tools-github
3
- Version: 0.1.0
4
- Summary: GitHub tools for fastmcp-server
5
- License-Expression: MIT
6
- Requires-Python: >=3.11
7
- Requires-Dist: requests>=2.31
1
+ Metadata-Version: 2.4
2
+ Name: fastmcp-tools-github
3
+ Version: 0.2.3
4
+ Summary: GitHub tools for fastmcp-server
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: requests>=2.31
@@ -1,22 +1,22 @@
1
- [build-system]
2
- requires = ["setuptools>=68.0"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "fastmcp-tools-github"
7
- version = "0.1.0"
8
- description = "GitHub tools for fastmcp-server"
9
- license = "MIT"
10
- requires-python = ">=3.11"
11
- dependencies = ["requests>=2.31"]
12
-
13
- [project.entry-points."fastmcp_tools"]
14
- github = "fastmcp_tools_github"
15
-
16
- [tool.setuptools.packages.find]
17
- where = ["src"]
18
- include = ["fastmcp_tools_github*"]
19
-
20
-
21
- [tool.setuptools.package-data]
1
+ [build-system]
2
+ requires = ["setuptools>=68.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "fastmcp-tools-github"
7
+ version = "0.2.3"
8
+ description = "GitHub tools for fastmcp-server"
9
+ license = "MIT"
10
+ requires-python = ">=3.11"
11
+ dependencies = ["requests>=2.31"]
12
+
13
+ [project.entry-points."fastmcp_tools"]
14
+ github = "fastmcp_tools_github"
15
+
16
+ [tool.setuptools.packages.find]
17
+ where = ["src"]
18
+ include = ["fastmcp_tools_github*"]
19
+
20
+
21
+ [tool.setuptools.package-data]
22
22
  "fastmcp_tools_github" = ["*.py"]
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -1,5 +1,5 @@
1
- """FastMCP Tools — GitHub collection."""
2
-
3
- from pathlib import Path
4
-
5
- TOOLS_DIR = Path(__file__).parent
1
+ """FastMCP Tools — GitHub collection."""
2
+
3
+ from pathlib import Path
4
+
5
+ TOOLS_DIR = Path(__file__).parent
@@ -1,49 +1,49 @@
1
- """List GitHub issues for a repository.
2
-
3
- Requires: requests
4
- """
5
-
6
- __tags__ = ["github", "read"]
7
- __timeout__ = 30.0
8
- __cache_ttl__ = 60
9
-
10
-
11
- def list_issues(
12
- owner: str,
13
- repo: str,
14
- state: str = "open",
15
- labels: str = "",
16
- limit: int = 20,
17
- ) -> str:
18
- """List issues from a GitHub repository."""
19
- import os
20
-
21
- import requests
22
-
23
- token = os.environ.get("GITHUB_TOKEN", "")
24
- headers = {"Accept": "application/vnd.github+json"}
25
- if token:
26
- headers["Authorization"] = f"Bearer {token}"
27
-
28
- params = {"state": state, "per_page": min(limit, 100)}
29
- if labels:
30
- params["labels"] = labels
31
-
32
- resp = requests.get(
33
- f"https://api.github.com/repos/{owner}/{repo}/issues",
34
- headers=headers,
35
- params=params,
36
- timeout=15,
37
- )
38
- resp.raise_for_status()
39
-
40
- issues = resp.json()
41
- lines = [f"Issues for {owner}/{repo} ({state}):"]
42
- for issue in issues[:limit]:
43
- labels_str = ", ".join(lbl["name"] for lbl in issue.get("labels", []))
44
- lines.append(f" #{issue['number']} {issue['title']} [{labels_str}]")
45
-
46
- if len(lines) == 1:
47
- lines.append(" (no issues found)")
48
-
49
- return "\n".join(lines)
1
+ """List GitHub issues for a repository.
2
+
3
+ Requires: requests
4
+ """
5
+
6
+ __tags__ = ["github", "read"]
7
+ __timeout__ = 30.0
8
+ __cache_ttl__ = 60
9
+
10
+
11
+ def list_issues(
12
+ owner: str,
13
+ repo: str,
14
+ state: str = "open",
15
+ labels: str = "",
16
+ limit: int = 20,
17
+ ) -> str:
18
+ """List issues from a GitHub repository."""
19
+ import os
20
+
21
+ import requests
22
+
23
+ token = os.environ.get("GITHUB_TOKEN", "")
24
+ headers = {"Accept": "application/vnd.github+json"}
25
+ if token:
26
+ headers["Authorization"] = f"Bearer {token}"
27
+
28
+ params = {"state": state, "per_page": min(limit, 100)}
29
+ if labels:
30
+ params["labels"] = labels
31
+
32
+ resp = requests.get(
33
+ f"https://api.github.com/repos/{owner}/{repo}/issues",
34
+ headers=headers,
35
+ params=params,
36
+ timeout=15,
37
+ )
38
+ resp.raise_for_status()
39
+
40
+ issues = resp.json()
41
+ lines = [f"Issues for {owner}/{repo} ({state}):"]
42
+ for issue in issues[:limit]:
43
+ labels_str = ", ".join(lbl["name"] for lbl in issue.get("labels", []))
44
+ lines.append(f" #{issue['number']} {issue['title']} [{labels_str}]")
45
+
46
+ if len(lines) == 1:
47
+ lines.append(" (no issues found)")
48
+
49
+ return "\n".join(lines)
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.4
2
- Name: fastmcp-tools-github
3
- Version: 0.1.0
4
- Summary: GitHub tools for fastmcp-server
5
- License-Expression: MIT
6
- Requires-Python: >=3.11
7
- Requires-Dist: requests>=2.31
1
+ Metadata-Version: 2.4
2
+ Name: fastmcp-tools-github
3
+ Version: 0.2.3
4
+ Summary: GitHub tools for fastmcp-server
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: requests>=2.31