Skip to content

Migrate Zig scraper from GitHub to Codeberg - #2790

Open
Cook3DCookie wants to merge 1 commit into
freeCodeCamp:mainfrom
Cook3DCookie:fix-zig-source-link
Open

Cook3DCookie wants to merge 1 commit into
freeCodeCamp:mainfrom
Cook3DCookie:fix-zig-source-link

Conversation

@Cook3DCookie

Copy link
Copy Markdown

Changes

  • In lib/docs/scrapers/zig.rb: Updated code attribute of self.links from GitHub to Codeberg, since Zig moved to Codeberg, and used the newly created helper function get_codeberg_tags
  • In lib/docs/core/doc.rb: Added the function get_codeberg_tags, similar to the existing function get_github_tags
  • In docs/scraper-reference.md: Added documentation for get_codeberg_tags, similar to existing documentation about get_github_tags, with a link to the Codeberg API reference and an example implementation. Additionally, I have noticed that the link for the get_github_tags documentation was outdated, and therefore changed it to the new link
  • In test/lib/docs/core/doc_test.rb: Added a new test for get_codeberg_tags, very similar to the existing test for get_github_tags
  • In public/icons/docs/zig/SOURCE: Updated the links to the locations on Codeberg

Verification

  • bundle exec thor test:all: 0 failures
  • curl https://codeberg.org/api/v1/repos/ziglang/zig/tags: returns the
    expected JSON
  • New code and icon URLs return HTTP 200
  • bundle exec thor updates:check zig: latest version reported as 0.17.1
    from Codeberg:
bundle exec thor updates:check zig
[#########################] [1/1] [100%] [00:00:00] [00:00:00]+---------------------------------+
|    Outdated major version documentations (1)     |
+---------------+-----------------+----------------+
| Documentation | Scraper version | Latest version |
+---------------+-----------------+----------------+
| Zig           | 0.16.0          | 0.17.1         |
+---------------+-----------------+----------------+

Scope note

self.release is intentionally left at 0.16.0, as CONTRIBUTING mentions that bumping
the version should accompany an actual doc regeneration, which is out of scope
for this migration. bundle exec thor updates:check will now report Zig as outdated.

- Add get_codeberg_tags helper and use in get_latest_version
- Add test for the new function
- Update links for Zig icons and Zig source code
- Document get_codeberg_tags in scraper-reference
- Update GitHub API reference link for get_github_tags function
@Cook3DCookie
Cook3DCookie requested a review from a team as a code owner November 13, 2026 00:47
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