mirror of
https://github.com/Drop-OSS/flathub-app-bin.git
synced 2026-01-30 20:55:22 +01:00
pr-check: Don't post the domain comment until checklists are complete
This commit is contained in:
23
.github/workflows/pr-check.yml
vendored
23
.github/workflows/pr-check.yml
vendored
@@ -113,18 +113,6 @@ jobs:
|
||||
if [ "$EXIT_CODE" -ne 0 ]; then
|
||||
echo "PR title validation failed"
|
||||
BLOCKED=1
|
||||
else
|
||||
DOMAIN=$(curl -sSL "$DOMAIN_SCRIPT_URL" | python3 - "$PR_TITLE")
|
||||
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"
|
||||
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"
|
||||
gh pr comment "$PR_NUM" --body "$DOMAIN_COMMENT"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
CHECKLIST_PRESENT=$(printf "%s\n" "$PR_BODY" | grep -cE '^- ?\[[xX]\] [A-Za-z]+' || true)
|
||||
@@ -151,6 +139,17 @@ jobs:
|
||||
echo "BLOCKED is set to $BLOCKED"
|
||||
|
||||
if [ "$BLOCKED" -eq 0 ]; then
|
||||
DOMAIN=$(curl -sSL "$DOMAIN_SCRIPT_URL" | python3 - "$PR_TITLE")
|
||||
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"
|
||||
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"
|
||||
gh pr comment "$PR_NUM" --body "$DOMAIN_COMMENT"
|
||||
fi
|
||||
fi
|
||||
if label_exists_any "pr-check-blocked"; then
|
||||
echo "Removing pr-check-blocked label"
|
||||
gh pr edit "$PR_NUM" --remove-label "pr-check-blocked" || true
|
||||
|
||||
Reference in New Issue
Block a user