swarmauri_tool_containermakepr 0.11.0.dev1__tar.gz → 0.11.0.dev4__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.
- {swarmauri_tool_containermakepr-0.11.0.dev1 → swarmauri_tool_containermakepr-0.11.0.dev4}/PKG-INFO +4 -4
- {swarmauri_tool_containermakepr-0.11.0.dev1 → swarmauri_tool_containermakepr-0.11.0.dev4}/pyproject.toml +4 -4
- {swarmauri_tool_containermakepr-0.11.0.dev1 → swarmauri_tool_containermakepr-0.11.0.dev4}/swarmauri_tool_containermakepr/ContainerMakePrTool.py +16 -0
- {swarmauri_tool_containermakepr-0.11.0.dev1 → swarmauri_tool_containermakepr-0.11.0.dev4}/LICENSE +0 -0
- {swarmauri_tool_containermakepr-0.11.0.dev1 → swarmauri_tool_containermakepr-0.11.0.dev4}/README.md +0 -0
- {swarmauri_tool_containermakepr-0.11.0.dev1 → swarmauri_tool_containermakepr-0.11.0.dev4}/swarmauri_tool_containermakepr/__init__.py +0 -0
{swarmauri_tool_containermakepr-0.11.0.dev1 → swarmauri_tool_containermakepr-0.11.0.dev4}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: swarmauri_tool_containermakepr
|
|
3
|
-
Version: 0.11.0.
|
|
3
|
+
Version: 0.11.0.dev4
|
|
4
4
|
Summary: Create GitHub pull requests from containers.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -17,9 +17,9 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
-
Requires-Dist: swarmauri_base
|
|
21
|
-
Requires-Dist: swarmauri_core
|
|
22
|
-
Requires-Dist: swarmauri_standard
|
|
20
|
+
Requires-Dist: swarmauri_base (>=0.11.0.dev6,<0.12)
|
|
21
|
+
Requires-Dist: swarmauri_core (>=0.11.0.dev6,<0.12)
|
|
22
|
+
Requires-Dist: swarmauri_standard (>=0.11.0.dev8,<0.12)
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
|
|
25
25
|

|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "swarmauri_tool_containermakepr"
|
|
3
|
-
version = "0.11.0.
|
|
3
|
+
version = "0.11.0.dev4"
|
|
4
4
|
description = "Create GitHub pull requests from containers."
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
readme = "README.md"
|
|
@@ -19,9 +19,9 @@ classifiers = [
|
|
|
19
19
|
]
|
|
20
20
|
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
21
21
|
dependencies = [
|
|
22
|
-
"swarmauri_core",
|
|
23
|
-
"swarmauri_base",
|
|
24
|
-
"swarmauri_standard",
|
|
22
|
+
"swarmauri_core>=0.11.0.dev6,<0.12",
|
|
23
|
+
"swarmauri_base>=0.11.0.dev6,<0.12",
|
|
24
|
+
"swarmauri_standard>=0.11.0.dev8,<0.12",
|
|
25
25
|
]
|
|
26
26
|
keywords = [
|
|
27
27
|
'swarmauri',
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import subprocess
|
|
2
2
|
from typing import List, Literal
|
|
3
|
+
from swarmauri_base.processes.collect_process import collect_process
|
|
4
|
+
from swarmauri_core.processes import IProcessBackend, ProcessRequest
|
|
5
|
+
|
|
3
6
|
from pydantic import Field
|
|
4
7
|
from swarmauri_base.tools.ToolBase import ToolBase
|
|
5
8
|
from swarmauri_standard.tools.Parameter import Parameter
|
|
@@ -15,6 +18,8 @@ class ContainerMakePrTool(ToolBase):
|
|
|
15
18
|
description: str = "Create a GitHub pull request from a container."
|
|
16
19
|
type: Literal["ContainerMakePrTool"] = "ContainerMakePrTool"
|
|
17
20
|
|
|
21
|
+
backend: IProcessBackend | None = Field(default=None, exclude=True)
|
|
22
|
+
|
|
18
23
|
driver: Literal["docker", "kubernetes"] = "docker"
|
|
19
24
|
|
|
20
25
|
container_name: str | None = Field(
|
|
@@ -50,6 +55,17 @@ class ContainerMakePrTool(ToolBase):
|
|
|
50
55
|
name = container_name or self.container_name
|
|
51
56
|
if name is None:
|
|
52
57
|
raise ValueError("container_name must be provided")
|
|
58
|
+
if self.backend is not None:
|
|
59
|
+
stdout, stderr, event = collect_process(
|
|
60
|
+
self.backend,
|
|
61
|
+
ProcessRequest(
|
|
62
|
+
("gh", "pr", "create", "--title", title, "--body", body),
|
|
63
|
+
workspace=name,
|
|
64
|
+
),
|
|
65
|
+
)
|
|
66
|
+
if event.exit_code != 0:
|
|
67
|
+
raise RuntimeError(stderr.decode(errors="replace").strip())
|
|
68
|
+
return {"stdout": stdout.decode(errors="replace").strip()}
|
|
53
69
|
if self.driver == "docker":
|
|
54
70
|
cmd = [
|
|
55
71
|
"docker",
|
{swarmauri_tool_containermakepr-0.11.0.dev1 → swarmauri_tool_containermakepr-0.11.0.dev4}/LICENSE
RENAMED
|
File without changes
|
{swarmauri_tool_containermakepr-0.11.0.dev1 → swarmauri_tool_containermakepr-0.11.0.dev4}/README.md
RENAMED
|
File without changes
|