mirror of
https://github.com/Drop-OSS/flathub-app-bin.git
synced 2026-07-01 12:43:45 -04:00
pr-check: Match the full comment for domain comment
This commit is contained in:
@@ -75,6 +75,11 @@ jobs:
|
||||
echo "$PR_COMMENTS" | grep -Fq "$comment"
|
||||
}
|
||||
|
||||
comment_exists_full() {
|
||||
local comment="$1"
|
||||
echo "$PR_COMMENTS" | grep -Fxq "$comment"
|
||||
}
|
||||
|
||||
comment_exists_any() {
|
||||
for comment in "$@"; do
|
||||
if echo "$PR_COMMENTS" | grep -Fq "$comment"; then
|
||||
@@ -110,9 +115,9 @@ jobs:
|
||||
DOMAIN=$(curl -sSL "$DOMAIN_SCRIPT_URL" | python3 - "$APPID")
|
||||
if [ "$DOMAIN" != "None" ] && [ -n "$DOMAIN" ]; then
|
||||
echo "Domain is: $DOMAIN"
|
||||
if ! comment_exists "$DOMAIN_COMMENT_PARTIAL"; then
|
||||
DOMAIN_COMMENT="$DOMAIN_COMMENT_PARTIAL $DOMAIN. Please comment if incorrect."
|
||||
if ! comment_exists_full "$DOMAIN_COMMENT"; then
|
||||
echo "Did not find domain comment, commenting"
|
||||
DOMAIN_COMMENT="$DOMAIN_COMMENT_PARTIAL $DOMAIN. Please comment if incorrect."
|
||||
gh pr comment "$PR_NUM" --body "$DOMAIN_COMMENT"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user