Skip to content

fix(action): Fix detection of existing publish issues#728

Merged
BYK merged 3 commits intomasterfrom
fix/existing-publish-issue-detection
Jan 22, 2026
Merged

fix(action): Fix detection of existing publish issues#728
BYK merged 3 commits intomasterfrom
fix/existing-publish-issue-detection

Conversation

@BYK
Copy link
Member

@BYK BYK commented Jan 22, 2026

Summary

Replace GitHub search API with listing all open issues and filtering by exact title match.

Problem

The release action was supposed to detect existing publish issues and skip creating duplicates. However, duplicate issues were being created (e.g., getsentry/publish#6972 and #6973 for cli@0.2.0).

Root Cause

The GitHub search API has indexing delays and query syntax edge cases that can cause the search to miss recently created issues or fail to match titles with special characters like @.

Solution

Instead of using GitHub search:

gh issue list -S "\"$title\" in:title" --json title,url | jq ...

Simply list all open issues and filter client-side:

gh issue list --json title,url | jq -r --arg t "$title" '.[] | select(.title == $t) | .url'

This approach:

  • Has no search indexing delay - finds issues immediately after creation
  • Avoids query syntax issues with special characters
  • Is simpler and more predictable

The jq filter for matching issue titles was using shell variable interpolation
inside the -q flag, which can cause escaping issues with special characters
like @ in version strings.

Fix by piping to external jq with --arg to safely pass the title variable,
avoiding any escaping or interpolation issues.
@BYK BYK force-pushed the fix/existing-publish-issue-detection branch from 83d0b4a to 1f507dd Compare January 22, 2026 02:48
Replace GitHub search API with listing all open issues and filtering by
exact title match using jq. This avoids:
- Search indexing delays that could cause duplicate issues
- Query syntax edge cases with special characters like @
@BYK BYK force-pushed the fix/existing-publish-issue-detection branch from 9720722 to b7c9f5a Compare January 22, 2026 02:53
@BYK BYK marked this pull request as ready for review January 22, 2026 02:54
@BYK BYK enabled auto-merge (squash) January 22, 2026 02:54
@BYK BYK merged commit c51f30f into master Jan 22, 2026
18 checks passed
@BYK BYK deleted the fix/existing-publish-issue-detection branch January 22, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants