mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 18:29:08 +00:00
pr-check: Post a more detailed verification comment
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user