From 4f8fddfbb65acbb1d5384ef5d83250d1aaa83799 Mon Sep 17 00:00:00 2001 From: bbhtt Date: Wed, 24 Dec 2025 17:58:10 +0530 Subject: [PATCH] pr-check: Post a more detailed verification comment --- .github/workflows/pr-check.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index c43db93..051aafb 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -152,6 +152,11 @@ jobs: echo "$PR_COMMENTS" | grep -Fxq "$comment" } + comment_contains() { + local substr="$1" + echo "$PR_COMMENTS" | grep -Fq "$substr" + } + comment_exists_any() { for comment in "$@"; do if echo "$PR_COMMENTS" | grep -Fq "$comment"; then @@ -243,9 +248,11 @@ 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_1="If you intend to [verify](https://docs.flathub.org/docs/for-app-authors/verification) this submission, please" + VERIF_COMMENT_2="confirm by uploading an empty \`org.flathub.VerifiedApps.txt\` file to $VERIF_URL. Otherwise, ignore this." + VERIF_COMMENT="$VERIF_COMMENT_1 $VERIF_COMMENT_2" DOMAIN_COMMENT="$DOMAIN_COMMENT_PARTIAL $DOMAIN. $VERIF_COMMENT. Please comment if this incorrect." - if ! comment_exists_full "$DOMAIN_COMMENT"; then + if ! comment_contains "$VERIF_URL"; then echo "Did not find domain comment, commenting" gh pr comment "$PR_NUM" --body "$DOMAIN_COMMENT" || true fi