Skip to content

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Nov 30, 2024

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
Copy link

coderabbitai bot commented Nov 30, 2024

Walkthrough

The pull request introduces modifications to the GitHub workflow file .github/workflows/create-github-release.yml. Key changes include the addition of a "Resources" section that consolidates various links, an updated format for the npm package link, and a marked "TODO" for the milestone URL. The sections addressing breaking changes, deprecated APIs, and their removal have been expanded with detailed guidelines. Additionally, the note regarding additional details has been reformatted for better visibility, resulting in an overall enhancement of the structure and clarity of the release notes.

Changes

File Path Change Summary
.github/workflows/create-github-release.yml - Added "Resources" section for npm package, issues, documentation, examples, and changelog links.
- Updated npm package link format to highlight package name and version.
- Marked milestone URL update as "TODO."
- Expanded guidelines for breaking changes, deprecated APIs, and their removal.
- Reformatted additional details note to block quote style.

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
Loading

Possibly related PRs

  • ci: configure dependabot to update JavaScript dependencies #629: The changes in this PR involve the .github/dependabot.yml file, which is part of the GitHub workflows, similar to the modifications made in the .github/workflows/create-github-release.yml file in the main PR. Both PRs focus on enhancing the configuration and management of GitHub-related processes.
  • ci: fix dependabot configuration #630: This PR also modifies the .github/dependabot.yml file, addressing configuration issues that could impact the workflow processes, aligning with the main PR's focus on improving workflow clarity and functionality.
  • docs: apply minor improvements #647: Although primarily focused on documentation, this PR includes changes to the README.md and other documentation files that may indirectly relate to the release notes and overall project clarity, which is a goal of the main PR.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

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

📒 Files selected for processing (1)
  • .github/workflows/create-github-release.yml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/create-github-release.yml

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

@coderabbitai coderabbitai bot left a 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 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
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
Copy link

@coderabbitai coderabbitai bot left a 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

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

Copy link

@tbouffard tbouffard merged commit b3cc82f into main Jan 28, 2025
2 checks passed
@tbouffard tbouffard deleted the ci/improve_gh_rn_template branch January 28, 2025 16:33
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