swarmauri_toolkit_github 0.9.1.dev3__py3-none-any.whl → 0.11.0.dev1__py3-none-any.whl

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.
@@ -16,13 +16,19 @@ class GithubBranchTool(ToolBase):
16
16
  Parameter(
17
17
  name="action",
18
18
  input_type="string",
19
- description="The action to perform on the GitHub API, e.g., 'create_repo', 'delete_repo', 'create_issue', etc.",
19
+ description=(
20
+ "The action to perform on the GitHub API, e.g., "
21
+ "'create_repo', 'delete_repo', 'create_issue', etc."
22
+ ),
20
23
  required=True,
21
24
  ),
22
25
  Parameter(
23
26
  name="repo_name",
24
27
  input_type="string",
25
- description="The full name of the repository to interact with, e.g. 'owner/repository'.",
28
+ description=(
29
+ "The full name of the repository to interact with, e.g. "
30
+ "'owner/repository'."
31
+ ),
26
32
  required=True,
27
33
  ),
28
34
  Parameter(
@@ -34,7 +40,9 @@ class GithubBranchTool(ToolBase):
34
40
  Parameter(
35
41
  name="source_branch",
36
42
  input_type="string",
37
- description="The name of the source branch to create a branch from.",
43
+ description=(
44
+ "The name of the source branch to create a branch from."
45
+ ),
38
46
  required=False,
39
47
  ),
40
48
  ]
@@ -14,19 +14,28 @@ class GithubCommitTool(ToolBase):
14
14
  Parameter(
15
15
  name="action",
16
16
  input_type="string",
17
- description="The action to perform on the GitHub API, e.g., 'create_repo', 'delete_repo', 'create_issue', etc.",
17
+ description=(
18
+ "The action to perform on the GitHub API, e.g., "
19
+ "'create_repo', 'delete_repo', 'create_issue', etc."
20
+ ),
18
21
  required=True,
19
22
  ),
20
23
  Parameter(
21
24
  name="repo_name",
22
25
  input_type="string",
23
- description="The full name of the repository to interact with, e.g. 'owner/repository'.",
26
+ description=(
27
+ "The full name of the repository to interact with, e.g. "
28
+ "'owner/repository'."
29
+ ),
24
30
  required=True,
25
31
  ),
26
32
  Parameter(
27
33
  name="file_path",
28
34
  input_type="string",
29
- description="The path to the file in the repository, e.g. 'path/to/file.txt'.",
35
+ description=(
36
+ "The path to the file in the repository, e.g. "
37
+ "'path/to/file.txt'."
38
+ ),
30
39
  required=False,
31
40
  ),
32
41
  Parameter(
@@ -14,13 +14,20 @@ class GithubIssueTool(ToolBase):
14
14
  Parameter(
15
15
  name="action",
16
16
  input_type="string",
17
- description="The action to perform on the GitHub API, e.g., 'create_issue', 'delete_issue', 'close_issue', 'list_issues', 'get_issue'",
17
+ description=(
18
+ "The action to perform on the GitHub API, e.g., "
19
+ "'create_issue', 'delete_issue', 'close_issue', "
20
+ "'list_issues', 'get_issue'"
21
+ ),
18
22
  required=True,
19
23
  ),
20
24
  Parameter(
21
25
  name="repo_name",
22
26
  input_type="string",
23
- description="The full name of the repository to interact with, e.g. 'owner/repository'.",
27
+ description=(
28
+ "The full name of the repository to interact with, e.g. "
29
+ "'owner/repository'."
30
+ ),
24
31
  required=False,
25
32
  ),
26
33
  Parameter(
@@ -75,7 +82,9 @@ class GithubIssueTool(ToolBase):
75
82
  raise ValueError(f"Action '{action}' is not supported.")
76
83
 
77
84
  # Issue Management Methods
78
- def create_issue(self, repo_name: str, title: str, body: str = None) -> str:
85
+ def create_issue(
86
+ self, repo_name: str, title: str, body: str = None
87
+ ) -> str:
79
88
  try:
80
89
  repo = self._github.get_repo(repo_name)
81
90
  repo.create_issue(title=title, body=body)
@@ -14,13 +14,20 @@ class GithubPRTool(ToolBase):
14
14
  Parameter(
15
15
  name="action",
16
16
  input_type="string",
17
- description="The action to perform on the GitHub API, e.g., 'create_pull', 'merge_pull', 'close_pull', 'get_pull', 'list_pulls' etc.",
17
+ description=(
18
+ "The action to perform on the GitHub API, e.g., "
19
+ "'create_pull', 'merge_pull', 'close_pull', 'get_pull', "
20
+ "'list_pulls' etc."
21
+ ),
18
22
  required=True,
19
23
  ),
20
24
  Parameter(
21
25
  name="repo_name",
22
26
  input_type="string",
23
- description="The full name of the repository to interact with, e.g. 'owner/repository'.",
27
+ description=(
28
+ "The full name of the repository to interact with, e.g. "
29
+ "'owner/repository'."
30
+ ),
24
31
  required=False,
25
32
  ),
26
33
  Parameter(
@@ -44,7 +51,10 @@ class GithubPRTool(ToolBase):
44
51
  Parameter(
45
52
  name="base",
46
53
  input_type="string",
47
- description="The base branch you're merging into, typically 'main' or 'master'",
54
+ description=(
55
+ "The base branch you're merging into, typically 'main' or "
56
+ "'master'"
57
+ ),
48
58
  required=False,
49
59
  ),
50
60
  Parameter(
@@ -88,7 +98,12 @@ class GithubPRTool(ToolBase):
88
98
 
89
99
  # Pull Request Management Methods
90
100
  def create_pull(
91
- self, repo_name: str, title: str, head: str, base: str, body: str = None
101
+ self,
102
+ repo_name: str,
103
+ title: str,
104
+ head: str,
105
+ base: str,
106
+ body: str = None,
92
107
  ) -> str:
93
108
  try:
94
109
  repo = self._github.get_repo(repo_name)
@@ -14,19 +14,30 @@ class GithubRepoTool(ToolBase):
14
14
  Parameter(
15
15
  name="action",
16
16
  input_type="string",
17
- description="The action to perform on the GitHub API, e.g., 'create_repo', 'delete_repo', 'update_repo', and 'get_repo'",
17
+ description=(
18
+ "The action to perform on the GitHub API, e.g., "(
19
+ "'create_repo', 'delete_repo', 'update_repo', and "
20
+ "'get_repo'"
21
+ )
22
+ ),
18
23
  required=True,
19
24
  ),
20
25
  Parameter(
21
26
  name="repo_name",
22
27
  input_type="string",
23
- description="The full name of the repository to interact with, e.g. 'owner/repository'.",
28
+ description=(
29
+ "The full name of the repository to interact with, e.g. "
30
+ "'owner/repository'."
31
+ ),
24
32
  required=False,
25
33
  ),
26
34
  Parameter(
27
35
  name="file_path",
28
36
  input_type="string",
29
- description="The path to the file in the repository, e.g. 'path/to/file.txt'.",
37
+ description=(
38
+ "The path to the file in the repository, e.g. "
39
+ "'path/to/file.txt'."
40
+ ),
30
41
  required=False,
31
42
  ),
32
43
  ]
@@ -83,7 +94,7 @@ class GithubRepoTool(ToolBase):
83
94
  def get_repo(self, repo_name: str) -> str:
84
95
  try:
85
96
  repo = self._github.get_repo(repo_name)
86
- repo_info = f"Repository: {repo.full_name}\nDescription: {repo.description}\nClone URL: {repo.clone_url}"
97
+ repo_info = f"Repository: {repo.full_name}\nDescription: {repo.description}\nClone URL: {repo.clone_url}" # noqa: E501
87
98
  return repo_info
88
99
  except GithubException as e:
89
100
  return f"Error retrieving repository info: {e}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swarmauri_toolkit_github
3
- Version: 0.9.1.dev3
3
+ Version: 0.11.0.dev1
4
4
  Summary: Github Toolkit
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -40,11 +40,12 @@ Description-Content-Type: text/markdown
40
40
  <img src="https://img.shields.io/pypi/l/swarmauri_toolkit_github" alt="PyPI - License"/></a>
41
41
  <a href="https://pypi.org/project/swarmauri_toolkit_github/">
42
42
  <img src="https://img.shields.io/pypi/v/swarmauri_toolkit_github?label=swarmauri_toolkit_github&color=green" alt="PyPI - swarmauri_toolkit_github"/></a>
43
- </p>
43
+ <a href="https://discord.gg/N4UpBuQv8T">
44
+ <img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
44
45
 
45
- # Swarmauri Toolkit · GitHub
46
+ # Swarmauri Toolkit ? GitHub
46
47
 
47
- A Swarmauri toolkit that wraps PyGithub behind Swarmauri’s agent/tool abstractions. Authenticate once and gain access to repository, issue, pull request, branch, and commit helpers—ready for scripted automation or conversational agents.
48
+ A Swarmauri toolkit that wraps PyGithub behind Swarmauri?s agent/tool abstractions. Authenticate once and gain access to repository, issue, pull request, branch, and commit helpers?ready for scripted automation or conversational agents.
48
49
 
49
50
  - Creates a shared GitHub client so every tool call reuses the same token and rate-limit state.
50
51
  - Normalizes responses into dictionaries so downstream logic can inspect status messages or raw PyGithub payloads.
@@ -52,7 +53,7 @@ A Swarmauri toolkit that wraps PyGithub behind Swarmauri’s agent/tool abs
52
53
 
53
54
  ## Requirements
54
55
 
55
- - Python 3.10 – 3.13.
56
+ - Python 3.10 ? 3.13.
56
57
  - GitHub personal access token (classic or fine-grained) with the scopes your workflow requires. Store it in an environment variable such as `GITHUB_TOKEN`.
57
58
  - Runtime dependencies (`PyGithub`, `python-dotenv`, and the Swarmauri base/standard packages) install automatically with the toolkit.
58
59
 
@@ -82,7 +83,7 @@ uv add swarmauri_toolkit_github
82
83
  uv pip install swarmauri_toolkit_github
83
84
  ```
84
85
 
85
- > Tip: `python-dotenv` is imported automatically—drop your token into a local `.env` file (`GITHUB_TOKEN=ghp_...`) for quick experimentation.
86
+ > Tip: `python-dotenv` is imported automatically?drop your token into a local `.env` file (`GITHUB_TOKEN=ghp_...`) for quick experimentation.
86
87
 
87
88
  ## Quick Start
88
89
 
@@ -185,11 +186,13 @@ Keep a backlog tidy by automatically nudging stale tickets.
185
186
 
186
187
  ## Troubleshooting
187
188
 
188
- - **`ValueError: Invalid Token or Missing api_token`** – Pass the token explicitly (`GithubToolkit(api_token=...)`) or export `GITHUB_TOKEN` before instantiating the toolkit.
189
- - **PyGithub exception messages** – Most actions bubble up PyGithub errors verbatim (permission issues, missing branches, etc.). Inspect the text in the returned string to resolve scope or naming problems.
190
- - **GitHub rate limits** – PyGithub tracks remaining requests; consider batching actions or sleeping when `Github.get_rate_limit()` indicates low headroom.
189
+ - **`ValueError: Invalid Token or Missing api_token`** ? Pass the token explicitly (`GithubToolkit(api_token=...)`) or export `GITHUB_TOKEN` before instantiating the toolkit.
190
+ - **PyGithub exception messages** ? Most actions bubble up PyGithub errors verbatim (permission issues, missing branches, etc.). Inspect the text in the returned string to resolve scope or naming problems.
191
+ - **GitHub rate limits** ? PyGithub tracks remaining requests; consider batching actions or sleeping when `Github.get_rate_limit()` indicates low headroom.
191
192
 
192
193
  ## License
193
194
 
194
195
  `swarmauri_toolkit_github` is released under the Apache 2.0 License. See `LICENSE` for full details.
195
196
 
197
+
198
+
@@ -0,0 +1,12 @@
1
+ swarmauri_toolkit_github/GithubBranchTool.py,sha256=L2V-YvOAqumJo-wybSzMXlOnCdPNIOgbhQyCRDArzT8,4244
2
+ swarmauri_toolkit_github/GithubCommitTool.py,sha256=C8sqi74eFswJlltQiWdqd9D49qnwwPPsDiAJ2ctK3xo,5254
3
+ swarmauri_toolkit_github/GithubIssueTool.py,sha256=Cdv9-lvsUA3lU9vqOp2YGS4Oy4Q55HUJccc7fZPs5QQ,4656
4
+ swarmauri_toolkit_github/GithubPRTool.py,sha256=_SWEDNVDwSlvyimW7VZYkcCKAaQ6jb5oj-dsf-Hz6oQ,5265
5
+ swarmauri_toolkit_github/GithubRepoTool.py,sha256=I6ZmwFaEOicIJXkpqmlLTU1JtGugonBmRxgu2btqRro,4218
6
+ swarmauri_toolkit_github/GithubToolkit.py,sha256=gXLnqbHfNzMM979rDrRpioFnW20O8Qkw9IOVxsjmoP0,1852
7
+ swarmauri_toolkit_github/__init__.py,sha256=ugR4rSIjWjFsklYq1zKlDuNwi2ao9NnzEcgQdGAtVgY,836
8
+ swarmauri_toolkit_github-0.11.0.dev1.dist-info/METADATA,sha256=RXfPtdBL9bEUASk-kIhBN5rvny9qc5Izl-5Klec0QGc,7316
9
+ swarmauri_toolkit_github-0.11.0.dev1.dist-info/WHEEL,sha256=eY7nduwzv-ldUxpzbRlxwvC693Hg6PX8bWDjEHjZ_dk,88
10
+ swarmauri_toolkit_github-0.11.0.dev1.dist-info/entry_points.txt,sha256=2xC828KqwS3K-0qhlcdqbKhtoQhkzst3Y0i0KfCzXNI,467
11
+ swarmauri_toolkit_github-0.11.0.dev1.dist-info/licenses/LICENSE,sha256=djUXOlCxLVszShEpZXshZ7v33G-2qIC_j9KXpWKZSzQ,11359
12
+ swarmauri_toolkit_github-0.11.0.dev1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.4.0
2
+ Generator: poetry-core 2.4.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,12 +0,0 @@
1
- swarmauri_toolkit_github/GithubBranchTool.py,sha256=kAb-iBP7SVNqFP9JT3jZkIZUsHquTI74oB-ttd_5mBw,4078
2
- swarmauri_toolkit_github/GithubCommitTool.py,sha256=M6QXm_upD1QInenheQ2dWJq1BZDGWq6wG0kb-g7AXzQ,5065
3
- swarmauri_toolkit_github/GithubIssueTool.py,sha256=Xgu2kPZqdtjy9Hj6LGjcZFuu7cw7DW9-67ywkmE4Ppw,4493
4
- swarmauri_toolkit_github/GithubPRTool.py,sha256=ptSPk7FabS9OJ1Qdf34ydfYONbNu9r2xsnSN8aibGn4,5012
5
- swarmauri_toolkit_github/GithubRepoTool.py,sha256=YqkQN4tqSnzMK01azjrtO7iTFbAay_psAB8YXo7Jj3k,3961
6
- swarmauri_toolkit_github/GithubToolkit.py,sha256=gXLnqbHfNzMM979rDrRpioFnW20O8Qkw9IOVxsjmoP0,1852
7
- swarmauri_toolkit_github/__init__.py,sha256=ugR4rSIjWjFsklYq1zKlDuNwi2ao9NnzEcgQdGAtVgY,836
8
- swarmauri_toolkit_github-0.9.1.dev3.dist-info/METADATA,sha256=1QH_L8UHTwnsD3FxxWc1fFcSy8OvQTXCSgW9g5QbYaU,7197
9
- swarmauri_toolkit_github-0.9.1.dev3.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
10
- swarmauri_toolkit_github-0.9.1.dev3.dist-info/entry_points.txt,sha256=2xC828KqwS3K-0qhlcdqbKhtoQhkzst3Y0i0KfCzXNI,467
11
- swarmauri_toolkit_github-0.9.1.dev3.dist-info/licenses/LICENSE,sha256=djUXOlCxLVszShEpZXshZ7v33G-2qIC_j9KXpWKZSzQ,11359
12
- swarmauri_toolkit_github-0.9.1.dev3.dist-info/RECORD,,