Skip to content

Investigate Octokit API-version deprecation warnings #1

@shbernal

Description

@shbernal

Context

Some Gitpulse runs emit Octokit warnings like:

[@octokit/request] "GET https://api.github.com/repos/hyprwm/Hyprland/contents/.github" is deprecated. It is scheduled to be removed on Fri, 10 Mar 2028 00:00:00 GMT. See https://docs.github.com/en/rest/about-the-rest-api/api-versions
[@octokit/request] "GET https://api.github.com/repos/hyprwm/Hyprland/contents" is deprecated. It is scheduled to be removed on Fri, 10 Mar 2028 00:00:00 GMT. See https://docs.github.com/en/rest/about-the-rest-api/api-versions

The repository contents endpoint itself is not deprecated. GitHub docs indicate the 2026-03-10 breaking change is that directory listings return submodules with type: "submodule" instead of type: "file". Octokit appears to format API-version Deprecation / Sunset response headers as if the concrete request URL is deprecated.

Current mitigation

  • Gitpulse sends X-GitHub-Api-Version: 2026-03-10.
  • Gitpulse sends Accept: application/vnd.github+json.
  • Directory parsing treats only type: "file" entries as documentation candidates and models type: "submodule".
  • A targeted Octokit warning filter suppresses only API-version deprecation warnings.

Follow-up

  • Reproduce in an environment that still emits the warning.
  • Inspect response headers for contents requests, especially Deprecation, Sunset, Link, and x-github-api-version-selected.
  • Decide whether to keep, refine, or remove the targeted warning filter.
  • Add regression coverage if a mock Octokit/fetch path can reproduce the headers.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions