Skip to content

Generated repository links force HTTPS protocol regardless of original configuration #298

@hllshiro

Description

@hllshiro

Environment

Unrelated

Reproduction

Unrelated

Describe the bug

When generating changelog links ,the protocol is hardcoded to https even if the original repository configuration uses http. This causes links to be inaccessible in environments that only support http (e.g., an internal private repositories 'gitea' using http).

The root cause is in the baseUrl function in changelogen/src/repo.ts (line 42), which explicitly uses https:// regardless of the original protocol from the repository URL:

function baseUrl(config: RepoConfig) {
  return `https://${config.domain}/${config.repo}`; // Line 42
}

This function is used by formatReference (line 50) and formatCompareChanges (line 63) to generate all repository-related links, overriding any http protocol specified in the original repository configuration.

Additional context

This issue occurs regardless of how the repository is configured:

  • Through the repository field in package.json with an http URL
  • Via Git remote URL using http
  • By manually setting the repo property in the changelog configuration

The hardcoded https protocol makes the generated changelog links incompatible with internal systems or private repositories that require http for access.

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions