Merge pull request #641 from automatisch/fix/stargazer-data-order
fix: Iterate stargazer data reverse-chronologically
This commit is contained in:
@@ -41,6 +41,9 @@ const newStargazers = async ($: IGlobalVariable) => {
|
|||||||
pathname = links.prev?.uri;
|
pathname = links.prev?.uri;
|
||||||
|
|
||||||
if (response.data.length) {
|
if (response.data.length) {
|
||||||
|
// to iterate reverse-chronologically
|
||||||
|
response.data.reverse();
|
||||||
|
|
||||||
for (const starEntry of response.data) {
|
for (const starEntry of response.data) {
|
||||||
const { starred_at, user } = starEntry;
|
const { starred_at, user } = starEntry;
|
||||||
const timestamp = DateTime.fromISO(starred_at).toMillis();
|
const timestamp = DateTime.fromISO(starred_at).toMillis();
|
||||||
|
Reference in New Issue
Block a user