Skip to content

Commit

Permalink
Fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Nov 8, 2024
1 parent 5a7f062 commit 379c3ac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { google } from 'googleapis';
import GithubUtils from "@github/libs/GithubUtils";
import * as core from '@actions/core';
import CONST from "@github/libs/CONST";
import {google} from 'googleapis';
import CONST from '@github/libs/CONST';
import GithubUtils from '@github/libs/GithubUtils';

const PACKAGE_NAME = core.getInput('PACKAGE_NAME', { required: true });
const GOOGLE_KEY_FILE = core.getInput('GOOGLE_KEY_FILE', { required: true });
const PACKAGE_NAME = core.getInput('PACKAGE_NAME', {required: true});
const GOOGLE_KEY_FILE = core.getInput('GOOGLE_KEY_FILE', {required: true});
const HALTED_STATUS = 'halted';

async function checkAndroidStatus() {
const auth = new google.auth.GoogleAuth({
keyFile: GOOGLE_KEY_FILE,
scopes: ['https://www.googleapis.com/auth/androidpublisher']
scopes: ['https://www.googleapis.com/auth/androidpublisher'],
});

const androidApi = google.androidpublisher({
version: 'v3',
auth: auth
auth: auth,

Check failure on line 18 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Expected property shorthand

Check failure on line 18 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Expected property shorthand
});

try {
Expand Down Expand Up @@ -45,7 +45,7 @@ async function checkAndroidStatus() {
}

async function getLatestReleaseDate() {
const { data } = await GithubUtils.octokit.repos.getLatestRelease({
const {data} = await GithubUtils.octokit.repos.getLatestRelease({
owner: CONST.GITHUB_OWNER,
repo: CONST.APP_REPO,
});
Expand All @@ -69,7 +69,7 @@ function calculateRolloutPercentage(releaseDate: string): number {
if (daysSinceRelease === 1) return 0.01;

Check failure on line 69 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Expected { after 'if' condition

Check failure on line 69 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Expected { after 'if' condition
if (daysSinceRelease === 2) return 0.02;

Check failure on line 70 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Expected { after 'if' condition

Check failure on line 70 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Expected { after 'if' condition
if (daysSinceRelease === 3) return 0.05;

Check failure on line 71 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Expected { after 'if' condition

Check failure on line 71 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Expected { after 'if' condition
if (daysSinceRelease === 4) return 0.10;
if (daysSinceRelease === 4) return 0.1;

Check failure on line 72 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Expected { after 'if' condition

Check failure on line 72 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Expected { after 'if' condition
if (daysSinceRelease === 5) return 0.2;

Check failure on line 73 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Expected { after 'if' condition

Check failure on line 73 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Expected { after 'if' condition
if (daysSinceRelease === 6) return 0.5;

Check failure on line 74 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Expected { after 'if' condition

Check failure on line 74 in .github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Expected { after 'if' condition
return 1;
Expand All @@ -81,4 +81,4 @@ checkAndroidStatus()
const rolloutPercentage = calculateRolloutPercentage(releaseDate);
console.log('Rollout percentage:', rolloutPercentage);
core.setOutput('ROLLOUT_PERCENTAGE', rolloutPercentage);
});
});
10 changes: 5 additions & 5 deletions .github/actions/javascript/checkAndroidStatus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -736538,21 +736538,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const googleapis_1 = __nccwpck_require__(44913);
const GithubUtils_1 = __importDefault(__nccwpck_require__(19296));
const core = __importStar(__nccwpck_require__(42186));
const googleapis_1 = __nccwpck_require__(44913);
const CONST_1 = __importDefault(__nccwpck_require__(29873));
const GithubUtils_1 = __importDefault(__nccwpck_require__(19296));
const PACKAGE_NAME = core.getInput('PACKAGE_NAME', { required: true });
const GOOGLE_KEY_FILE = core.getInput('GOOGLE_KEY_FILE', { required: true });
const HALTED_STATUS = 'halted';
async function checkAndroidStatus() {
const auth = new googleapis_1.google.auth.GoogleAuth({
keyFile: GOOGLE_KEY_FILE,
scopes: ['https://www.googleapis.com/auth/androidpublisher']
scopes: ['https://www.googleapis.com/auth/androidpublisher'],
});
const androidApi = googleapis_1.google.androidpublisher({
version: 'v3',
auth: auth
auth: auth,
});
try {
// Insert an edit to get an edit ID
Expand Down Expand Up @@ -736603,7 +736603,7 @@ function calculateRolloutPercentage(releaseDate) {
if (daysSinceRelease === 3)
return 0.05;
if (daysSinceRelease === 4)
return 0.10;
return 0.1;
if (daysSinceRelease === 5)
return 0.2;
if (daysSinceRelease === 6)
Expand Down

0 comments on commit 379c3ac

Please sign in to comment.