@davoodmehraban89 / LifeMate / commits / a584b1c
Fork 0

LifeMate — Personal, Family & Learning Companion

chore: normalize final hub lints

davoodmehraban89 committed Oct 5, 2026 at 19:51 UTC a584b1c6f93c0615cef65f65dbdc77127c0233fa
1 file changed +25
.github/workflows/fix-final-lints.yml new
+25
@@ -0,0 +1,25 @@
1 +name: Normalize Final Lints
2 +on:
3 + push:
4 + branches: ['final-feature-1/iran-family-school']
5 +permissions:
6 + contents: write
7 +jobs:
8 + fix:
9 + runs-on: ubuntu-latest
10 + steps:
11 + - uses: actions/checkout@v4
12 + with: {ref: final-feature-1/iran-family-school}
13 + - run: |
14 + python - <<'PY'
15 + from pathlib import Path
16 + p=Path('apps/lifemate/lib/iran_hub.dart');s=p.read_text()
17 + s=s.replace("if(body!=null)req.body=jsonEncode(body);","if(body!=null){req.body=jsonEncode(body);}")
18 + s=s.replace("if(res.statusCode<200||res.statusCode>=300)throw Exception('request_failed_${res.statusCode}');","if(res.statusCode<200||res.statusCode>=300){throw Exception('request_failed_${res.statusCode}');}")
19 + s=s.replace("if(persona=='child')await request('PUT','/v1/me/education',body:{'nationalGrade':grade,'schoolYear':'1405-1406'});","if(persona=='child'){await request('PUT','/v1/me/education',body:{'nationalGrade':grade,'schoolYear':'1405-1406'});}")
20 + s=s.replace('as List<dynamic>?? const []','as List<dynamic>? ?? const []')
21 + p.write_text(s)
22 + PY
23 + if git diff --quiet; then exit 0; fi
24 + git config user.name 'github-actions[bot]'; git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
25 + git add apps/lifemate/lib/iran_hub.dart; git commit -m 'fix: satisfy final hub analyzer'; git push origin HEAD:final-feature-1/iran-family-school