Skip to content

Configurable HTTP timeout for remote metadata fething #1544

@ymgyt

Description

@ymgyt

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

When fetching commit metadata from GitHub via the remote integration, git-cliff fails because the underlying HTTP request hits a hard-coded timeout. There is no CLI flag, environment variable, or config option to extend it.

Reproduction

  • git-cliff version: 2.13.1
  • OS: Linux
GITHUB_TOKEN=$TOKEN git cliff \
  --config .cliff.toml \
  --tag-pattern 'mypkg-v.*' \
  --output CHANGELOG.md \
  --github-repo owner/repo \
  --include-path 'path/**' \
  --bump minor

Output:

◒ Adding remote data to the changelog (owner/repo)                                             add_remote_data  [29.9s]
thread 'main' panicked at git-cliff-core/src/changelog.rs:493:18:
Could not get github metadata: HttpClientMiddlewareError(Middleware(error decoding response body

Caused by:
    0: request or response body error
    1: operation timed out))

Failure happens consistently while paginating through /repos/{owner}/{repo}/commits (around page 28 in our case). Re-running yields the same panic with the same URL family.

Desired solution

A configurable timeout so the call can complete on slower links or when many pages must be fetched.

  • [remote.github] http_timeout = "60s" (TOML config, parsed as duration)
  • --http-timeout <SECS> CLI flag
  • GIT_CLIFF_HTTP_TIMEOUT environment variable

Alternatives considered

Additional context

Current workaround

  • --offline / GIT_CLIFF_OFFLINE=true skips remote metadata entirely

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions