github-haystack 1.0.0__tar.gz → 1.0.1__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.
Files changed (41) hide show
  1. github_haystack-1.0.1/CHANGELOG.md +9 -0
  2. {github_haystack-1.0.0 → github_haystack-1.0.1}/PKG-INFO +1 -1
  3. {github_haystack-1.0.0 → github_haystack-1.0.1}/pyproject.toml +26 -21
  4. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/prompts/github/issue_commenter_prompt.py +7 -5
  5. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/prompts/github/issue_viewer_prompt.py +6 -6
  6. {github_haystack-1.0.0 → github_haystack-1.0.1}/.gitignore +0 -0
  7. {github_haystack-1.0.0 → github_haystack-1.0.1}/LICENSE.txt +0 -0
  8. {github_haystack-1.0.0 → github_haystack-1.0.1}/README.md +0 -0
  9. {github_haystack-1.0.0 → github_haystack-1.0.1}/pydoc/config.yml +0 -0
  10. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/components/connectors/github/__init__.py +0 -0
  11. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/components/connectors/github/file_editor.py +0 -0
  12. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/components/connectors/github/issue_commenter.py +0 -0
  13. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/components/connectors/github/issue_viewer.py +0 -0
  14. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/components/connectors/github/pr_creator.py +0 -0
  15. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/components/connectors/github/repo_forker.py +0 -0
  16. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/components/connectors/github/repo_viewer.py +0 -0
  17. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/prompts/github/__init__.py +0 -0
  18. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/prompts/github/context_prompt.py +0 -0
  19. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/prompts/github/file_editor_prompt.py +0 -0
  20. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/prompts/github/pr_creator_prompt.py +0 -0
  21. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/prompts/github/repo_viewer_prompt.py +0 -0
  22. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/prompts/github/system_prompt.py +0 -0
  23. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/tools/github/__init__.py +0 -0
  24. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/tools/github/file_editor_tool.py +0 -0
  25. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/tools/github/issue_commenter_tool.py +0 -0
  26. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/tools/github/issue_viewer_tool.py +0 -0
  27. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/tools/github/pr_creator_tool.py +0 -0
  28. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/tools/github/repo_viewer_tool.py +0 -0
  29. {github_haystack-1.0.0 → github_haystack-1.0.1}/src/haystack_integrations/tools/github/utils.py +0 -0
  30. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/__init__.py +0 -0
  31. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_file_editor.py +0 -0
  32. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_file_editor_tool.py +0 -0
  33. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_issue_commenter.py +0 -0
  34. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_issue_commenter_tool.py +0 -0
  35. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_issue_viewer.py +0 -0
  36. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_issue_viewer_tool.py +0 -0
  37. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_pr_creator.py +0 -0
  38. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_pr_creator_tool.py +0 -0
  39. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_repo_forker.py +0 -0
  40. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_repo_viewer.py +0 -0
  41. {github_haystack-1.0.0 → github_haystack-1.0.1}/tests/test_repo_viewer_tool.py +0 -0
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## [integrations/github-v1.0.0] - 2025-05-28
4
+
5
+ ### 🚀 Features
6
+
7
+ - Add GitHub integration with components, tools, and prompts (#1637)
8
+
9
+ <!-- generated by git-cliff -->
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-haystack
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Haystack components for interacting with GitHub repositories
5
5
  Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations/github
6
6
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/github/README.md
@@ -43,36 +43,41 @@ git_describe_command = 'git describe --tags --match="integrations/github-v[0-9]*
43
43
 
44
44
  [tool.hatch.envs.default]
45
45
  installer = "uv"
46
- dependencies = [
47
- "coverage[toml]>=6.5",
48
- "pytest",
49
- "pytest-rerunfailures",
50
- "haystack-pydoc-tools",
51
- "pytz",
52
- ]
53
-
46
+ dependencies = ["haystack-pydoc-tools", "ruff"]
47
+
54
48
  [tool.hatch.envs.default.scripts]
55
- test = "pytest {args:tests}"
56
- test-cov = "coverage run -m pytest {args:tests}"
57
- test-cov-retry = "test-cov --reruns 3 --reruns-delay 30 -x"
58
- cov-report = ["- coverage combine", "coverage report"]
59
- cov = ["test-cov", "cov-report"]
60
- cov-retry = ["test-cov-retry", "cov-report"]
61
49
  docs = ["pydoc-markdown pydoc/config.yml"]
62
- fix = "ruff check --fix"
50
+ fmt = "ruff check --fix {args} && ruff format {args}"
51
+ fmt-check = "ruff check {args} && ruff format --check {args}"
52
+
53
+ [tool.hatch.envs.test]
54
+ dependencies = [
55
+ "pytest",
56
+ "pytest-asyncio",
57
+ "pytest-cov",
58
+ "pytest-rerunfailures",
59
+ "mypy",
60
+ "pip"
61
+ ]
63
62
 
63
+ [tool.hatch.envs.test.scripts]
64
+ unit = 'pytest -m "not integration" {args:tests}'
65
+ integration = 'pytest -m "integration" {args:tests}'
66
+ all = 'pytest {args:tests}'
67
+ cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
68
+
69
+ types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
70
+
71
+ # TODO: remove lint environment once this integration is properly typed
72
+ # test environment should be used instead
73
+ # https://github.com/deepset-ai/haystack-core-integrations/issues/1771
64
74
  [tool.hatch.envs.lint]
65
75
  installer = "uv"
66
76
  detached = true
67
77
  dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
78
+
68
79
  [tool.hatch.envs.lint.scripts]
69
80
  typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
70
- style = [
71
- "ruff check {args:}",
72
- "black --check --diff {args:.}",
73
- ]
74
- fmt = ["black {args:.}", "ruff check --fix {args:}", "style"]
75
- all = ["style", "typing"]
76
81
 
77
82
  [tool.black]
78
83
  target-version = ["py38"]
@@ -4,18 +4,20 @@
4
4
  ISSUE_COMMENTER_PROMPT = """Haystack-Agent uses this tool to post a comment to a GitHub-issue discussion.
5
5
 
6
6
  <usage>
7
- Pass a `comment` string to post a comment.
7
+ Pass a `comment` string and a `url` string to post a comment to a GitHub issue.
8
8
  </usage>
9
9
 
10
10
  IMPORTANT
11
- Haystack-Agent MUST pass "comment" to this tool. Otherwise, comment creation fails.
12
- Haystack-Agent always passes the contents of the comment to the "comment" parameter when calling this tool.
11
+ Haystack-Agent MUST pass "comment" and "url" to this tool. Otherwise, comment creation fails.
12
+ Haystack-Agent always passes the contents of the comment to the "comment" parameter and
13
+ the URL of the GitHub issue to the "url" parameter when calling this tool.
13
14
  """
14
15
 
15
16
  ISSUE_COMMENTER_SCHEMA = {
16
17
  "properties": {
17
- "comment": {"type": "string", "description": "The contents of the comment that you want to create."}
18
+ "comment": {"type": "string", "description": "The contents of the comment that you want to create."},
19
+ "url": {"type": "string", "description": "URL of the GitHub issue to comment on."},
18
20
  },
19
- "required": ["comment"],
21
+ "required": ["comment", "url"],
20
22
  "type": "object",
21
23
  }
@@ -5,21 +5,21 @@ ISSUE_VIEWER_PROMPT = """Haystack-Agent uses this tool to view a GitHub issue.
5
5
  Haystack-Agent can view one issue at a time.
6
6
 
7
7
  <usage>
8
- Pass an `issue_url` string for the GitHub issue that you want to view.
9
- It is required to pass `issue_url` to use this tool.
8
+ Pass an `url` string for the GitHub issue that you want to view.
9
+ It is required to pass `url` to use this tool.
10
10
  The structure is "https://github.com/repo-owner/repo-name/issues/issue-number".
11
11
 
12
12
  Examples:
13
13
 
14
- - {"issue_url": "https://github.com/deepset-ai/haystack/issues/9343"}
14
+ - {"url": "https://github.com/deepset-ai/haystack/issues/9343"}
15
15
  - will show you the issue 9343 of the haystack repository
16
- - {"issue_url": "https://github.com/deepset-ai/haystack-core-integrations/issues/1685"}
16
+ - {"url": "https://github.com/deepset-ai/haystack-core-integrations/issues/1685"}
17
17
  - will show you the issue 1685 of the haystack-core-integrations repository
18
18
  </usage>
19
19
  """
20
20
 
21
21
  ISSUE_VIEWER_SCHEMA = {
22
- "properties": {"issue_url": {"type": "string", "description": "URL of the GitHub issue to link the PR to."}},
23
- "required": ["issue_url"],
22
+ "properties": {"url": {"type": "string", "description": "URL of the GitHub issue to link the PR to."}},
23
+ "required": ["url"],
24
24
  "type": "object",
25
25
  }