chocolatey / chocolatey/choco

Replace legacy Chocolatey Community Repository on upgrade

Open
#2,593 1 comment 0 reactions 0 assignees View on GitHub
0 - Backlog Enhancement
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

## Description

Currently when upgrading Chocolatey, the configuration file is left largely alone. Since the community repository has been moved to `https://community.chocolatey.org/api/v2/`, it would be beneficial to change this source on upgrade if it's in there as one of the old (or possibly manually updated and slightly incorrect) incarnations `http[s]://chocolatey.org/api/v2[/]` or `http[s]://community.chocolatey.org/api/v2[^/]`.

Thinking about this, a naive check could simply be something like:
```powershell
if ($source -match 'chocolatey.org/api/v2' -and $source -notmatch 'https://community.chocolatey.org/api/v2/')
{
# Handle correcting the source
}
```

## Reason for this change

If we ever opt to change the redirect behaviour in the future, this will ensure nothing breaks.

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests. Start by locating the upgrade path that reads and writes the configuration source, then trace where repository URLs are handled; done means each listed legacy or slightly incorrect URL is normalized to https://community.chocolatey.org/api/v2/ during upgrade without changing unrelated sources.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.