Skip to content

Commit 74d565f

Browse files
authored
fix: use exact match for issue failure (#37)
1 parent 11fc1c7 commit 74d565f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
ISSUE_TITLE="Integration Testing CI ${failure_type^} Failure on python ${{ matrix.python }}${{matrix.is_pre && ' with prerelease dependencies' || ''}}"
154154
echo "issue_title=$ISSUE_TITLE" >> $GITHUB_ENV
155155
echo "Checking for existing issue: $ISSUE_TITLE"
156-
ISSUE=$(gh issue list --repo scverse/${{ matrix.package.name }} --state open --search "${ISSUE_TITLE}" --json number,createdAt --jq '.[0] // empty')
156+
ISSUE=$(gh issue list --repo scverse/${{ matrix.package.name }} --state open --search "${ISSUE_TITLE}" --json number,createdAt,title | jq --arg title "$ISSUE_TITLE" '[.[] | select(.title == $title)] | .[0] // empty')
157157
if [[ -n "$ISSUE" ]]; then
158158
ISSUE_NUMBER=$(echo "$ISSUE" | jq -r '.number')
159159
CREATED_AT=$(echo "$ISSUE" | jq -r '.createdAt')
@@ -202,7 +202,7 @@ jobs:
202202
run: |
203203
for FAILURE_TYPE in install test; do
204204
ISSUE_TITLE="Integration Testing CI ${FAILURE_TYPE^} Failure on python ${{ matrix.python }}${{matrix.is_pre && ' with prerelease dependencies' || ''}}"
205-
ISSUE=$(gh issue list --repo scverse/${{ matrix.package.name }} --state open --search "${ISSUE_TITLE}" --json number --jq '.[0] // empty')
205+
ISSUE=$(gh issue list --repo scverse/${{ matrix.package.name }} --state open --search "${ISSUE_TITLE}" --json number,title | jq --arg title "$ISSUE_TITLE" '[.[] | select(.title == $title)] | .[0] // empty')
206206
if [[ -n "$ISSUE" ]]; then
207207
ISSUE_NUMBER=$(echo "$ISSUE" | jq -r '.number')
208208
echo "Tests passing — closing issue #$ISSUE_NUMBER: $ISSUE_TITLE"

0 commit comments

Comments
 (0)