kubernetes-sigs / reference-docs

Tools to build reference documentation for Kubernetes APIs and CLIs.
Apache License 2.0
87 stars 102 forks source link

fix: sort types #351

Closed eddycharly closed 5 months ago

eddycharly commented 5 months ago

This PR fixes sortTypes func by considering the package when sorting, in case both types have the same name.

Let's say a type Foo exists in v1 and v2. If we consider only the name (Foo) we can't decide on the order, it will be random from one run to the other. In this case, we can additionally consider the package, it becomes obvious that v1 should come before v2 and the order is now predictible.

Fixes #350

eddycharly commented 5 months ago

/assign tengqm

eddycharly commented 5 months ago

@sftim i added a more detailed explanation, is it more clear ?

eddycharly commented 5 months ago

/approve

eddycharly commented 5 months ago

🤣

k8s-ci-robot commented 5 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eddycharly, tengqm

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/reference-docs/blob/master/OWNERS)~~ [tengqm] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment