Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,9 +22,12 @@ import datetime
|
|
| 22 |
import json
|
| 23 |
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
|
| 29 |
def extract_branch_info(stream_id, server_url=None, token=None):
|
| 30 |
if server_url and token:
|
|
@@ -137,8 +140,10 @@ def sync_to_notion(token, database_id, branch_data):
|
|
| 137 |
if existing_depends_on:
|
| 138 |
for dep_name in existing_depends_on:
|
| 139 |
if dep_name in latest_updates and latest_updates[dep_name] > latest_update:
|
| 140 |
-
|
| 141 |
-
|
|
|
|
|
|
|
| 142 |
if not latest_update:
|
| 143 |
status_tag = "empty"
|
| 144 |
elif outdated:
|
|
|
|
| 22 |
import json
|
| 23 |
|
| 24 |
|
| 25 |
+
# dictionary that collects tags that can be added to commit messages.
|
| 26 |
+
# key -> column name in notion
|
| 27 |
+
# value -> possible values
|
| 28 |
+
tag_dict = {"status_tag":["WIP", "ReviewNeeded", "Final"]}
|
| 29 |
|
| 30 |
+
# tag part seperator -> #+ , other_tags
|
|
|
|
| 31 |
|
| 32 |
def extract_branch_info(stream_id, server_url=None, token=None):
|
| 33 |
if server_url and token:
|
|
|
|
| 140 |
if existing_depends_on:
|
| 141 |
for dep_name in existing_depends_on:
|
| 142 |
if dep_name in latest_updates and latest_updates[dep_name] > latest_update:
|
| 143 |
+
if "isConnected" not in branch[dep_name]["commit_message"]:
|
| 144 |
+
# exclude commits where isConnected was used
|
| 145 |
+
outdated = True
|
| 146 |
+
break
|
| 147 |
if not latest_update:
|
| 148 |
status_tag = "empty"
|
| 149 |
elif outdated:
|