diff --git a/dist/index.js b/dist/index.js index ed841b7..5de6fef 100644 --- a/dist/index.js +++ b/dist/index.js @@ -19905,7 +19905,7 @@ const generateScores = async ({ scope, database: currentDatabase, maxRequestInPa for (let index = 0; index < chunks.length; index++) { const chunk = chunks[index] - core.debug(`Processing chunk ${index+1}/${chunks.length}`) + core.debug(`Processing chunk ${index + 1}/${chunks.length}`) const chunkScores = await Promise.all(chunk.map(async ({ org, repo }) => { const { score, date } = await getProjectScore({ platform, org, repo }) @@ -19935,7 +19935,7 @@ const generateScores = async ({ scope, database: currentDatabase, maxRequestInPa scores.push(...chunkScores) } - core.debug(`All the scores are already collected`) + core.debug('All the scores are already collected') const reportContent = await generateReportContent(scores) const issueContent = await generateIssueContent(scores) @@ -20307,13 +20307,13 @@ async function run () { octokit = github.getOctokit(githubToken) } - core.info("Checking Scope...") + core.info('Checking Scope...') const scope = await readFile(scopePath, 'utf8').then(content => JSON.parse(content)) let database = {} // Check if database exists try { - core.info("Checking if database exists...") + core.info('Checking if database exists...') await stat(databasePath) database = await readFile(databasePath, 'utf8').then(content => JSON.parse(content)) } catch (error) { @@ -20321,11 +20321,11 @@ async function run () { } // PROCESS - core.info("Generating scores...") + core.info('Generating scores...') const { reportContent, issueContent, database: newDatabaseState } = await generateScores({ scope, database, maxRequestInParallel }) // @TODO: If no changes to database, skip the rest of the process - core.info("Checking database changes...") + core.info('Checking database changes...') const hasChanges = isDifferentContent(database, newDatabaseState) if (!hasChanges) { @@ -20334,14 +20334,14 @@ async function run () { } // Save changes - core.info("Saving changes to database and report") + core.info('Saving changes to database and report') await writeFile(databasePath, JSON.stringify(newDatabaseState, null, 2)) await writeFile(reportPath, reportContent) // Commit changes // @see: https://github.com/actions/checkout#push-a-commit-using-the-built-in-token if (autoCommit) { - core.info("Committing changes to database and report") + core.info('Committing changes to database and report') await exec.exec('git config user.name github-actions') await exec.exec('git config user.email github-actions@github.com') await exec.exec(`git add ${databasePath}`) @@ -20352,14 +20352,14 @@ async function run () { // Push changes if (autoPush) { // @see: https://github.com/actions-js/push/blob/master/start.sh#L43 - core.info("Pushing changes to database and report") + core.info('Pushing changes to database and report') const remoteRepo = `https://${process.env.INPUT_GITHUB_ACTOR}:${githubToken}@github.com/${process.env.INPUT_REPOSITORY}.git` await exec.exec(`git push origin ${process.env.GITHUB_HEAD_REF} --force --no-verify --repo ${remoteRepo}`) } // Issue creation if (generateIssue && issueContent) { - core.info("Creating issue...") + core.info('Creating issue...') await octokit.rest.issues.create({ ...context.repo, title: issueTitle, diff --git a/src/action.js b/src/action.js index 35c855d..eb11ca4 100644 --- a/src/action.js +++ b/src/action.js @@ -34,13 +34,13 @@ async function run () { octokit = github.getOctokit(githubToken) } - core.info("Checking Scope...") + core.info('Checking Scope...') const scope = await readFile(scopePath, 'utf8').then(content => JSON.parse(content)) let database = {} // Check if database exists try { - core.info("Checking if database exists...") + core.info('Checking if database exists...') await stat(databasePath) database = await readFile(databasePath, 'utf8').then(content => JSON.parse(content)) } catch (error) { @@ -48,11 +48,11 @@ async function run () { } // PROCESS - core.info("Generating scores...") + core.info('Generating scores...') const { reportContent, issueContent, database: newDatabaseState } = await generateScores({ scope, database, maxRequestInParallel }) // @TODO: If no changes to database, skip the rest of the process - core.info("Checking database changes...") + core.info('Checking database changes...') const hasChanges = isDifferentContent(database, newDatabaseState) if (!hasChanges) { @@ -61,14 +61,14 @@ async function run () { } // Save changes - core.info("Saving changes to database and report") + core.info('Saving changes to database and report') await writeFile(databasePath, JSON.stringify(newDatabaseState, null, 2)) await writeFile(reportPath, reportContent) // Commit changes // @see: https://github.com/actions/checkout#push-a-commit-using-the-built-in-token if (autoCommit) { - core.info("Committing changes to database and report") + core.info('Committing changes to database and report') await exec.exec('git config user.name github-actions') await exec.exec('git config user.email github-actions@github.com') await exec.exec(`git add ${databasePath}`) @@ -79,14 +79,14 @@ async function run () { // Push changes if (autoPush) { // @see: https://github.com/actions-js/push/blob/master/start.sh#L43 - core.info("Pushing changes to database and report") + core.info('Pushing changes to database and report') const remoteRepo = `https://${process.env.INPUT_GITHUB_ACTOR}:${githubToken}@github.com/${process.env.INPUT_REPOSITORY}.git` await exec.exec(`git push origin ${process.env.GITHUB_HEAD_REF} --force --no-verify --repo ${remoteRepo}`) } // Issue creation if (generateIssue && issueContent) { - core.info("Creating issue...") + core.info('Creating issue...') await octokit.rest.issues.create({ ...context.repo, title: issueTitle, diff --git a/src/index.js b/src/index.js index 3b860b2..2ec37c2 100644 --- a/src/index.js +++ b/src/index.js @@ -14,7 +14,7 @@ const generateScores = async ({ scope, database: currentDatabase, maxRequestInPa for (let index = 0; index < chunks.length; index++) { const chunk = chunks[index] - core.debug(`Processing chunk ${index+1}/${chunks.length}`) + core.debug(`Processing chunk ${index + 1}/${chunks.length}`) const chunkScores = await Promise.all(chunk.map(async ({ org, repo }) => { const { score, date } = await getProjectScore({ platform, org, repo }) @@ -44,7 +44,7 @@ const generateScores = async ({ scope, database: currentDatabase, maxRequestInPa scores.push(...chunkScores) } - core.debug(`All the scores are already collected`) + core.debug('All the scores are already collected') const reportContent = await generateReportContent(scores) const issueContent = await generateIssueContent(scores)