Spaces:
Build error
Build error
add check to exclude commits containing "isConnected" tag outdating other branches
Browse files
app.py
CHANGED
|
@@ -140,12 +140,17 @@ def sync_to_notion(token, database_id, branch_data):
|
|
| 140 |
latest_update = latest_updates.get(branch['Name'], '')
|
| 141 |
outdated = False
|
| 142 |
if existing_depends_on:
|
| 143 |
-
for
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
if not latest_update:
|
| 150 |
status_tag = "empty"
|
| 151 |
elif outdated:
|
|
|
|
| 140 |
latest_update = latest_updates.get(branch['Name'], '')
|
| 141 |
outdated = False
|
| 142 |
if existing_depends_on:
|
| 143 |
+
for branch in branch_data:
|
| 144 |
+
branch_name = branch['Name']
|
| 145 |
+
if branch_name in existing_depends_on:
|
| 146 |
+
# Check if 'commit_message' exists and contains 'isConnected'
|
| 147 |
+
commit_message = branch.get("commit_message", "")
|
| 148 |
+
if "isConnected" not in commit_message:
|
| 149 |
+
# Additional check for the latest update comparison
|
| 150 |
+
latest_update = latest_updates.get(branch_name, '')
|
| 151 |
+
if branch_name in latest_updates and latest_updates[branch_name] > latest_update:
|
| 152 |
+
outdated = True
|
| 153 |
+
break
|
| 154 |
if not latest_update:
|
| 155 |
status_tag = "empty"
|
| 156 |
elif outdated:
|