domain_from_appid: Return none string

This commit is contained in:
bbhtt
2025-08-09 10:19:26 +05:30
parent 006286498b
commit 35e4389109
2 changed files with 3 additions and 3 deletions

View File

@@ -23,9 +23,9 @@ def demangle(name: str) -> str:
return name.replace("_", "-")
def get_domain(appid: str) -> str | None:
def get_domain(appid: str) -> str:
if appid.startswith(LOGINS) or appid.count(".") < 2:
return None
return "None"
elif appid.startswith(
("io.frama.", "page.codeberg.", "io.sourceforge.", "net.sourceforge.")
):

View File

@@ -118,7 +118,7 @@ jobs:
if [ -n "$DOMAIN" ] && [ "$DOMAIN" != "None" ]; then
echo "Domain is: $DOMAIN"
VERIF_URL="https://$DOMAIN/.well-known/org.flathub.VerifiedApps.txt"
VERIF_COMMENT="If you intend to verify this app, please confirm that you can upload $VERIF_URL. Otherwise, ignore this."
VERIF_COMMENT="If you intend to verify this app, please confirm that you can upload $VERIF_URL. Otherwise, ignore this"
DOMAIN_COMMENT="$DOMAIN_COMMENT_PARTIAL $DOMAIN. $VERIF_COMMENT. Please comment if this incorrect."
if ! comment_exists_full "$DOMAIN_COMMENT"; then
echo "Did not find domain comment, commenting"