Skip to content

Commit f617a77

Browse files
committed
# This is a combination of 21 commits.
# 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
1 parent 630697d commit f617a77

File tree

3 files changed

+3134
-9
lines changed

3 files changed

+3134
-9
lines changed

dist/index.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14196,6 +14196,8 @@ console.log("translations-path", translationPath);
1419614196
console.log("only-languages:", onlyLanguages);
1419714197
console.log("ignore-languages:", ignoreLanguages);
1419814198

14199+
console.log("here!?");
14200+
1419914201
main().catch((error) => {
1420014202
core.setFailed(error.message);
1420114203
});
@@ -14215,6 +14217,7 @@ function getArrayInput(value) {
1421514217

1421614218
function parseFile(file) {
1421714219
console.log("Parsing file:", file);
14220+
1421814221
const translation = po2json.parseFileSync(file);
1421914222
const language = translation[""].language.trim().toLowerCase();
1422014223
const details = {
@@ -14275,7 +14278,12 @@ async function main() {
1427514278
core.setOutput("coverage", coverage);
1427614279

1427714280
const context = github.context.payload;
14278-
if (!token || !context.head_commit) return;
14281+
14282+
// if (!token || !context.head) {
14283+
if (!context.pull_request.head) {
14284+
console.log("no commit", token, context);
14285+
return;
14286+
}
1427914287

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

14300+
console.log({ conclusion });
14301+
console.log({ minCoverage });
14302+
1429214303
octokit.checks.create({
1429314304
owner: context.repository.owner.login,
1429414305
repo: context.repository.name,
1429514306
name: "i18n-coverage",
14296-
head_sha: context.head_commit.id,
14307+
head_sha: context.pull_request.head.sha,
1429714308
status: "completed",
14298-
conclusion,
14309+
conclusion: "failure",
1429914310
output: {
1430014311
title: `${coverage.toFixed(0)}% i18n coverage.`,
1430114312
summary: summary + `, min-coverage: ${minCoverage}%`,

0 commit comments

Comments
 (0)