ci: improve the template of the GitHub release by tbouffard · Pull Request #593 · maxGraph/maxGraph · GitHub
Skip to content

ci: improve the template of the GitHub release#593

Merged
tbouffard merged 8 commits into
mainfrom
ci/improve_gh_rn_template
Jan 28, 2025
Merged

ci: improve the template of the GitHub release#593
tbouffard merged 8 commits into
mainfrom
ci/improve_gh_rn_template

Conversation

@tbouffard

@tbouffard tbouffard commented Nov 30, 2024

Copy link
Copy Markdown
Member

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

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

# version 0.1.8
MILESTONE_NUMBER_1=unknown
# version 0.15.0
MILESTONE_NUMBER_2=14

Summary by CodeRabbit

  • New Features

    • Introduced a "Resources" section in release notes for easy access to npm package, documentation, and changelog.
    • Expanded sections for breaking changes and deprecated APIs with detailed guidelines.
  • Improvements

    • Enhanced overall structure and clarity of release notes for better organization.
    • Reformatted additional details for improved visibility.
    • Added a step to retrieve the milestone number associated with the release version.

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
@tbouffard tbouffard added the chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) label Nov 30, 2024
@coderabbitai

coderabbitai Bot commented Nov 30, 2024

Copy link
Copy Markdown

@tbouffard tbouffard marked this pull request as ready for review December 2, 2024 06:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 actionable

The 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 URL

The milestone URL contains a hardcoded 'x' that needs manual updating. This could be forgotten during releases.

Consider automating this by:

  1. Adding a step to fetch the milestone number using the GitHub API
  2. Storing it in an environment variable
  3. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 62d4c8f and b7b62e6.

📒 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

@tbouffard tbouffard marked this pull request as draft January 13, 2025 16:30
@tbouffard

Copy link
Copy Markdown
Member Author

Converted to Draft to give a chance to the proposals of coderabbitai.

@tbouffard tbouffard changed the title ci: improve the template of the GH release ci: improve the template of the GitHub release Jan 22, 2025
@tbouffard tbouffard marked this pull request as ready for review January 28, 2025 16:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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

📥 Commits

Reviewing files that changed from the base of the PR and between b7b62e6 and 44a5ecf.

📒 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.

Comment thread .github/workflows/create-github-release.yml
Comment thread .github/workflows/create-github-release.yml
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant