Skip to content

Commit

Permalink
Update rollout percentage to be a decimal number
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Nov 8, 2024
1 parent df349de commit 5a7f062
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ function calculateRolloutPercentage(releaseDate: string): number {
console.log('Days since release:', daysSinceRelease);

if (daysSinceRelease <= 0) return 0;
if (daysSinceRelease === 1) return 1;
if (daysSinceRelease === 2) return 2;
if (daysSinceRelease === 3) return 5;
if (daysSinceRelease === 4) return 10;
if (daysSinceRelease === 5) return 20;
if (daysSinceRelease === 6) return 50;
return 100;
if (daysSinceRelease === 1) return 0.01;
if (daysSinceRelease === 2) return 0.02;
if (daysSinceRelease === 3) return 0.05;
if (daysSinceRelease === 4) return 0.10;
if (daysSinceRelease === 5) return 0.2;
if (daysSinceRelease === 6) return 0.5;
return 1;
}

checkAndroidStatus()
Expand Down
14 changes: 7 additions & 7 deletions .github/actions/javascript/checkAndroidStatus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -736597,18 +736597,18 @@ function calculateRolloutPercentage(releaseDate) {
if (daysSinceRelease <= 0)
return 0;
if (daysSinceRelease === 1)
return 1;
return 0.01;
if (daysSinceRelease === 2)
return 2;
return 0.02;
if (daysSinceRelease === 3)
return 5;
return 0.05;
if (daysSinceRelease === 4)
return 10;
return 0.10;
if (daysSinceRelease === 5)
return 20;
return 0.2;
if (daysSinceRelease === 6)
return 50;
return 100;
return 0.5;
return 1;
}
checkAndroidStatus()
.then(getLatestReleaseDate)
Expand Down

0 comments on commit 5a7f062

Please sign in to comment.