render-lab-tasks-github
GitHub issue tasks for Render Workflows. Initial subset: github.listNewIssues
and github.applyLabels. Other TypeScript GitHub tasks have not yet been ported.
This distribution is not yet on PyPI. From this repository:
uv pip install ./packages/tasks-github
from render import TaskContext, Workflows
from render_lab_tasks_github.tasks import app as github_app, list_new_issues
app = Workflows.from_workflows(github_app)
@app.task(name="example.readIssues")
async def read_issues(ctx: TaskContext):
return await ctx.run(list_new_issues, {"repo": "render-oss/sdk", "limit": 5})
Call app.start() from the workflow entry point. Raw list_new_issues_impl and
apply_labels_impl are also exported from .tasks; inject GitHubDeps with a
GitHubPort fake to test or wrap under your own task name. Do not call a wrapped
task directly. Use await ctx.run(task, input).
Contract
list_new_issues takes repo (owner/name), optional sinceISO, and optional
nonnegative integer limit (default 50; explicit null also selects 50, matching
TypeScript). Returns plain issue dictionaries with
number, title, body, url, labels, createdAt, and nullable author.
Lists open issues newest-created first, skips pull requests, and follows pages
until the requested issue count or the end. sinceISO filters by GitHub's
updated-since behavior, matching the TS adapter. Zero limit performs no request.
apply_labels takes repo, issueNumber, and labels. Returns issueNumber
and the requested labels. An empty label list makes no HTTP request. This task
writes when called; dry-run decisions belong to the workflow caller.
Environment
| Variable | Required | Purpose |
|---|---|---|
| GITHUB_TOKEN | For writes/private repos; optional for public reads | GitHub token with permissions for the requested repository/operation |
Credentials are read during calls, never at import. GitHub responses determine permission failures. HTTPX uses a 30-second timeout and no automatic retries. Render retries failed tasks up to three times with a 1000 ms base delay and 2x backoff. Pagination may make multiple requests within an attempt; writes may be retried and callers must account for vendor idempotency.
Render SDK 1.0.1 result limitation
The raw implementation always returns a list. The pinned SDK unwraps a singleton list after a durable child run, so consumers should normalize the result:
issues = await ctx.run(list_new_issues, {"repo": "owner/repo", "limit": 5})
if isinstance(issues, dict):
issues = [issues]
Both examples include this workaround. See ADR-0005.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file render_lab_tasks_github-0.1.0.tar.gz.
File metadata
- Download URL: render_lab_tasks_github-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b6b47a6439361795f42ee8bd17423143d5f6b7f7d6c3dc9de02d7ef9e2db5ad
|
|
| MD5 |
79ca2a12b6ab3e3a3ec63585994d2b56
|
|
| BLAKE2b-256 |
a4b45135f4a530354ae944a54588640d1d4fda0f6a797c6318f410572d34c929
|
Provenance
The following attestation bundles were made for render_lab_tasks_github-0.1.0.tar.gz:
Publisher:
publish.yml on render-lab/render-tasks-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
render_lab_tasks_github-0.1.0.tar.gz -
Subject digest:
9b6b47a6439361795f42ee8bd17423143d5f6b7f7d6c3dc9de02d7ef9e2db5ad - Sigstore transparency entry: 2711055577
- Sigstore integration time:
-
Permalink:
render-lab/render-tasks-python@6edfc03f2dd9272307ade3b69ae7480f7ac7fd85 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/render-lab
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6edfc03f2dd9272307ade3b69ae7480f7ac7fd85 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file render_lab_tasks_github-0.1.0-py3-none-any.whl.
File metadata
- Download URL: render_lab_tasks_github-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b21dbd2915fc389dfe7b542ce2b117a438f7427a55e7dc1612fe714211b2d3ec
|
|
| MD5 |
fb3e68d7b137e81c8f293fa5bcb28822
|
|
| BLAKE2b-256 |
7c1c2850e76c566c2a348c70f42ac903f65318a2d6d1276cad1c2da1b7ec94b0
|
Provenance
The following attestation bundles were made for render_lab_tasks_github-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on render-lab/render-tasks-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
render_lab_tasks_github-0.1.0-py3-none-any.whl -
Subject digest:
b21dbd2915fc389dfe7b542ce2b117a438f7427a55e7dc1612fe714211b2d3ec - Sigstore transparency entry: 2711055868
- Sigstore integration time:
-
Permalink:
render-lab/render-tasks-python@6edfc03f2dd9272307ade3b69ae7480f7ac7fd85 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/render-lab
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6edfc03f2dd9272307ade3b69ae7480f7ac7fd85 -
Trigger Event:
workflow_dispatch
-
Statement type: