File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ spdk_repo=$REPO
17
17
gerrit_comment=$COMMENT
18
18
reported_by=$AUTHOR
19
19
20
- gerrit_url=https://review.spdk.io/a/ changes
20
+ gerrit_url=https://review.spdk.io/changes
21
21
gerrit_format_q=" o=DETAILED_ACCOUNTS&o=MESSAGES&o=LABELS&o=SKIP_DIFFSTAT"
22
22
23
23
# Looking for comment thats only content is "false positive: 123", with a leeway for no spaces
@@ -48,6 +48,12 @@ curl -s -X GET \
48
48
" $gerrit_url /spdk%2Fspdk~$change_num ?$gerrit_format_q " \
49
49
| tail -n +2 | jq . | tee change.json
50
50
51
+ if [[ ! -s change.json ]]; then
52
+ echo " Change $change_num not found, exiting."
53
+ echo " Either it's a private change or in restricted branch."
54
+ exit 0
55
+ fi
56
+
51
57
# Do not test any change marked as WIP
52
58
ready_for_review= " $( jq -r ' .has_review_started' change.json) "
53
59
if [[ " $ready_for_review " == " false" ]]; then
Original file line number Diff line number Diff line change 46
46
set -x
47
47
48
48
# Get latest info about a change itself
49
- curl -s -X GET "https://review.spdk.io/a/changes/spdk%2Fspdk~${{ env.change_num }}?o=DETAILED_ACCOUNTS&o=LABELS&o=SKIP_DIFFSTAT" \
50
- --user "${{ secrets.GERRIT_BOT_USER }}:${{ secrets.GERRIT_BOT_HTTP_PASSWD }}" \
51
- | tail -n +2 > change.json
49
+ curl -s -X GET "https://review.spdk.io/changes/spdk%2Fspdk~${{ env.change_num }}?o=DETAILED_ACCOUNTS&o=LABELS&o=SKIP_DIFFSTAT" > _change.json
50
+
51
+ if grep "Not found: spdk/spdk~${{ env.change_num }}"; then
52
+ echo "Change ${{ env.change_num }} not found, exiting."
53
+ echo "Either it's a private change or in restricted branch."
54
+ gh run cancel ${{ github.run_id }} -R ${{ github.repository }}
55
+ fi
56
+ tail -n +2 _change.json > change.json
57
+ rm -f _change.json
52
58
53
59
# Do not test any change marked as WIP
54
60
ready_for_review="$(jq -r '.has_review_started' change.json)"
You can’t perform that action at this time.
0 commit comments