File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 60
60
fi
61
61
62
62
# Get latest info about a change itself
63
- curl -s -X GET "https://review.spdk.io/a/changes/spdk%2Fspdk~${{ env.change_num }}?o=DETAILED_ACCOUNTS&o=MESSAGES&o=LABELS&o=SKIP_DIFFSTAT" \
64
- --user "${{ secrets.GERRIT_BOT_USER }}:${{ secrets.GERRIT_BOT_HTTP_PASSWD }}" \
65
- | tail -n +2 > change.json
63
+ curl -s -X GET "https://review.spdk.io/changes/spdk%2Fspdk~${{ env.change_num }}?o=DETAILED_ACCOUNTS&o=LABELS&o=SKIP_DIFFSTAT" > curl_result.txt
64
+
65
+ if grep "Not found" curl_result.txt; then
66
+ echo "Ignore. Change ${{ env.change_num }} not found, exiting."
67
+ echo "Either it's a private change or in restricted branch."
68
+ exit 0
69
+ fi
70
+
71
+ tail -n +2 curl_result.txt > change.json
72
+ rm -f curl_result.txt
66
73
67
74
# Do not test any change marked as WIP
68
75
ready_for_review="$(jq -r '.has_review_started' change.json)"
Original file line number Diff line number Diff line change 45
45
set -x
46
46
47
47
# Get latest info about a change itself
48
- curl -s -X GET "https://review.spdk.io/a/changes/spdk%2Fspdk~${{ env.change_num }}?o=DETAILED_ACCOUNTS&o=LABELS&o=SKIP_DIFFSTAT" \
49
- --user "${{ secrets.GERRIT_BOT_USER }}:${{ secrets.GERRIT_BOT_HTTP_PASSWD }}" \
50
- | tail -n +2 > change.json
48
+ curl -s -X GET "https://review.spdk.io/changes/spdk%2Fspdk~${{ env.change_num }}?o=DETAILED_ACCOUNTS&o=LABELS&o=SKIP_DIFFSTAT" > curl_result.txt
49
+
50
+ if grep "Not found" curl_result.txt; then
51
+ echo "Change ${{ env.change_num }} not found, exiting."
52
+ echo "Either it's a private change or in restricted branch."
53
+ gh run cancel ${{ github.run_id }} -R ${{ github.repository }}
54
+ fi
55
+
56
+ tail -n +2 curl_result.txt > change.json
57
+ rm -f curl_result.txt
51
58
52
59
# Do not test any change marked as WIP
53
60
ready_for_review="$(jq -r '.has_review_started' change.json)"
You can’t perform that action at this time.
0 commit comments