fix(ci): fix YAML parse error in Print runner wait time step

The multi-line python3 -c block had unindented Python code that
terminated the YAML block scalar, causing a preExecutionError on every
CI run. Inline the Python as a one-liner.

Also apply dart format to email_repository_impl.dart and
email_repository_impl_test.dart (reformatted by CI container).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas SharedInbox
2026-06-07 03:29:40 +02:00
co-authored by Claude Sonnet 4.6
parent 92161f74fc
commit f1f4171306
3 changed files with 14 additions and 29 deletions
+1 -8
View File
@@ -22,14 +22,7 @@ jobs:
created_at=$(curl -sf \ created_at=$(curl -sf \
-H "Authorization: token $FORGEJO_TOKEN" \ -H "Authorization: token $FORGEJO_TOKEN" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/tasks?limit=100" \ "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/tasks?limit=100" \
| python3 -c " | python3 -c "import sys,json;data=json.load(sys.stdin);rs=[r for r in data.get('workflow_runs',[]) if r.get('run_number')==$RUN_NUMBER];print(rs[0]['created_at'] if rs else '')" 2>/dev/null)
import sys, json
data = json.load(sys.stdin)
for r in data.get('workflow_runs', []):
if r.get('run_number') == $RUN_NUMBER:
print(r['created_at'])
break
" 2>/dev/null)
if [ -n "$created_at" ]; then if [ -n "$created_at" ]; then
queued_epoch=$(date -d "$created_at" +%s) queued_epoch=$(date -d "$created_at" +%s)
wait_seconds=$((runner_start - queued_epoch)) wait_seconds=$((runner_start - queued_epoch))
@@ -2952,16 +2952,12 @@ class EmailRepositoryImpl implements EmailRepository {
String? mailboxPath, String? mailboxPath,
String query, String query,
) async { ) async {
final words = query final words =
.trim() query.trim().split(RegExp(r'\s+')).where((w) => w.isNotEmpty).toList();
.split(RegExp(r'\s+'))
.where((w) => w.isNotEmpty)
.toList();
if (words.isEmpty) return []; if (words.isEmpty) return [];
final noteConditions = words.map((_) => 'n.note_text LIKE ?').join(' AND '); final noteConditions = words.map((_) => 'n.note_text LIKE ?').join(' AND ');
final likeVars = final likeVars = words.map((w) => Variable<String>('%$w%')).toList();
words.map((w) => Variable<String>('%$w%')).toList();
final extraConditions = StringBuffer(); final extraConditions = StringBuffer();
final extraVars = <Variable<String>>[]; final extraVars = <Variable<String>>[];
@@ -2980,14 +2976,13 @@ class EmailRepositoryImpl implements EmailRepository {
' WHERE $noteConditions$extraConditions' ' WHERE $noteConditions$extraConditions'
' ORDER BY e.received_at DESC LIMIT 50'; ' ORDER BY e.received_at DESC LIMIT 50';
final rows = await _db final rows = await _db.customSelect(
.customSelect( sql,
sql, variables: [...likeVars, ...extraVars],
variables: [...likeVars, ...extraVars], readsFrom: {_db.emails, _db.emailNotes},
readsFrom: {_db.emails, _db.emailNotes}, ).get();
) final emailRows =
.get(); await Future.wait(rows.map((r) => _db.emails.mapFromRow(r)));
final emailRows = await Future.wait(rows.map((r) => _db.emails.mapFromRow(r)));
return emailRows.map(_toModel).toList(); return emailRows.map(_toModel).toList();
} }
@@ -3126,8 +3121,7 @@ class EmailRepositoryImpl implements EmailRepository {
queryRows.map((r) => _db.emails.mapFromRow(r)), queryRows.map((r) => _db.emails.mapFromRow(r)),
); );
final noteRows = final noteRows = await _searchEmailsByNotes(accountId, mailboxPath, query);
await _searchEmailsByNotes(accountId, mailboxPath, query);
final seen = <String>{}; final seen = <String>{};
final merged = <model.Email>[]; final merged = <model.Email>[];
+2 -4
View File
@@ -514,8 +514,7 @@ void main() {
), ),
); );
final results = final results = await r.emails.searchEmailsGlobal(null, 'urgent');
await r.emails.searchEmailsGlobal(null, 'urgent');
expect(results, hasLength(1)); expect(results, hasLength(1));
expect(results.first.subject, 'Weekly report'); expect(results.first.subject, 'Weekly report');
}); });
@@ -569,8 +568,7 @@ void main() {
), ),
); );
final results = final results = await r.emails.searchEmails('acc-1', 'INBOX', 'client');
await r.emails.searchEmails('acc-1', 'INBOX', 'client');
expect(results, hasLength(1)); expect(results, hasLength(1));
expect(results.first.subject, 'Project update'); expect(results.first.subject, 'Project update');
expect(results.first.mailboxPath, 'INBOX'); expect(results.first.mailboxPath, 'INBOX');