A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
ci: skip honeypot for local bot PRs (#1209)
Hampusfa060d1c5285
diff --git a/.github/workflows/pr-template-honeypot.yaml b/.github/workflows/pr-template-honeypot.yamlindex 59d6bae3e..dd124a93a 100644--- a/.github/workflows/pr-template-honeypot.yaml+++ b/.github/workflows/pr-template-honeypot.yaml@@ -45,10 +45,17 @@ jobs:fiauthor="$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")"+ author_type="$(jq -r '.pull_request.user.type // ""' "$GITHUB_EVENT_PATH")"author_association="$(jq -r '.pull_request.author_association' "$GITHUB_EVENT_PATH")"+ head_repository="$(jq -r '.pull_request.head.repo.full_name // ""' "$GITHUB_EVENT_PATH")"body_file="$(mktemp)"jq -r '.pull_request.body // ""' "$GITHUB_EVENT_PATH" > "$body_file"+ if [ "$author_type" = "Bot" ] && [ "$head_repository" = "$GITHUB_REPOSITORY" ]; then+ echo "Skipping repository-local bot pull request: $author"+ exit 0+ fi+if grep -Fq "$HONEYPOT_MARKER" "$body_file"; thenecho "Honeypot marker is present."exit 0