Skip to content

Conversation

@RivinduM
Copy link
Contributor

@RivinduM RivinduM commented Dec 23, 2025

Purpose

$subject

Summary by CodeRabbit

  • Chores
    • Enhanced release automation workflows for improved changelog generation and release documentation.
    • Streamlined release process with draft and published release paths for better control.
    • Added comprehensive release statistics and enhanced release notifications to keep maintainers informed.
    • Automated version tracking and documentation updates across release artifacts.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Walkthrough

Two GitHub workflow files for dashboard and translator releases are enhanced with automated changelog generation, structured release notes, conditional draft vs. published release paths, version bump automation, and improved notifications and PR creation logic.

Changes

Cohort / File(s) Summary
Dashboard Release Workflow
.github/workflows/dashboard-release.yml
Added full git history fetch for changelog generation; introduced previous tag retrieval with fallback logic; implemented changelog generation from git logs with Features/Bug Fixes sections; enhanced release notes with About This Release, Key Features, and Release Statistics; split release creation into draft (awaiting approval) and published (custom changelog) paths; added draft notification step; extended version bump job to update opensearch_dashboards.json, package.json, and README badges; added PR creation for version bumps with improved messaging.
Translator Release Workflow
.github/workflows/translator-release.yml
Added full git history fetch for changelog generation; introduced previous tag retrieval for translator-v\* tags; implemented changelog generation from translator/ directory with custom URL fallback; reworked release notes generation with structured formatting, About This Release, Key Features, and Release Statistics; introduced conditional release creation (draft vs. published based on changelog type and approval flag); added draft release notification step; extended version bump job with gating conditions and Ballerina.toml version updates; added README and FTP/SFTP badge updates; implemented PR creation/updating for version bumps; added comprehensive notify job with draft and success notifications.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub as GitHub Actions
    participant Git as Git Repository
    participant API as GitHub API
    participant Notify as Notification System

    GitHub->>Git: Fetch full history (fetch-depth: 0)
    GitHub->>Git: Retrieve previous tag (dashboard-v*)
    GitHub->>GitHub: Generate/Fetch Changelog<br/>(from git logs or URL)
    GitHub->>GitHub: Generate Release Notes<br/>(with stats & changelog)
    
    alt Custom Changelog OR Skip Approval
        GitHub->>API: Create Published Release
        GitHub->>Notify: Send Success Notification
    else No Custom Changelog AND Needs Approval
        GitHub->>API: Create Draft Release
        GitHub->>Notify: Send Draft Created Alert
        Note over GitHub,API: Awaiting Maintainer Review<br/>and Approval
    end
    
    alt Release Published (Draft or Direct)
        GitHub->>Git: Create/Update version bump branch
        GitHub->>GitHub: Bump version in config files<br/>(package.json, badges, README)
        GitHub->>API: Create/Update Pull Request<br/>(version bump)
        GitHub->>API: Update "latest" release info
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

A rabbit hops through workflows grand,
With changelogs and releases planned—
Draft reviews and badges bright,
Version bumps done just right,
Automation's touch makes all expand! 🐰✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is severely incomplete, containing only a minimal placeholder for Purpose without any substantive content addressing the required template sections. Complete the description using the template by filling in Goals, Approach, User stories, Release note, Documentation, and other required sections with relevant details about the workflow enhancements.
Title check ❓ Inconclusive The title 'Update release actions' is vague and overly generic, failing to convey the specific improvements or scope of changes. Revise the title to be more specific, such as 'Enhance release workflows with changelog generation and draft release support' to clearly communicate the main changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/translator-release.yml (1)

9-20: Missing changelog_url and skip_approval input definitions.

The workflow references github.event.inputs.changelog_url and github.event.inputs.skip_approval throughout (lines 230, 352, 367, 383, 400, 410, 575, 586), but these inputs are not defined in the workflow_dispatch configuration. This will cause:

  • changelog_url to always be empty, so custom changelogs can never be provided
  • skip_approval to never equal 'true', so published releases and version bumps will never trigger via manual dispatch
  • Draft releases will always be created when using workflow_dispatch
🔎 Proposed fix: Add missing input definitions
  workflow_dispatch:
    inputs:
      create_release:
        description: 'Create GitHub Release'
        required: false
        default: false
        type: boolean
      release_tag:
        description: 'Release tag (e.g., translator-v1.0.0)'
        required: false
        default: ''
        type: string
+     changelog_url:
+       description: 'URL to fetch custom changelog (optional)'
+       required: false
+       default: ''
+       type: string
+     skip_approval:
+       description: 'Skip draft and publish release directly'
+       required: false
+       default: false
+       type: boolean
.github/workflows/dashboard-release.yml (1)

9-20: Missing changelog_url and skip_approval input definitions.

Same issue as translator-release.yml: the workflow references github.event.inputs.changelog_url and github.event.inputs.skip_approval throughout, but these inputs are not defined. This breaks the custom changelog and skip-approval functionality.

🔎 Proposed fix: Add missing input definitions
  workflow_dispatch:
    inputs:
      create_release:
        description: 'Create GitHub Release'
        required: false
        default: false
        type: boolean
      release_tag:
        description: 'Release tag (e.g., dashboard-v1.0.0)'
        required: false
        default: ''
        type: string
+     changelog_url:
+       description: 'URL to fetch custom changelog (optional)'
+       required: false
+       default: ''
+       type: string
+     skip_approval:
+       description: 'Skip draft and publish release directly'
+       required: false
+       default: false
+       type: boolean
🧹 Nitpick comments (4)
.github/workflows/translator-release.yml (3)

351-378: Update softprops/action-gh-release to v2.

The action softprops/action-gh-release@v1 is outdated. Version v2 includes improvements and bug fixes. This applies to both the draft release (line 353) and published release (line 368) steps.

🔎 Proposed fix
      - name: Create GitHub Release (Draft for Review)
        if: steps.changelog.outputs.using_custom_changelog == 'false' && github.event.inputs.skip_approval != 'true'
-       uses: softprops/action-gh-release@v1
+       uses: softprops/action-gh-release@v2
        with:
          ...

      - name: Create GitHub Release (Published)
        if: steps.changelog.outputs.using_custom_changelog == 'true' || github.event.inputs.skip_approval == 'true'
-       uses: softprops/action-gh-release@v1
+       uses: softprops/action-gh-release@v2
        with:
          ...

229-234: Consider validating the changelog URL before fetching.

The workflow fetches content from a user-provided URL without validation. While this is mitigated by requiring write access to trigger the workflow, consider adding URL validation (e.g., restricting to trusted domains) or sanitizing the fetched content to prevent potential markdown injection in release notes.


240-274: Author attribution may be inaccurate.

The changelog uses %an (author name from git) with @%s format, implying a GitHub mention. However, git author names often differ from GitHub usernames (e.g., "John Doe" vs "@johndoe"), which would create broken mentions. Consider using %ae (author email) to look up the GitHub username, or simply omit the @ prefix.

.github/workflows/dashboard-release.yml (1)

425-452: Update softprops/action-gh-release to v2.

Same as translator workflow - update both instances (lines 427 and 442) to use softprops/action-gh-release@v2.

🔎 Proposed fix
      - name: Create GitHub Release (Draft for Review)
        if: steps.changelog.outputs.using_custom_changelog == 'false' && github.event.inputs.skip_approval != 'true'
-       uses: softprops/action-gh-release@v1
+       uses: softprops/action-gh-release@v2
        ...

      - name: Create GitHub Release (Published)
        if: steps.changelog.outputs.using_custom_changelog == 'true' || github.event.inputs.skip_approval == 'true'
-       uses: softprops/action-gh-release@v1
+       uses: softprops/action-gh-release@v2
        ...
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c01c88a and bc8e2c5.

📒 Files selected for processing (2)
  • .github/workflows/dashboard-release.yml
  • .github/workflows/translator-release.yml
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/dashboard-release.yml

274-274: property "changelog_url" is not defined in object type {create_release: string; release_tag: string}

(expression)


426-426: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


427-427: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


441-441: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


457-457: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


474-474: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


484-484: property "changelog_url" is not defined in object type {create_release: string; release_tag: string}

(expression)


484-484: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


702-702: property "changelog_url" is not defined in object type {create_release: string; release_tag: string}

(expression)


702-702: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


713-713: property "changelog_url" is not defined in object type {create_release: string; release_tag: string}

(expression)


713-713: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)

.github/workflows/translator-release.yml

217-217: property "changelog_url" is not defined in object type {create_release: string; release_tag: string}

(expression)


352-352: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


353-353: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


367-367: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


383-383: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


400-400: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


410-410: property "changelog_url" is not defined in object type {create_release: string; release_tag: string}

(expression)


410-410: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


575-575: property "changelog_url" is not defined in object type {create_release: string; release_tag: string}

(expression)


575-575: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)


586-586: property "changelog_url" is not defined in object type {create_release: string; release_tag: string}

(expression)


586-586: property "skip_approval" is not defined in object type {create_release: string; release_tag: string}

(expression)

🔇 Additional comments (7)
.github/workflows/translator-release.yml (3)

424-441: LGTM!

The version parsing logic correctly handles semantic versioning. The job's if condition at line 410 ensures this only runs for stable releases (versions without -), which prevents parsing issues with pre-release versions.


194-213: LGTM!

The full history fetch and previous tag detection are correctly implemented. The fallback to the first commit when no previous tag exists handles the initial release case appropriately.


288-349: LGTM!

The release notes generation is comprehensive, including key features, statistics, changelog, resources, and build info. The structure provides good visibility for users reviewing the release.

.github/workflows/dashboard-release.yml (4)

260-345: LGTM!

The changelog generation logic mirrors the translator workflow and is correctly implemented. The same minor considerations about URL validation and author attribution apply here.


498-515: LGTM!

The yarn.lock artifact handling is well-implemented. Using continue-on-error: true on the download step gracefully handles cases where the artifact doesn't exist, and the subsequent copy step includes appropriate existence checking.


648-692: LGTM!

The PR creation/update logic is well-structured with comprehensive descriptions. The PR body includes all relevant release information and clear instructions for reviewers.


700-726: Notification logic is correct, pending input fixes.

The conditional notifications for draft vs. published releases are well-designed. Once the missing changelog_url and skip_approval inputs are added, these will function as intended.

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