mirror of
https://github.com/MuRuLOSE/limoka.git
synced 2026-06-18 07:04:19 +02:00
some fixes to update notifications
This commit is contained in:
@@ -85,10 +85,9 @@ def get_file_diff(file_path, base_commit):
|
|||||||
def is_module_file(file_path):
|
def is_module_file(file_path):
|
||||||
"""Check if file is a Python module in a modules directory"""
|
"""Check if file is a Python module in a modules directory"""
|
||||||
# Check if it's a .py file and in a modules-like directory
|
# Check if it's a .py file and in a modules-like directory
|
||||||
return file_path.endswith('.py') and any(
|
dir_depth = len(Path(file_path).parts)
|
||||||
part in file_path.lower() for part in [
|
return file_path.endswith('.py') and (
|
||||||
'modules', 'mods', 'ftg', 'hikka'
|
dir_depth := len(Path(file_path).parts) >= 2
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def extract_module_name(file_path):
|
def extract_module_name(file_path):
|
||||||
@@ -135,6 +134,7 @@ async def main():
|
|||||||
diff_url = f"https://github.com/MuRuLOSE/limoka/compare/{old_hash}...{new_hash}.diff"
|
diff_url = f"https://github.com/MuRuLOSE/limoka/compare/{old_hash}...{new_hash}.diff"
|
||||||
message = (
|
message = (
|
||||||
f"🪼 <b>Module <code>{module_name}</code> changes approved</b>\n\n"
|
f"🪼 <b>Module <code>{module_name}</code> changes approved</b>\n\n"
|
||||||
|
# f"🪼 <b>Module <code>{module_name}</code> by <code>ueban123</code> changes approved</b>\n\n"
|
||||||
f"<b><a href=\"{github_url}\">File URL</a></b> | "
|
f"<b><a href=\"{github_url}\">File URL</a></b> | "
|
||||||
f"<b><a href=\"{diff_url}\">Diff URL</a></b>"
|
f"<b><a href=\"{diff_url}\">Diff URL</a></b>"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user