Skip to content

chore/ci/docs: detect outdated TS API reference#824

Merged
mateuszlampert merged 31 commits intomainfrom
@ml/detect-api-reference-change-ci
Feb 24, 2026
Merged

chore/ci/docs: detect outdated TS API reference#824
mateuszlampert merged 31 commits intomainfrom
@ml/detect-api-reference-change-ci

Conversation

@mateuszlampert
Copy link
Copy Markdown
Contributor

@mateuszlampert mateuszlampert commented Feb 23, 2026

Description

This PR necessary scripts and CI workflows to handle autogenerated API-reference docs. Currently, any change to the Typescript API changes all references files because SHA in urls changes - as a result PRs are hard to review and some bugs/discrepancies in docs can be merged more easily.

This PR:

  • adds CI workflow that checks if TS API-reference is up-to-date with TypeDocs from code
  • configures TypeDoc so urls point to main branch instead of specific SHAs and so external references are excluded
  • adds script for building versioned docs that build specific version of docs and replaces all main occurences in reference URLs to appropriate SHAs (we want to truncate the history there and point to specific point in history instead of main branch)
  • rebuilds docs with new configuration

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

N/A

Testing instructions

1. Script for building specific version of docs

Run:

cd docs
yarn docs:version 0.8.x 

and verify if main was changed to valid SHA in all reference urls (so urls for specific version are truncated to some point in history instead of latest main)

2. Github Action for detecting outdated api reference

Check results of actions for commits 7133ca4 and 2a4247c:

  • the first commit introduces some changes to typescript api, but docs were not built on purpose - as a result Check if API reference is up-to-date workflow failed
  • the first commit reverts this change, so generated api reference is up-to-date with typedocs - as a result Check if API reference is up-to-date workflow succeeded

3. Start docs locally and check if everything (exceptionally API-reference) works

Screenshots

Related issues

#790

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@mateuszlampert mateuszlampert self-assigned this Feb 23, 2026
@mateuszlampert mateuszlampert added documentation Improvements or additions to documentation chore PRs that are chores labels Feb 23, 2026
@mateuszlampert mateuszlampert force-pushed the @ml/detect-api-reference-change-ci branch from 959a34e to 0d06e5b Compare February 23, 2026 16:27
@mateuszlampert mateuszlampert marked this pull request as ready for review February 23, 2026 17:31
@msluszniak
Copy link
Copy Markdown
Member

@mateuszlampert should CI for generated documentation fail?

@mateuszlampert
Copy link
Copy Markdown
Contributor Author

@msluszniak oh, I forgot to change script name for prettier in the workflow code - now it's fixed and all tests passed :)

Copy link
Copy Markdown
Member

@msluszniak msluszniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chmjkb I saw that the only files that contain real changes are the ones related to image segmentation. Could you check if these are correct?

Comment thread docs/docs/06-api-reference/index.md Outdated
@msluszniak

This comment was marked as resolved.

Copy link
Copy Markdown
Collaborator

@chmjkb chmjkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the image segmentation reference looks good 👍🏻

@mateuszlampert mateuszlampert merged commit acac022 into main Feb 24, 2026
6 checks passed
@mateuszlampert mateuszlampert deleted the @ml/detect-api-reference-change-ci branch February 24, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore PRs that are chores documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pre-commit hook that will automatically add files that were modified into api reference.

3 participants