Many Restful APIs in GitHub, such as the `comment` API [1], point out the sorting order or provide a parameter `sort` about it. But unfortunately, the `timeline` API [2] doesn't point out it. Currently, we can only find the rule from the result by ourself. It is not accurate and the GitHub may change it without notice in the future.
Erik also mentioned this issue in the review comment [3].
> Are you sure of the order events are returned in? I couldn't find a definition of the order. Maybe safer to map to date and reduce to the highest one?
So it is better to adjust the code to avoid such problem.
[1] https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28#about-issue-and-pull-request-comments
[2] https://docs.github.com/en/rest/issues/timeline?apiVersion=2022-11-28
[3] https://github.com/openjdk/skara/pull/1469#discussion_r1104910145
Erik also mentioned this issue in the review comment [3].
> Are you sure of the order events are returned in? I couldn't find a definition of the order. Maybe safer to map to date and reduce to the highest one?
So it is better to adjust the code to avoid such problem.
[1] https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28#about-issue-and-pull-request-comments
[2] https://docs.github.com/en/rest/issues/timeline?apiVersion=2022-11-28
[3] https://github.com/openjdk/skara/pull/1469#discussion_r1104910145