Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Parameters:
- `title` (str): Title of the pull request for the proposal.
- `body` (str): Description of the pull request for the proposal.
- `metadata` (dict, optional)
- `cost` (float): Cost incurred for implementing the task.
- `cost_in_cents` (int): Cost (in USD cents) incurred for implementing the task.

### `code.cleanup`

Expand Down
2 changes: 1 addition & 1 deletion packages/bot/src/automa/bot/resources/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,4 @@ class Proposal(TypedDict):

# TODO: Add `extra_items=Any` (py 3.15)
class Metadata(TypedDict):
cost: NotRequired[float]
cost_in_cents: NotRequired[int]
4 changes: 2 additions & 2 deletions packages/bot/tests/resources/test_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def test_propose_with_metadata(fixture_tarfile, code_resource):
code_resource.propose(
{
"task": {"id": 28, "token": "abcdef"},
"metadata": {"cost": 0.1, "random": "yes"},
"metadata": {"cost_in_cents": 10, "random": "yes"},
}
)

Expand All @@ -663,7 +663,7 @@ def test_propose_with_metadata(fixture_tarfile, code_resource):
"token": "ghijkl",
"diff": "diff --git a/README.md b/README.md\nindex e69de29..39c9f36 100644\n--- a/README.md\n+++ b/README.md\n@@ -0,0 +1 @@\n+Content\n",
},
"metadata": {"cost": 0.1, "random": "yes"},
"metadata": {"cost_in_cents": 10, "random": "yes"},
},
headers={
"Accept": "application/json",
Expand Down