Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-1821

The 'timeline` API in GitHub doesn't point out the sorting order

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.0
    • None
    • bots
    • None

      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

            gli Guoxiong Li
            gli Guoxiong Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: