Skip to content

Ignore private changes and comments #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/scripts/parse_false_positive_comment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spdk_repo=$REPO
gerrit_comment=$COMMENT
reported_by=$AUTHOR

gerrit_url=https://review.spdk.io/a/changes
gerrit_url=https://review.spdk.io/changes
gerrit_format_q="o=DETAILED_ACCOUNTS&o=MESSAGES&o=LABELS&o=SKIP_DIFFSTAT"

# Looking for comment thats only content is "false positive: 123", with a leeway for no spaces
Expand Down Expand Up @@ -48,6 +48,12 @@ curl -s -X GET \
"$gerrit_url/spdk%2Fspdk~$change_num?$gerrit_format_q" \
| tail -n +2 | jq . | tee change.json

if [[ ! -s change.json ]]; then
echo "Change $change_num not found, exiting."
echo "Either it's a private change or in restricted branch."
exit 0
fi

# Do not test any change marked as WIP
ready_for_review="$(jq -r '.has_review_started' change.json)"
if [[ "$ready_for_review" == "false" ]]; then
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/gerrit-webhook-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ jobs:
set -x

# Get latest info about a change itself
curl -s -X GET "https://review.spdk.io/a/changes/spdk%2Fspdk~${{ env.change_num }}?o=DETAILED_ACCOUNTS&o=LABELS&o=SKIP_DIFFSTAT" \
--user "${{ secrets.GERRIT_BOT_USER }}:${{ secrets.GERRIT_BOT_HTTP_PASSWD }}" \
| tail -n +2 > change.json
curl -s -X GET "https://review.spdk.io/changes/spdk%2Fspdk~${{ env.change_num }}?o=DETAILED_ACCOUNTS&o=LABELS&o=SKIP_DIFFSTAT" \
| tail -n +2 > change.json

if [[ ! -s change.json ]]; then
echo "Change ${{ env.change_num }} not found, exiting."
echo "Either it's a private change or in restricted branch."
gh run cancel ${{ github.run_id }} -R ${{ github.repository }}
fi

# Do not test any change marked as WIP
ready_for_review="$(jq -r '.has_review_started' change.json)"
Expand Down