diff --git a/dist/index.js b/dist/index.js index 9dc9ad1..8eca0a6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7433,8 +7433,12 @@ function whoIsNext(handles, retroCadenceInWeeks) { const today = new Date(); const diff = today.getTime() - firstWeek.getTime(); const daysSince = Math.floor(diff / (1000 * 60 * 60 * 24)); + core.info(`Days since: ${daysSince}`); const retrosSince = Math.floor(daysSince / (7 * retroCadenceInWeeks)); - const index = Math.ceil((retrosSince / 2) % handles.length); + core.info(`Retros since: ${retrosSince}`); + core.info(`List of handles length: ${handles.length}`); + const index = Math.floor(retrosSince % handles.length); + core.info(`Handle index: ${index}`); const nxt = handles[index]; return nxt; } diff --git a/src/retro.ts b/src/retro.ts index 3d74825..b208b03 100644 --- a/src/retro.ts +++ b/src/retro.ts @@ -63,8 +63,12 @@ function whoIsNext(handles: string[], retroCadenceInWeeks: number): string { const today = new Date() const diff = today.getTime() - firstWeek.getTime() const daysSince = Math.floor(diff / (1000 * 60 * 60 * 24)) + core.info(`Days since: ${daysSince}`) const retrosSince = Math.floor(daysSince / (7 * retroCadenceInWeeks)) - const index = Math.ceil((retrosSince / 2) % handles.length) + core.info(`Retros since: ${retrosSince}`) + core.info(`List of handles length: ${handles.length}`) + const index = Math.floor(retrosSince % handles.length) + core.info(`Handle index: ${index}`) const nxt = handles[index] return nxt