swarmauri_toolkit_github 0.8.0.dev4__tar.gz → 0.8.2__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.
@@ -0,0 +1,192 @@
1
+ Metadata-Version: 2.4
2
+ Name: swarmauri_toolkit_github
3
+ Version: 0.8.2
4
+ Summary: Github Toolkit
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ Keywords: swarmauri,toolkit,github
8
+ Author: Jacob Stewart
9
+ Author-email: jacob@swarmauri.com
10
+ Requires-Python: >=3.10,<3.13
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Natural Language :: English
16
+ Classifier: Development Status :: 3 - Alpha
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
19
+ Requires-Dist: pygithub (>=2.4.0)
20
+ Requires-Dist: swarmauri_base
21
+ Requires-Dist: swarmauri_core
22
+ Requires-Dist: swarmauri_standard
23
+ Description-Content-Type: text/markdown
24
+
25
+ ![Swarmauri Logo](https://github.com/swarmauri/swarmauri-sdk/blob/3d4d1cfa949399d7019ae9d8f296afba773dfb7f/assets/swarmauri.brand.theme.svg)
26
+
27
+ <p align="center">
28
+ <a href="https://pypi.org/project/swarmauri_toolkit_github/">
29
+ <img src="https://img.shields.io/pypi/dm/swarmauri_toolkit_github" alt="PyPI - Downloads"/></a>
30
+ <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_github/">
31
+ <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_github.svg"/></a>
32
+ <a href="https://pypi.org/project/swarmauri_toolkit_github/">
33
+ <img src="https://img.shields.io/pypi/pyversions/swarmauri_toolkit_github" alt="PyPI - Python Version"/></a>
34
+ <a href="https://pypi.org/project/swarmauri_toolkit_github/">
35
+ <img src="https://img.shields.io/pypi/l/swarmauri_toolkit_github" alt="PyPI - License"/></a>
36
+ <a href="https://pypi.org/project/swarmauri_toolkit_github/">
37
+ <img src="https://img.shields.io/pypi/v/swarmauri_toolkit_github?label=swarmauri_toolkit_github&color=green" alt="PyPI - swarmauri_toolkit_github"/></a>
38
+ </p>
39
+
40
+ ---
41
+
42
+ # Swarmauri Toolkit · GitHub
43
+
44
+ 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.
45
+
46
+ - Creates a shared GitHub client so every tool call reuses the same token and rate-limit state.
47
+ - Normalizes responses into dictionaries so downstream logic can inspect status messages or raw PyGithub payloads.
48
+ - Covers common actions (create/list/update/delete) while staying extensible via the `action` parameter on each tool.
49
+
50
+ ## Requirements
51
+
52
+ - Python 3.10 – 3.13.
53
+ - GitHub personal access token (classic or fine-grained) with the scopes your workflow requires. Store it in an environment variable such as `GITHUB_TOKEN`.
54
+ - Runtime dependencies (`PyGithub`, `python-dotenv`, and the Swarmauri base/standard packages) install automatically with the toolkit.
55
+
56
+ ## Installation
57
+
58
+ Choose any of the supported packaging flows; each command resolves transitive dependencies.
59
+
60
+ **pip**
61
+
62
+ ```bash
63
+ pip install swarmauri_toolkit_github
64
+ ```
65
+
66
+ **Poetry**
67
+
68
+ ```bash
69
+ poetry add swarmauri_toolkit_github
70
+ ```
71
+
72
+ **uv**
73
+
74
+ ```bash
75
+ # Add to the current project and update uv.lock
76
+ uv add swarmauri_toolkit_github
77
+
78
+ # or install into the active environment without editing pyproject.toml
79
+ uv pip install swarmauri_toolkit_github
80
+ ```
81
+
82
+ > Tip: `python-dotenv` is imported automatically—drop your token into a local `.env` file (`GITHUB_TOKEN=ghp_...`) for quick experimentation.
83
+
84
+ ## Quick Start
85
+
86
+ ```python
87
+ import os
88
+ from swarmauri_toolkit_github import GithubToolkit
89
+
90
+ toolkit = GithubToolkit(api_token=os.environ["GITHUB_TOKEN"])
91
+
92
+ # List repositories for the authenticated user
93
+ repos = toolkit.github_repo_tool(action="list_repos")
94
+ print(repos["list_repos"])
95
+
96
+ # Open a tracking issue
97
+ issue = toolkit.github_issue_tool(
98
+ action="create_issue",
99
+ repo_name="owner/example",
100
+ title="Investigate flaky tests",
101
+ body="Logs: https://gist.github.com/..."
102
+ )
103
+ print(issue["create_issue"])
104
+ ```
105
+
106
+ Each sub-tool accepts an `action` argument (see PyGithub docs for additional options) and returns a dictionary keyed by that action for ergonomic unpacking.
107
+
108
+ ## Usage Scenarios
109
+
110
+ ### Automate Release Housekeeping
111
+
112
+ ```python
113
+ from swarmauri_toolkit_github import GithubToolkit
114
+
115
+ toolkit = GithubToolkit(api_token=os.environ["GITHUB_TOKEN"])
116
+
117
+ # Create a release branch
118
+ toolkit.github_branch_tool(
119
+ action="create_branch",
120
+ repo_name="owner/service",
121
+ new_branch="release/v1.4.0",
122
+ source_branch="master"
123
+ )
124
+
125
+ # Cut a changelog commit
126
+ toolkit.github_commit_tool(
127
+ action="create_file",
128
+ repo_name="owner/service",
129
+ path="CHANGELOG.md",
130
+ message="Add release notes",
131
+ content="### v1.4.0\n- New features...",
132
+ branch="release/v1.4.0"
133
+ )
134
+ ```
135
+
136
+ ### Drive GitHub From a Swarmauri Agent
137
+
138
+ ```python
139
+ from swarmauri_core.agent.Agent import Agent
140
+ from swarmauri_core.messages.HumanMessage import HumanMessage
141
+ from swarmauri_standard.tools.registry import ToolRegistry
142
+ from swarmauri_toolkit_github import GithubToolkit
143
+
144
+ toolkit = GithubToolkit(api_token=os.environ["GITHUB_TOKEN"])
145
+ registry = ToolRegistry()
146
+ registry.register(toolkit.github_issue_tool)
147
+ registry.register(toolkit.github_pr_tool)
148
+
149
+ agent = Agent(tool_registry=registry)
150
+ response = agent.run(HumanMessage(content="Open a PR from feature/auth to master"))
151
+ print(response)
152
+ ```
153
+
154
+ Enable conversational workflows that translate natural-language requests into GitHub mutations.
155
+
156
+ ### Triage Issues Nightly
157
+
158
+ ```python
159
+ from datetime import datetime, timedelta
160
+ from swarmauri_toolkit_github import GithubToolkit
161
+
162
+ toolkit = GithubToolkit(api_token=os.environ["GITHUB_TOKEN"])
163
+ cutoff = datetime.utcnow() - timedelta(days=7)
164
+
165
+ issues = toolkit.github_issue_tool(
166
+ action="list",
167
+ repo_name="owner/product",
168
+ state="open"
169
+ )["list"]
170
+
171
+ stale = [issue for issue in issues if issue.updated_at < cutoff]
172
+ for issue in stale:
173
+ toolkit.github_issue_tool(
174
+ action="create_comment",
175
+ repo_name="owner/product",
176
+ number=issue.number,
177
+ body="Ping! Any update in the last week?"
178
+ )
179
+ ```
180
+
181
+ Keep a backlog tidy by automatically nudging stale tickets.
182
+
183
+ ## Troubleshooting
184
+
185
+ - **`ValueError: Invalid Token or Missing api_token`** – Pass the token explicitly (`GithubToolkit(api_token=...)`) or export `GITHUB_TOKEN` before instantiating the toolkit.
186
+ - **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.
187
+ - **GitHub rate limits** – PyGithub tracks remaining requests; consider batching actions or sleeping when `Github.get_rate_limit()` indicates low headroom.
188
+
189
+ ## License
190
+
191
+ `swarmauri_toolkit_github` is released under the Apache 2.0 License. See `LICENSE` for full details.
192
+
@@ -0,0 +1,167 @@
1
+ ![Swarmauri Logo](https://github.com/swarmauri/swarmauri-sdk/blob/3d4d1cfa949399d7019ae9d8f296afba773dfb7f/assets/swarmauri.brand.theme.svg)
2
+
3
+ <p align="center">
4
+ <a href="https://pypi.org/project/swarmauri_toolkit_github/">
5
+ <img src="https://img.shields.io/pypi/dm/swarmauri_toolkit_github" alt="PyPI - Downloads"/></a>
6
+ <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_github/">
7
+ <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_github.svg"/></a>
8
+ <a href="https://pypi.org/project/swarmauri_toolkit_github/">
9
+ <img src="https://img.shields.io/pypi/pyversions/swarmauri_toolkit_github" alt="PyPI - Python Version"/></a>
10
+ <a href="https://pypi.org/project/swarmauri_toolkit_github/">
11
+ <img src="https://img.shields.io/pypi/l/swarmauri_toolkit_github" alt="PyPI - License"/></a>
12
+ <a href="https://pypi.org/project/swarmauri_toolkit_github/">
13
+ <img src="https://img.shields.io/pypi/v/swarmauri_toolkit_github?label=swarmauri_toolkit_github&color=green" alt="PyPI - swarmauri_toolkit_github"/></a>
14
+ </p>
15
+
16
+ ---
17
+
18
+ # Swarmauri Toolkit · GitHub
19
+
20
+ 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.
21
+
22
+ - Creates a shared GitHub client so every tool call reuses the same token and rate-limit state.
23
+ - Normalizes responses into dictionaries so downstream logic can inspect status messages or raw PyGithub payloads.
24
+ - Covers common actions (create/list/update/delete) while staying extensible via the `action` parameter on each tool.
25
+
26
+ ## Requirements
27
+
28
+ - Python 3.10 – 3.13.
29
+ - GitHub personal access token (classic or fine-grained) with the scopes your workflow requires. Store it in an environment variable such as `GITHUB_TOKEN`.
30
+ - Runtime dependencies (`PyGithub`, `python-dotenv`, and the Swarmauri base/standard packages) install automatically with the toolkit.
31
+
32
+ ## Installation
33
+
34
+ Choose any of the supported packaging flows; each command resolves transitive dependencies.
35
+
36
+ **pip**
37
+
38
+ ```bash
39
+ pip install swarmauri_toolkit_github
40
+ ```
41
+
42
+ **Poetry**
43
+
44
+ ```bash
45
+ poetry add swarmauri_toolkit_github
46
+ ```
47
+
48
+ **uv**
49
+
50
+ ```bash
51
+ # Add to the current project and update uv.lock
52
+ uv add swarmauri_toolkit_github
53
+
54
+ # or install into the active environment without editing pyproject.toml
55
+ uv pip install swarmauri_toolkit_github
56
+ ```
57
+
58
+ > Tip: `python-dotenv` is imported automatically—drop your token into a local `.env` file (`GITHUB_TOKEN=ghp_...`) for quick experimentation.
59
+
60
+ ## Quick Start
61
+
62
+ ```python
63
+ import os
64
+ from swarmauri_toolkit_github import GithubToolkit
65
+
66
+ toolkit = GithubToolkit(api_token=os.environ["GITHUB_TOKEN"])
67
+
68
+ # List repositories for the authenticated user
69
+ repos = toolkit.github_repo_tool(action="list_repos")
70
+ print(repos["list_repos"])
71
+
72
+ # Open a tracking issue
73
+ issue = toolkit.github_issue_tool(
74
+ action="create_issue",
75
+ repo_name="owner/example",
76
+ title="Investigate flaky tests",
77
+ body="Logs: https://gist.github.com/..."
78
+ )
79
+ print(issue["create_issue"])
80
+ ```
81
+
82
+ Each sub-tool accepts an `action` argument (see PyGithub docs for additional options) and returns a dictionary keyed by that action for ergonomic unpacking.
83
+
84
+ ## Usage Scenarios
85
+
86
+ ### Automate Release Housekeeping
87
+
88
+ ```python
89
+ from swarmauri_toolkit_github import GithubToolkit
90
+
91
+ toolkit = GithubToolkit(api_token=os.environ["GITHUB_TOKEN"])
92
+
93
+ # Create a release branch
94
+ toolkit.github_branch_tool(
95
+ action="create_branch",
96
+ repo_name="owner/service",
97
+ new_branch="release/v1.4.0",
98
+ source_branch="master"
99
+ )
100
+
101
+ # Cut a changelog commit
102
+ toolkit.github_commit_tool(
103
+ action="create_file",
104
+ repo_name="owner/service",
105
+ path="CHANGELOG.md",
106
+ message="Add release notes",
107
+ content="### v1.4.0\n- New features...",
108
+ branch="release/v1.4.0"
109
+ )
110
+ ```
111
+
112
+ ### Drive GitHub From a Swarmauri Agent
113
+
114
+ ```python
115
+ from swarmauri_core.agent.Agent import Agent
116
+ from swarmauri_core.messages.HumanMessage import HumanMessage
117
+ from swarmauri_standard.tools.registry import ToolRegistry
118
+ from swarmauri_toolkit_github import GithubToolkit
119
+
120
+ toolkit = GithubToolkit(api_token=os.environ["GITHUB_TOKEN"])
121
+ registry = ToolRegistry()
122
+ registry.register(toolkit.github_issue_tool)
123
+ registry.register(toolkit.github_pr_tool)
124
+
125
+ agent = Agent(tool_registry=registry)
126
+ response = agent.run(HumanMessage(content="Open a PR from feature/auth to master"))
127
+ print(response)
128
+ ```
129
+
130
+ Enable conversational workflows that translate natural-language requests into GitHub mutations.
131
+
132
+ ### Triage Issues Nightly
133
+
134
+ ```python
135
+ from datetime import datetime, timedelta
136
+ from swarmauri_toolkit_github import GithubToolkit
137
+
138
+ toolkit = GithubToolkit(api_token=os.environ["GITHUB_TOKEN"])
139
+ cutoff = datetime.utcnow() - timedelta(days=7)
140
+
141
+ issues = toolkit.github_issue_tool(
142
+ action="list",
143
+ repo_name="owner/product",
144
+ state="open"
145
+ )["list"]
146
+
147
+ stale = [issue for issue in issues if issue.updated_at < cutoff]
148
+ for issue in stale:
149
+ toolkit.github_issue_tool(
150
+ action="create_comment",
151
+ repo_name="owner/product",
152
+ number=issue.number,
153
+ body="Ping! Any update in the last week?"
154
+ )
155
+ ```
156
+
157
+ Keep a backlog tidy by automatically nudging stale tickets.
158
+
159
+ ## Troubleshooting
160
+
161
+ - **`ValueError: Invalid Token or Missing api_token`** – Pass the token explicitly (`GithubToolkit(api_token=...)`) or export `GITHUB_TOKEN` before instantiating the toolkit.
162
+ - **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.
163
+ - **GitHub rate limits** – PyGithub tracks remaining requests; consider batching actions or sleeping when `Github.get_rate_limit()` indicates low headroom.
164
+
165
+ ## License
166
+
167
+ `swarmauri_toolkit_github` is released under the Apache 2.0 License. See `LICENSE` for full details.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "swarmauri_toolkit_github"
3
- version = "0.8.0.dev4"
3
+ version = "0.8.2"
4
4
  description = "Github Toolkit"
5
5
  license = "Apache-2.0"
6
6
  readme = "README.md"
@@ -11,6 +11,10 @@ classifiers = [
11
11
  "Programming Language :: Python :: 3.10",
12
12
  "Programming Language :: Python :: 3.11",
13
13
  "Programming Language :: Python :: 3.12",
14
+ "Natural Language :: English",
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
14
18
  ]
15
19
  authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
16
20
  dependencies = [
@@ -19,6 +23,11 @@ dependencies = [
19
23
  "swarmauri_base",
20
24
  "swarmauri_standard",
21
25
  ]
26
+ keywords = [
27
+ "swarmauri",
28
+ "toolkit",
29
+ "github",
30
+ ]
22
31
 
23
32
  [tool.uv.sources]
24
33
  swarmauri_core = { workspace = true }
@@ -71,7 +71,7 @@ class GithubBranchTool(ToolBase):
71
71
 
72
72
  # Branch Management Methods
73
73
  def create_branch(
74
- self, repo_name: str, branch_name: str, source: str = "main"
74
+ self, repo_name: str, branch_name: str, source: str = "master"
75
75
  ) -> str:
76
76
  try:
77
77
  repo = self._github.get_repo(repo_name)
@@ -106,7 +106,7 @@ class GithubCommitTool(ToolBase):
106
106
  file_path: str,
107
107
  message: str,
108
108
  content: str,
109
- branch: str = "main",
109
+ branch: str = "master",
110
110
  ) -> str:
111
111
  try:
112
112
  repo = self._github.get_repo(repo_name)
@@ -1,85 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: swarmauri_toolkit_github
3
- Version: 0.8.0.dev4
4
- Summary: Github Toolkit
5
- License: Apache-2.0
6
- Author: Jacob Stewart
7
- Author-email: jacob@swarmauri.com
8
- Requires-Python: >=3.10,<3.13
9
- Classifier: License :: OSI Approved :: Apache Software License
10
- Classifier: Programming Language :: Python :: 3.10
11
- Classifier: Programming Language :: Python :: 3.11
12
- Classifier: Programming Language :: Python :: 3.12
13
- Requires-Dist: pygithub (>=2.4.0)
14
- Requires-Dist: swarmauri_base
15
- Requires-Dist: swarmauri_core
16
- Requires-Dist: swarmauri_standard
17
- Description-Content-Type: text/markdown
18
-
19
-
20
- ![Swamauri Logo](https://res.cloudinary.com/dbjmpekvl/image/upload/v1730099724/Swarmauri-logo-lockup-2048x757_hww01w.png)
21
-
22
- <p align="center">
23
- <a href="https://pypi.org/project/swarmauri_toolkit_github/">
24
- <img src="https://img.shields.io/pypi/dm/swarmauri_toolkit_github" alt="PyPI - Downloads"/></a>
25
- <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_github/">
26
- <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_github.svg"/></a>
27
- <a href="https://pypi.org/project/swarmauri_toolkit_github/">
28
- <img src="https://img.shields.io/pypi/pyversions/swarmauri_toolkit_github" alt="PyPI - Python Version"/></a>
29
- <a href="https://pypi.org/project/swarmauri_toolkit_github/">
30
- <img src="https://img.shields.io/pypi/l/swarmauri_toolkit_github" alt="PyPI - License"/></a>
31
- <a href="https://pypi.org/project/swarmauri_toolkit_github/">
32
- <img src="https://img.shields.io/pypi/v/swarmauri_toolkit_github?label=swarmauri_toolkit_github&color=green" alt="PyPI - swarmauri_toolkit_github"/></a>
33
- </p>
34
-
35
- ---
36
-
37
- # Swarmauri Toolkit Github
38
-
39
- A collection of GitHub tools for repository, issue, pull request, branch, and commit management using PyGithub.
40
-
41
- ## Installation
42
-
43
- ```bash
44
- pip install swarmauri_toolkit_github
45
- ```
46
-
47
- ## Usage
48
-
49
- Here's a basic example using the GitHub toolkit:
50
-
51
- ```python
52
- from swarmauri.toolkits.GithubToolkit import GithubToolkit
53
-
54
- # Initialize the toolkit with your GitHub token
55
- toolkit = GithubToolkit(token="your_github_token")
56
-
57
- # Create a repository
58
- result = toolkit.github_repo_tool(
59
- action="create_repo",
60
- repo_name="my-new-repo"
61
- )
62
-
63
- # Create an issue
64
- result = toolkit.github_issue_tool(
65
- action="create_issue",
66
- repo_name="owner/repository",
67
- title="Bug Report",
68
- body="Description of the issue"
69
- )
70
-
71
- # Create a pull request
72
- result = toolkit.github_pr_tool(
73
- action="create_pull",
74
- repo_name="owner/repository",
75
- title="New Feature",
76
- head="feature-branch",
77
- base="main"
78
- )
79
- ```
80
-
81
- ## Want to help?
82
-
83
- If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.
84
-
85
-
@@ -1,66 +0,0 @@
1
-
2
- ![Swamauri Logo](https://res.cloudinary.com/dbjmpekvl/image/upload/v1730099724/Swarmauri-logo-lockup-2048x757_hww01w.png)
3
-
4
- <p align="center">
5
- <a href="https://pypi.org/project/swarmauri_toolkit_github/">
6
- <img src="https://img.shields.io/pypi/dm/swarmauri_toolkit_github" alt="PyPI - Downloads"/></a>
7
- <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_github/">
8
- <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_github.svg"/></a>
9
- <a href="https://pypi.org/project/swarmauri_toolkit_github/">
10
- <img src="https://img.shields.io/pypi/pyversions/swarmauri_toolkit_github" alt="PyPI - Python Version"/></a>
11
- <a href="https://pypi.org/project/swarmauri_toolkit_github/">
12
- <img src="https://img.shields.io/pypi/l/swarmauri_toolkit_github" alt="PyPI - License"/></a>
13
- <a href="https://pypi.org/project/swarmauri_toolkit_github/">
14
- <img src="https://img.shields.io/pypi/v/swarmauri_toolkit_github?label=swarmauri_toolkit_github&color=green" alt="PyPI - swarmauri_toolkit_github"/></a>
15
- </p>
16
-
17
- ---
18
-
19
- # Swarmauri Toolkit Github
20
-
21
- A collection of GitHub tools for repository, issue, pull request, branch, and commit management using PyGithub.
22
-
23
- ## Installation
24
-
25
- ```bash
26
- pip install swarmauri_toolkit_github
27
- ```
28
-
29
- ## Usage
30
-
31
- Here's a basic example using the GitHub toolkit:
32
-
33
- ```python
34
- from swarmauri.toolkits.GithubToolkit import GithubToolkit
35
-
36
- # Initialize the toolkit with your GitHub token
37
- toolkit = GithubToolkit(token="your_github_token")
38
-
39
- # Create a repository
40
- result = toolkit.github_repo_tool(
41
- action="create_repo",
42
- repo_name="my-new-repo"
43
- )
44
-
45
- # Create an issue
46
- result = toolkit.github_issue_tool(
47
- action="create_issue",
48
- repo_name="owner/repository",
49
- title="Bug Report",
50
- body="Description of the issue"
51
- )
52
-
53
- # Create a pull request
54
- result = toolkit.github_pr_tool(
55
- action="create_pull",
56
- repo_name="owner/repository",
57
- title="New Feature",
58
- head="feature-branch",
59
- base="main"
60
- )
61
- ```
62
-
63
- ## Want to help?
64
-
65
- If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.
66
-