render-lab-tasks-github 0.1.0__tar.gz → 0.1.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.
Files changed (43) hide show
  1. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/PKG-INFO +33 -6
  2. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/README.md +29 -4
  3. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/pyproject.toml +6 -2
  4. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/client.py +689 -0
  5. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/comment_on_issue.py +18 -0
  6. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/commit_file.py +18 -0
  7. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/commit_files.py +18 -0
  8. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/create_branch.py +18 -0
  9. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/create_issue.py +18 -0
  10. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/delete_branch.py +18 -0
  11. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/delete_repository.py +20 -0
  12. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/dispatch_workflow.py +18 -0
  13. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/ensure_organization_repository.py +20 -0
  14. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/get_branch.py +18 -0
  15. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/get_file_contents.py +18 -0
  16. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/get_issue.py +18 -0
  17. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/get_pr.py +18 -0
  18. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/get_repository.py +18 -0
  19. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/list_organization_repositories.py +20 -0
  20. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/list_prs.py +18 -0
  21. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/list_tree.py +18 -0
  22. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/merge_when_green.py +18 -0
  23. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/open_pr.py +18 -0
  24. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/review_pr.py +18 -0
  25. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/search_code.py +18 -0
  26. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/search_repositories.py +20 -0
  27. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/tasks.py +89 -0
  28. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/types.py +393 -0
  29. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/update_issue.py +18 -0
  30. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/update_repository.py +20 -0
  31. render_lab_tasks_github-0.1.2/src/render_lab_tasks_github/webhooks.py +35 -0
  32. render_lab_tasks_github-0.1.0/src/render_lab_tasks_github/client.py +0 -118
  33. render_lab_tasks_github-0.1.0/src/render_lab_tasks_github/tasks.py +0 -7
  34. render_lab_tasks_github-0.1.0/src/render_lab_tasks_github/types.py +0 -28
  35. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/.gitignore +0 -0
  36. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/LICENSE +0 -0
  37. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/src/render_lab_tasks_github/__init__.py +0 -0
  38. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/src/render_lab_tasks_github/_app.py +0 -0
  39. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/src/render_lab_tasks_github/apply_labels.py +0 -0
  40. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/src/render_lab_tasks_github/list_new_issues.py +0 -0
  41. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/src/render_lab_tasks_github/py.typed +0 -0
  42. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/src/render_lab_tasks_github/retry.py +0 -0
  43. {render_lab_tasks_github-0.1.0 → render_lab_tasks_github-0.1.2}/tests/test_github.py +0 -0
@@ -1,24 +1,27 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: render-lab-tasks-github
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: GitHub issue tasks for Render Workflows
5
5
  Project-URL: Repository, https://github.com/render-lab/render-tasks-python
6
6
  License-Expression: MIT
7
7
  License-File: LICENSE
8
8
  Requires-Python: >=3.12
9
9
  Requires-Dist: httpx<0.29,>=0.28
10
- Requires-Dist: render==1.0.1
10
+ Requires-Dist: render-lab-tasks-core<0.2,>=0.1.1
11
+ Requires-Dist: render-lab-triggers<0.2,>=0.1.0
12
+ Requires-Dist: render<2,>=1.0.1
11
13
  Description-Content-Type: text/markdown
12
14
 
13
15
  # render-lab-tasks-github
14
16
 
15
- GitHub issue tasks for Render Workflows. Initial subset: `github.listNewIssues`
16
- and `github.applyLabels`. Other TypeScript GitHub tasks have not yet been ported.
17
+ GitHub tasks for Render Workflows. Version 0.1.1 implements all 26 registered
18
+ tasks and the registration-free webhook adapter. Version 0.1.0 contained only
19
+ the original issue-list/label subset.
17
20
 
18
- This distribution is not yet on PyPI. From this repository:
21
+ Install from [PyPI](https://pypi.org/project/render-lab-tasks-github/) with Python 3.12+:
19
22
 
20
23
  ```sh
21
- uv pip install ./packages/tasks-github
24
+ pip install render-lab-tasks-github==0.1.1
22
25
  ```
23
26
 
24
27
  ```python
@@ -76,3 +79,27 @@ if isinstance(issues, dict):
76
79
  ```
77
80
 
78
81
  Both examples include this workaround. See [ADR-0005](../../docs/adr/0005-sdk-singleton-list-results.md).
82
+
83
+ ## Repository and PR operations
84
+
85
+ The expanded pack covers repositories, organization inventory, branches, file
86
+ reads/writes, atomic multi-file commits, PRs/reviews/merges, workflow dispatch,
87
+ search, and issue comments/updates. Raw implementations accept `GitHubDeps`.
88
+ `GITHUB_TOKEN` remains lazy; public reads can run unauthenticated. Search and
89
+ writes require the appropriate token permissions.
90
+
91
+ `commit_files` rejects empty/duplicate/traversing paths, limits decoded content
92
+ to 3,500,000 bytes, and optionally checks the expected branch head. It creates
93
+ blobs/tree/commit before updating the branch without forcing it. Branch creation
94
+ and deletion handle already-existing/missing resources. `merge_when_green`
95
+ performs one checks/status read per attempt before merging. No live repository
96
+ writes or merges were used for this port.
97
+
98
+ ## Webhook adapter
99
+
100
+ `render_lab_tasks_github.webhooks.github_adapter(on_event, ...)` returns a
101
+ registration-free adapter for `render_lab_triggers`. The callback receives the
102
+ verified event and returns `{"task": "namespace.task", "args": [event]}` or `None`.
103
+ The signing credential `GITHUB_WEBHOOK_SECRET` is read inside verification unless
104
+ provided explicitly. Importing this module does not register tasks. Signature
105
+ checks use the raw body; live delivery remains in the testing backlog.
@@ -1,12 +1,13 @@
1
1
  # render-lab-tasks-github
2
2
 
3
- GitHub issue tasks for Render Workflows. Initial subset: `github.listNewIssues`
4
- and `github.applyLabels`. Other TypeScript GitHub tasks have not yet been ported.
3
+ GitHub tasks for Render Workflows. Version 0.1.1 implements all 26 registered
4
+ tasks and the registration-free webhook adapter. Version 0.1.0 contained only
5
+ the original issue-list/label subset.
5
6
 
6
- This distribution is not yet on PyPI. From this repository:
7
+ Install from [PyPI](https://pypi.org/project/render-lab-tasks-github/) with Python 3.12+:
7
8
 
8
9
  ```sh
9
- uv pip install ./packages/tasks-github
10
+ pip install render-lab-tasks-github==0.1.1
10
11
  ```
11
12
 
12
13
  ```python
@@ -64,3 +65,27 @@ if isinstance(issues, dict):
64
65
  ```
65
66
 
66
67
  Both examples include this workaround. See [ADR-0005](../../docs/adr/0005-sdk-singleton-list-results.md).
68
+
69
+ ## Repository and PR operations
70
+
71
+ The expanded pack covers repositories, organization inventory, branches, file
72
+ reads/writes, atomic multi-file commits, PRs/reviews/merges, workflow dispatch,
73
+ search, and issue comments/updates. Raw implementations accept `GitHubDeps`.
74
+ `GITHUB_TOKEN` remains lazy; public reads can run unauthenticated. Search and
75
+ writes require the appropriate token permissions.
76
+
77
+ `commit_files` rejects empty/duplicate/traversing paths, limits decoded content
78
+ to 3,500,000 bytes, and optionally checks the expected branch head. It creates
79
+ blobs/tree/commit before updating the branch without forcing it. Branch creation
80
+ and deletion handle already-existing/missing resources. `merge_when_green`
81
+ performs one checks/status read per attempt before merging. No live repository
82
+ writes or merges were used for this port.
83
+
84
+ ## Webhook adapter
85
+
86
+ `render_lab_tasks_github.webhooks.github_adapter(on_event, ...)` returns a
87
+ registration-free adapter for `render_lab_triggers`. The callback receives the
88
+ verified event and returns `{"task": "namespace.task", "args": [event]}` or `None`.
89
+ The signing credential `GITHUB_WEBHOOK_SECRET` is read inside verification unless
90
+ provided explicitly. Importing this module does not register tasks. Signature
91
+ checks use the raw body; live delivery remains in the testing backlog.
@@ -4,16 +4,20 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "render-lab-tasks-github"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  description = "GitHub issue tasks for Render Workflows"
9
9
  readme = "README.md"
10
10
  license = "MIT"
11
11
  license-files = ["LICENSE"]
12
12
  requires-python = ">=3.12"
13
- dependencies = ["render==1.0.1", "httpx>=0.28,<0.29"]
13
+ dependencies = ["render-lab-triggers>=0.1.0,<0.2", "render-lab-tasks-core>=0.1.1,<0.2","render>=1.0.1,<2", "httpx>=0.28,<0.29"]
14
14
 
15
15
  [project.urls]
16
16
  Repository = "https://github.com/render-lab/render-tasks-python"
17
17
 
18
18
  [tool.hatch.build.targets.wheel]
19
19
  packages = ["src/render_lab_tasks_github"]
20
+
21
+ [tool.uv.sources]
22
+ render-lab-triggers = { workspace = true }
23
+ render-lab-tasks-core = { workspace = true }