-
Notifications
You must be signed in to change notification settings - Fork 194
ci: improve the template of the GitHub release #593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Implement feedback from the 0.14.0 release: - add a dedicated paragraph for npm package, milestone, ... - use GitHub markdown alert instead of emoji: this better highlight the contents
WalkthroughThe pull request introduces modifications to the GitHub workflow file Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub
participant Workflow
User->>GitHub: Create Release
GitHub->>Workflow: Trigger Release Workflow
Workflow->>Workflow: Generate Release Notes
Workflow->>GitHub: Update Release with Notes
GitHub-->>User: Release Created
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
.github/workflows/create-github-release.yml (2)
28-29
: Make the TODO more specific and actionableThe TODO comment should provide clear guidance on how to update the milestone URL. Consider adding instructions about where to find the milestone number.
-**TODO: Update the milestone URL** +**TODO: Replace 'x' in the milestone URL with the corresponding milestone number from https://github.com/maxGraph/maxGraph/milestones**
31-31
: Consider automating the milestone URLThe milestone URL contains a hardcoded 'x' that needs manual updating. This could be forgotten during releases.
Consider automating this by:
- Adding a step to fetch the milestone number using the GitHub API
- Storing it in an environment variable
- Using the variable in the URL
Example implementation:
- name: Get milestone number run: | MILESTONE_NUMBER=$(gh api graphql -f query=' query($version: String!) { repository(owner: "maxGraph", name: "maxGraph") { milestones(first: 1, query: $version) { nodes { number } } } }' -f version="${{ env.VERSION }}" --jq '.data.repository.milestones.nodes[0].number') echo "MILESTONE_NUMBER=${MILESTONE_NUMBER}" >> $GITHUB_ENV
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/create-github-release.yml
(2 hunks)
🔇 Additional comments (2)
.github/workflows/create-github-release.yml (2)
26-34
: LGTM! Resources section improves organization
The new Resources section effectively consolidates all important links in one place, making it easier for users to find relevant information.
71-72
: Verify GitHub alert syntax in release notes
The change to use GitHub's alert syntax (> [!NOTE]
) improves visibility, but let's verify it works in release notes context.
✅ Verification successful
Based on the shell script results, I can see that GitHub alert syntax (> [!NOTE]
) is already being used successfully in release notes for versions v0.14.0 and v0.13.0. The alerts are properly formatted in the release notes with various types including NOTE, TIP, and IMPORTANT, which confirms the syntax works as expected in this context.
GitHub alert syntax is confirmed working in release notes
The change to use GitHub's alert syntax is appropriate and verified to work correctly in the release notes context, as evidenced by its successful use in previous releases.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if any existing releases use the alert syntax successfully
# Look for releases using the alert syntax and verify if it renders correctly
gh api \
-H "Accept: application/vnd.github+json" \
/repos/maxGraph/maxGraph/releases \
--jq '.[] | select(.body | contains("[!NOTE]")) | {tag_name: .tag_name, body: .body}'
Length of output: 14535
Converted to Draft to give a chance to the proposals of coderabbitai. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/create-github-release.yml (1)
44-48
: Improve resource links visibility using GitHub markdown alerts.The resource links would be more noticeable using GitHub's alert syntax.
- - **npm package**: [@maxgraph/core ${{ env.VERSION }}](https://www.npmjs.com/package/@maxgraph/core/v/${{ env.VERSION }}) - - **Fixed issues**: [milestone ${{ env.VERSION }}](https://github.com/maxGraph/maxGraph/milestone/${{ env.MILESTONE_NUMBER }}?closed=1) - - **Documentation**: [maxgraph_${{ env.VERSION }}_website.zip](https://github.com/maxGraph/maxGraph/releases/download/v${{ env.VERSION }}/maxgraph_${{ env.VERSION }}_website.zip) - - **Examples**: [maxgraph_${{ env.VERSION }}_examples.zip](https://github.com/maxGraph/maxGraph/releases/download/v${{ env.VERSION }}/maxgraph_${{ env.VERSION }}_examples.zip) - - **Changelog** (only includes a summary and breaking changes): [changelog](https://github.com/maxGraph/maxGraph/tree/v${{ env.VERSION }}/CHANGELOG.md) + > [!NOTE] + > 📦 **npm package**: [@maxgraph/core ${{ env.VERSION }}](https://www.npmjs.com/package/@maxgraph/core/v/${{ env.VERSION }}) + > + > 🎯 **Fixed issues**: [milestone ${{ env.VERSION }}](https://github.com/maxGraph/maxGraph/milestone/${{ env.MILESTONE_NUMBER }}?closed=1) + > + > 📚 **Documentation**: [maxgraph_${{ env.VERSION }}_website.zip](https://github.com/maxGraph/maxGraph/releases/download/v${{ env.VERSION }}/maxgraph_${{ env.VERSION }}_website.zip) + > + > 💡 **Examples**: [maxgraph_${{ env.VERSION }}_examples.zip](https://github.com/maxGraph/maxGraph/releases/download/v${{ env.VERSION }}/maxgraph_${{ env.VERSION }}_examples.zip) + > + > 📝 **Changelog**: [View full changes](https://github.com/maxGraph/maxGraph/tree/v${{ env.VERSION }}/CHANGELOG.md)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/create-github-release.yml
(3 hunks)
🔇 Additional comments (1)
.github/workflows/create-github-release.yml (1)
85-86
: LGTM! Good use of GitHub markdown alerts.The update to use GitHub's markdown alert syntax improves visibility and follows platform conventions.
|
Implement feedback from the 0.14.0 release:
Also retrieve the milestone with the GH API to create the URL to the milestone
Notes
Partially tested on commit 7a28b9f (additions in 44a5ecf and 00f80d4 have not been tested) with the build workflow in this PR, with both existing and not existing milestone for the given version https://github.com/maxGraph/maxGraph/actions/runs/13014585416/job/36300456635?pr=593
Summary by CodeRabbit
New Features
Improvements