fix(workflows): callees of a test run inherit the test source
This commit is contained in:
1 parent
2a066f6d4f
commit
25face6d04
4 files changed
+10
-6
No files matched your search
@@ -11,7 +11,8 @@
|
||||
-- InsertChatTask. The callee is started by the identity the caller's
|
||||
-- workflow declares, read from its pinned definition: a callee never inherits the
|
||||
-- identity that started its caller, and runs as the one its own workflow
|
||||
-- declares.
|
||||
-- declares. A callee of a test run is a test run too, so it cannot write to a
|
||||
-- forge either.
|
||||
WITH caller AS (
|
||||
SELECT t.* FROM tasks t WHERE t.id = $1 FOR UPDATE
|
||||
), number AS (
|
||||
@@ -25,7 +26,8 @@ SELECT
|
||||
caller.owner,
|
||||
caller.repo,
|
||||
number.last_number,
|
||||
sqlc.arg(title), sqlc.arg(body), 'chat', sqlc.arg(workflow), 'chat', sqlc.arg(identity),
|
||||
sqlc.arg(title), sqlc.arg(body), 'chat', sqlc.arg(workflow),
|
||||
CASE WHEN caller.source = 'test' THEN 'test' ELSE 'chat' END, sqlc.arg(identity),
|
||||
caller.org_id, caller.workspace_id, sqlc.arg(inputs),
|
||||
caller.id, caller.call_depth + 1, sqlc.arg('call_key')
|
||||
FROM caller, number
|
||||
|
||||
Reference in new issue
Block a user