Skip to content

Commit

Permalink
# This is a combination of 21 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

use updated github api syntax

# This is the commit message alexkiro#2:

test
# This is the commit message alexkiro#3:

asdasd
# This is the commit message alexkiro#4:

test

# This is the commit message alexkiro#5:

update lockfile

# This is the commit message alexkiro#6:

yo

# This is the commit message alexkiro#7:

test

# This is the commit message alexkiro#8:

test

# This is the commit message alexkiro#9:

tasdasd

# This is the commit message alexkiro#10:

ja

# This is the commit message alexkiro#11:

test

# This is the commit message alexkiro#12:

test

# This is the commit message alexkiro#13:

test

# This is the commit message alexkiro#14:

test

# This is the commit message alexkiro#15:

ja

# This is the commit message alexkiro#16:

ja

# This is the commit message alexkiro#17:

ja

# This is the commit message alexkiro#18:

ja

# This is the commit message alexkiro#19:

ja

# This is the commit message alexkiro#20:

ja

# This is the commit message alexkiro#21:

ja
  • Loading branch information
haraldmartin committed Sep 21, 2022
1 parent 630697d commit f617a77
Show file tree
Hide file tree
Showing 3 changed files with 3,134 additions and 9 deletions.
17 changes: 14 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14196,6 +14196,8 @@ console.log("translations-path", translationPath);
console.log("only-languages:", onlyLanguages);
console.log("ignore-languages:", ignoreLanguages);

console.log("here!?");

main().catch((error) => {
core.setFailed(error.message);
});
Expand All @@ -14215,6 +14217,7 @@ function getArrayInput(value) {

function parseFile(file) {
console.log("Parsing file:", file);

const translation = po2json.parseFileSync(file);
const language = translation[""].language.trim().toLowerCase();
const details = {
Expand Down Expand Up @@ -14275,7 +14278,12 @@ async function main() {
core.setOutput("coverage", coverage);

const context = github.context.payload;
if (!token || !context.head_commit) return;

// if (!token || !context.head) {
if (!context.pull_request.head) {
console.log("no commit", token, context);
return;
}

console.log("Creating check run");
const octokit = github.getOctokit(token);
Expand All @@ -14289,13 +14297,16 @@ async function main() {
conclusion = "failure";
}

console.log({ conclusion });
console.log({ minCoverage });

octokit.checks.create({
owner: context.repository.owner.login,
repo: context.repository.name,
name: "i18n-coverage",
head_sha: context.head_commit.id,
head_sha: context.pull_request.head.sha,
status: "completed",
conclusion,
conclusion: "failure",
output: {
title: `${coverage.toFixed(0)}% i18n coverage.`,
summary: summary + `, min-coverage: ${minCoverage}%`,
Expand Down
Loading

0 comments on commit f617a77

Please sign in to comment.