ci(release): fix api call to get milestone number#651
Conversation
The query missed a double quote
WalkthroughThe pull request addresses a syntax error in the GitHub Actions workflow file Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/create-github-release.yml (1)
Line range hint
23-29: Consider enhancing error handling for the milestone query.While the query syntax is correct, consider adding validation for cases where:
- No milestone is found
- Multiple milestones match the version
- The API request fails
Here's a suggested improvement:
query($version: String!) { repository(owner: "${{ github.repository_owner }}", name: "${{ github.event.repository.name }}") { milestones(first: 1, query: $version) { - nodes { number } + nodes { + number + title + state + } } } }' -f version="${{ env.VERSION }}" --jq '.data.repository.milestones.nodes[0].number') +if [ -z "$MILESTONE_NUMBER" ]; then + echo "::error::No milestone found for version ${{ env.VERSION }}" + exit 1 +fi +if [ "$MILESTONE_NUMBER" = "null" ]; then + echo "::error::Failed to fetch milestone number" + exit 1 +fi echo "Found milestone: ${MILESTONE_NUMBER}" -echo "MILESTONE_NUMBER=${MILESTONE_NUMBER:-x}" >> $GITHUB_ENV +echo "MILESTONE_NUMBER=${MILESTONE_NUMBER}" >> $GITHUB_ENV
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/create-github-release.yml(1 hunks)
🔇 Additional comments (1)
.github/workflows/create-github-release.yml (1)
24-24: LGTM! The GraphQL query syntax is now correct.The fix properly closes the repository query parameters with the missing quote.



The query missed a double quote
Notes
Detected during the 0.15.0 release
https://github.com/maxGraph/maxGraph/actions/runs/13025775559/job/36334496994#step:3:5
Summary by CodeRabbit