mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
add logs
This commit is contained in:
parent
efe9b73716
commit
6c824d7c3c
3 changed files with 22 additions and 2 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
|
|
@ -9186,7 +9186,7 @@ function action(_actionName, params, core) {
|
||||||
"branchAhead": branch
|
"branchAhead": branch
|
||||||
}).catch(() => ({ "commits": undefined }));
|
}).catch(() => ({ "commits": undefined }));
|
||||||
if (commits === undefined) {
|
if (commits === undefined) {
|
||||||
core.warning(`${branchBehind} probably does not exist`);
|
core.warning(`${owner}/${repo}#${branchBehind} probably does not exist ( branch: ${branch})`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const [branchBehindVersion, branchAheadVersion] = yield Promise.all([branchBehind, branch]
|
const [branchBehindVersion, branchAheadVersion] = yield Promise.all([branchBehind, branch]
|
||||||
|
|
|
||||||
20
src/test/getCommitAhead.ts
Normal file
20
src/test/getCommitAhead.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { createOctokit } from "../tools/createOctokit";
|
||||||
|
import { getCommitAheadFactory } from "../tools/octokit-addons/getCommitAhead";
|
||||||
|
|
||||||
|
(async ()=>{
|
||||||
|
|
||||||
|
const octokit = createOctokit({ "github_token": "" });
|
||||||
|
|
||||||
|
const { getCommitAhead } = getCommitAheadFactory({ octokit });
|
||||||
|
|
||||||
|
const { commits } = await getCommitAhead({
|
||||||
|
"owner": "InseeFrLab",
|
||||||
|
"repo": "keycloakify",
|
||||||
|
"branchBehind": "v4.5.1",
|
||||||
|
"branchAhead": "Ann2827/pull"
|
||||||
|
}).catch(() => ({ "commits": undefined }));
|
||||||
|
|
||||||
|
console.log(commits);
|
||||||
|
|
||||||
|
|
||||||
|
})()
|
||||||
|
|
@ -73,7 +73,7 @@ export async function action(
|
||||||
|
|
||||||
if( commits === undefined ){
|
if( commits === undefined ){
|
||||||
|
|
||||||
core.warning(`${branchBehind} probably does not exist`);
|
core.warning(`${owner}/${repo}#${branchBehind} probably does not exist ( branch: ${branch})`);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue