Skip to content

Conversation

jjw24
Copy link
Member

@jjw24 jjw24 commented May 18, 2025

Add a new step to use dispatch event to call the Chocolatey package repo to update and publish on new releases.

  • Renamed the file from website_deploy to release_deploy
  • Added a new step to use disptach event to call the Chocolatey repo's workflow.

@jjw24 jjw24 added this to the 1.20.0 milestone May 18, 2025
@jjw24 jjw24 self-assigned this May 18, 2025
@jjw24 jjw24 added bug Something isn't working CI/CD labels May 18, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a consolidated workflow that dispatches release jobs for both the website and Chocolatey package.

  • Removes the standalone website_deploy.yml in favor of a unified release_deploy.yml
  • Introduces a new publish-chocolatey job to trigger the Chocolatey package dispatch
  • Retains the deploy-website job for website deployment on releases

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/website_deploy.yml Removed legacy dispatch workflow for website deploy
.github/workflows/release_deploy.yml Added combined release workflow with website and Chocolatey dispatch jobs
Comments suppressed due to low confidence (1)

.github/workflows/release_deploy.yml:31

  • [nitpick] The secret name Publish_Chocolatey is inconsistent with DEPLOY_FLOW_WEBSITE. Consider renaming to PUBLISH_CHOCOLATEY for consistency.
-H "Authorization: Bearer ${{ secrets.Publish_Chocolatey }}"

Copy link

gitstream-cm bot commented May 18, 2025

🥷 Code experts: no user matched threshold 10

See details

To learn more about /:\ gitStream - Visit our Docs

Copy link

gitstream-cm bot commented May 18, 2025

Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.

This comment has been minimized.

Jack251970
Jack251970 previously approved these changes May 18, 2025
z1nc0r3
z1nc0r3 previously approved these changes May 18, 2025
@jjw24 jjw24 dismissed stale reviews from z1nc0r3 and Jack251970 via ec7ab00 May 18, 2025 12:23
@jjw24 jjw24 enabled auto-merge May 18, 2025 12:23
@jjw24 jjw24 requested a review from Jack251970 May 18, 2025 12:24
Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

❌ Errors and Warnings Count
❌ forbidden-pattern 22
⚠️ non-alpha-in-dictionary 13

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Copy link
Contributor

coderabbitai bot commented May 18, 2025

📝 Walkthrough

Walkthrough

A new GitHub Actions workflow file was introduced to handle release deployments, including both website and Chocolatey package publishing. The previous website deployment workflow was removed. The new workflow triggers on release publication or manual invocation and coordinates dispatch events to external repositories for deployment and publishing tasks.

Changes

File(s) Change Summary
.github/workflows/release_deploy.yml Added new workflow for release deployments, with jobs to trigger website and Chocolatey package deploys.
.github/workflows/website_deploy.yml Deleted previous workflow that handled website deployment on release.

Sequence Diagram(s)

sequenceDiagram
    participant GitHubActions
    participant WebsiteRepo
    participant ChocolateyRepo

    GitHubActions->>GitHubActions: Trigger on release or manual dispatch
    GitHubActions->>WebsiteRepo: POST repository_dispatch (event: deploy)
    WebsiteRepo-->>GitHubActions: HTTP 204 (success)
    GitHubActions->>ChocolateyRepo: POST repository_dispatch (event: publish)
    ChocolateyRepo-->>GitHubActions: HTTP 204 (success)
Loading

Suggested labels

github_actions

Poem

A hop, a skip, a workflow new,
Deploys the site and Chocolatey too.
Old scripts retire, new jobs begin,
With triggers set, let launches spin!
The code is sent, the bunnies cheer,
For streamlined flows are finally here! 🐇🚀

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


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
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

Copy link
Contributor

@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

🧹 Nitpick comments (7)
.github/workflows/release_deploy.yml (7)

1-1: Ensure consistent Unix line endings.
The YAML file contains incorrect new line characters as reported by YAMLlint. Converting to LF (\n) line endings will prevent parsing issues on Linux runners.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 1-1: wrong new line character: expected \n

(new-lines)


22-22: Remove trailing whitespace.
Line 22 contains trailing spaces; removing them will satisfy YAMLlint and improve readability.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 22-22: trailing spaces

(trailing-spaces)


15-15: Remove -f flag for consistent error handling.
The -f (fail) option causes curl to exit immediately on 4xx/5xx errors, bypassing your custom error message logic. Removing -f ensures that all HTTP status codes are captured in http_status and handled uniformly.

-http_status=$(curl -L -f -s -o /dev/null -w "%{http_code}" \
+http_status=$(curl -L -s -o /dev/null -w "%{http_code}" \

17-17: Add Content-Type header to API request.
Include -H "Content-Type: application/json" after the Accept header to explicitly declare the request body format. This aligns with GitHub API best practices.

-            -H "Accept: application/vnd.github+json" \
+            -H "Accept: application/vnd.github+json" \
+            -H "Content-Type: application/json" \

30-30: Add Content-Type header to Chocolatey dispatch.
Similarly, add -H "Content-Type: application/json" in the publish-chocolatey job for consistency.

-            -H "Accept: application/vnd.github+json" \
+            -H "Accept: application/vnd.github+json" \
+            -H "Content-Type: application/json" \

18-18: Standardize secret naming conventions.
You reference secrets as DEPLOY_FLOW_WEBSITE and Publish_Chocolatey. For consistency and to follow GitHub community conventions, consider renaming Publish_Chocolatey to PUBLISH_CHOCOLATEY (or adjust both to the same style).

Also applies to: 31-31


10-35: DRY the workflow with a job matrix.
The two dispatch jobs differ only by repository, event type, and secret. Refactoring to use a matrix will reduce duplication and simplify maintenance:

jobs:
  dispatch:
    strategy:
      matrix:
        target:
          - { repo: flow-launcher.github.io, event: deploy, secret: DEPLOY_FLOW_WEBSITE }
          - { repo: chocolatey-package, event: publish, secret: PUBLISH_CHOCOLATEY }
    runs-on: ubuntu-latest
    steps:
      - name: Trigger ${{ matrix.event }} for ${{ matrix.repo }}
        run: |
          http_status=$(curl -L -s -o /dev/null -w "%{http_code}" \
            -X POST \
            -H "Accept: application/vnd.github+json" \
            -H "Content-Type: application/json" \
            -H "Authorization: Bearer ${{ secrets[matrix.secret] }}" \
            https://api.github.com/repos/Flow-Launcher/${{ matrix.repo }}/dispatches \
            -d '{"event_type":"${{ matrix.event }}"}')
          if [ "$http_status" -ne 204 ]; then echo "Error: ${{ matrix.event }} dispatch to ${{ matrix.repo }} failed with code $http_status"; exit 1; fi

This approach enhances readability and makes it easier to add more dispatch targets in the future.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 22-22: trailing spaces

(trailing-spaces)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8aed36e and ec7ab00.

📒 Files selected for processing (2)
  • .github/workflows/release_deploy.yml (1 hunks)
  • .github/workflows/website_deploy.yml (0 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/website_deploy.yml
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/release_deploy.yml

[error] 1-1: wrong new line character: expected \n

(new-lines)


[error] 22-22: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
🔇 Additional comments (2)
.github/workflows/release_deploy.yml (2)

3-7: Workflow trigger configuration looks good.
The workflow is set to run on release.published and manual dispatch, which aligns with the PR objective to automate new release deployments.


18-19: Verify repository secrets and permissions.
Confirm that DEPLOY_FLOW_WEBSITE and PUBLISH_CHOCOLATEY (or your chosen variants) exist in the repo settings and that these tokens have the proper scopes (e.g., repo or workflow) to dispatch events on the target repositories.

Also applies to: 31-33

@jjw24 jjw24 merged commit 60de423 into dev May 18, 2025
15 checks passed
@jjw24 jjw24 deleted the add_chocolatey_publish_on_release branch May 18, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants