@@ -156,6 +156,12 @@ printf '%s\n' "$count" > "$FAKE_CURL_COUNT"
156156printf '%s' "$payload" > "$FAKE_CURL_PAYLOAD_DIR/$count.json"
157157
158158if ((count == 1)); then
159+ body='{
160+ "data": {
161+ "team": {"id": "resolved-team-uuid"}
162+ }
163+ }'
164+ elif ((count == 2)); then
159165 body='{
160166 "data": {
161167 "issues": {
@@ -217,7 +223,7 @@ DISCOVERED=$(
217223 FAKE_CURL_COUNT=" $FAKE_CURL_COUNT " \
218224 FAKE_CURL_PAYLOAD_DIR=" $FAKE_CURL_PAYLOAD_DIR " \
219225 LINEAR_API_KEY=" test-key" \
220- LINEAR_TEAM_ID=" team-id " \
226+ LINEAR_TEAM_ID=" team-key " \
221227 LINEAR_GRAPHQL_ATTEMPTS=1 \
222228 REPOSITORY=" sourcebot-dev/example" \
223229 " $DISCOVERY_SCRIPT "
@@ -243,13 +249,17 @@ EXPECTED_DISCOVERED='[
243249 }
244250]'
245251assert_json " paginates Linear results and filters before invoking Claude" " $DISCOVERED " " $EXPECTED_DISCOVERED "
252+ assert_json \
253+ " resolves the configured Linear team identifier" \
254+ " $( jq -c ' .variables.teamId' " $FAKE_CURL_PAYLOAD_DIR /1.json" ) " \
255+ ' "team-key"'
246256assert_json \
247257 " queries Linear with the current repository title prefix" \
248- " $( jq -c ' .variables | {teamId, titlePrefix, after}' " $FAKE_CURL_PAYLOAD_DIR /1 .json" ) " \
249- ' {"teamId":"team-id ","titlePrefix":"[sourcebot-dev/example]","after":null}'
258+ " $( jq -c ' .variables | {teamId, titlePrefix, after}' " $FAKE_CURL_PAYLOAD_DIR /2 .json" ) " \
259+ ' {"teamId":"resolved- team-uuid ","titlePrefix":"[sourcebot-dev/example]","after":null}'
250260assert_json \
251261 " passes the Linear cursor to the next page" \
252- " $( jq -c ' .variables.after' " $FAKE_CURL_PAYLOAD_DIR /2 .json" ) " \
262+ " $( jq -c ' .variables.after' " $FAKE_CURL_PAYLOAD_DIR /3 .json" ) " \
253263 ' "next-page"'
254264
255265assert_workflow_contains \
0 commit comments