Skip to content

feat: added choco as a package manager for windows users - #606

Open
junaid2005p wants to merge 1 commit into
mainfrom
choco
Open

feat: added choco as a package manager for windows users#606
junaid2005p wants to merge 1 commit into
mainfrom
choco

Conversation

@junaid2005p

@junaid2005p junaid2005p commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added Chocolatey package support for Windows installations.
    • Published package metadata, release notes, and release links for Chocolatey releases.
  • Documentation

    • Added the Chocolatey installation command to the Windows installation instructions.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow now passes the Chocolatey API key to GoReleaser. GoReleaser now packages and publishes Surge to Chocolatey. Windows installation instructions now include Chocolatey.

Changes

Chocolatey release packaging

Layer / File(s) Summary
Chocolatey package configuration
.goreleaser.yaml
The archive receives the surge ID. GoReleaser defines Chocolatey package metadata, release links, package details, and API credentials.
Release credential wiring and installation
.github/workflows/core-build.yml, README.md
The release job passes CHOCOLATEY_API_KEY from repository secrets. Windows installation instructions add choco install surge.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant GoReleaser
  participant Chocolatey
  GitHubActions->>GoReleaser: Provide CHOCOLATEY_API_KEY
  GoReleaser->>Chocolatey: Publish surge package
  Chocolatey-->>GoReleaser: Return publish result
Loading

Suggested reviewers: supercoolpencil

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding Chocolatey package support for Windows users.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.goreleaser.yaml:
- Line 62: Update the icon_url configuration to use a jsDelivr CDN URL instead
of raw.githubusercontent.com, and pin the referenced logo asset to a specific
release tag or commit rather than the mutable main branch.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 446b0687-223c-4eef-8514-0d21dc29a70b

📥 Commits

Reviewing files that changed from the base of the PR and between a7d608e and 8e9bb1e.

📒 Files selected for processing (3)
  • .github/workflows/core-build.yml
  • .goreleaser.yaml
  • README.md

Comment thread .goreleaser.yaml
title: Surge
project_url: https://github.com/SurgeDM/Surge
url_template: "https://github.com/SurgeDM/Surge/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
icon_url: https://raw.githubusercontent.com/SurgeDM/Surge/main/assets/logo.png

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
file=".goreleaser.yaml"
if [ -f "$file" ]; then
  cat -n "$file" | sed -n '35,70p'
else
  printf '%s\n' "$file not found"
fi

Repository: SurgeDM/Surge

Length of output: 1562


🌐 Web query:

Chocolatey CPMR0076 raw.githubusercontent.com icon_url supported CDN URL official documentation

💡 Result:

The Chocolatey rule CPMR0076 identifies that a package's iconUrl is improperly hotlinking to a raw GitHub URL (e.g., raw.githubusercontent.com) [1]. Chocolatey's official documentation and moderation policies prohibit the use of raw GitHub links for package icons because GitHub is not intended to serve as a content delivery network (CDN) for static assets [1][2]. When a package is submitted or updated, the validation process will trigger this rule if the iconUrl points to such a domain [1]. To remediate this issue, maintainers are required to host the icon on a proper, static CDN [1]. The documentation suggests using services like jsDelivr or Statically, which are commonly used by package maintainers to serve files hosted on GitHub while complying with the repository requirements [1][2]. Furthermore, maintainers should ensure the icon is hosted at a location under their control [2][3]. It is also recommended to use a specific tag or commit URL rather than a branch URL to ensure the icon remains stable and is not subject to unexpected changes [2].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu

for url in \
  "https://docs.chocolatey.org/en-us/community-repository/moderation/package-validator/rules/cpmr0076/" \
  "https://cdn.jsdelivr.net/gh/SurgeDM/Surge@main/assets/logo.png" \
  "https://raw.githubusercontent.com/SurgeDM/Surge/main/assets/logo.png"
do
  printf '\n%s\n' "$url"
  curl -L -sS -o /dev/null -w 'HTTP %{http_code}, final URL: %{url_effective}\n' "$url"
done

Repository: SurgeDM/Surge

Length of output: 681


🌐 Web query:

site:docs.chocolatey.org/en-us/community-repository/moderation/package-validator/rules/cpmr0076 iconUrl raw.githubusercontent.com jsDelivr tag commit

💡 Result:

You should avoid using raw.githubusercontent.com for icon URLs because GitHub does not intend for its raw file links to be used as a content delivery network (CDN) for hotlinking [1]. Instead, you should use a dedicated CDN provider like jsDelivr to serve these assets reliably [1]. To use jsDelivr with a GitHub repository, you can follow their standard URL structure for GitHub, which replaces the need for raw.githubusercontent.com links. The general format for a jsDelivr URL targeting a GitHub repository is: https://cdn.jsdelivr.net/gh/user/repo@version/path/to/file In this structure: user is your GitHub username. repo is the repository name. @version allows you to specify a tag, a branch name, or a specific commit hash. path/to/file is the path to your icon within the repository. Using this format ensures that your assets are properly cached and served through the CDN rather than directly from GitHub's raw file servers [1].

Citations:


Use a CDN-backed, versioned icon URL.

Chocolatey CPMR0076 rejects raw.githubusercontent.com icon URLs. Replace it with a jsDelivr URL that uses a release tag or commit instead of the mutable main branch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.goreleaser.yaml at line 62, Update the icon_url configuration to use a
jsDelivr CDN URL instead of raw.githubusercontent.com, and pin the referenced
logo asset to a specific release tag or commit rather than the mutable main
branch.

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.

1 participant