How to query for repositories with a stable sort order? #121560
Replies: 1 comment
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
The web API for querying for repositories has a sort option, but all the values that I can find for it generate a non-permenent order. That is the order of the results (assuming the set doesn't change) could be different in the future due to things outside my control.
That instability can result in unexpected results. (In my case, the
data github_repositories
resource in terraform saves the result in the provided order and changes in order show up as churn.)What I'd like to find is some sort option (like "name" or "creation data") where the sort order of any two items will be the same for the entire life of the items. For my case, what the order is doesn't actually matter, I'd even be happy with something like "sorted by the DB's UUID primary key", as long as that will persist even if the backed database is replaced with something else
Beta Was this translation helpful? Give feedback.
All reactions