Skip to content

Commit

Permalink
re-build github actions code
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Nov 11, 2024
1 parent b1b7d75 commit 0f2272e
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .github/actions/javascript/checkAndroidStatus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -736552,21 +736552,21 @@ async function checkAndroidStatus() {
});
const androidApi = googleapis_1.google.androidpublisher({
version: 'v3',
auth: auth,
auth,
});
try {
// Insert an edit to get an edit ID
const editResponse = await androidApi.edits.insert({
packageName: PACKAGE_NAME,
});
const editId = editResponse.data.id;
const editId = editResponse.data.id ?? 'undefined';
// Get the production track status
const trackResponse = await androidApi.edits.tracks.get({
packageName: PACKAGE_NAME,
editId: editId,
editId,
track: 'production',
});
const status = trackResponse.data.releases?.[0]?.status || 'undefined';
const status = trackResponse.data.releases?.[0]?.status ?? 'undefined';
console.log('Track status:', status);
// Check if the status is halted
const HALTED = status === HALTED_STATUS;
Expand Down Expand Up @@ -736594,20 +736594,27 @@ function calculateRolloutPercentage(releaseDate) {
const current = new Date();
const daysSinceRelease = Math.floor((current.getTime() - release.getTime()) / (1000 * 60 * 60 * 24));
console.log('Days since release:', daysSinceRelease);
if (daysSinceRelease <= 0)
if (daysSinceRelease <= 0) {
return 0;
if (daysSinceRelease === 1)
}
if (daysSinceRelease === 1) {
return 0.01;
if (daysSinceRelease === 2)
}
if (daysSinceRelease === 2) {
return 0.02;
if (daysSinceRelease === 3)
}
if (daysSinceRelease === 3) {
return 0.05;
if (daysSinceRelease === 4)
}
if (daysSinceRelease === 4) {
return 0.1;
if (daysSinceRelease === 5)
}
if (daysSinceRelease === 5) {
return 0.2;
if (daysSinceRelease === 6)
}
if (daysSinceRelease === 6) {
return 0.5;
}
return 1;
}
checkAndroidStatus()
Expand Down

0 comments on commit 0f2272e

Please sign in to comment.