This commit is contained in:
garronej 2022-01-19 01:15:46 +01:00
parent efe9b73716
commit 6c824d7c3c
3 changed files with 22 additions and 2 deletions

2
dist/index.js vendored
View file

@ -9186,7 +9186,7 @@ function action(_actionName, params, core) {
"branchAhead": branch
}).catch(() => ({ "commits": undefined }));
if (commits === undefined) {
core.warning(`${branchBehind} probably does not exist`);
core.warning(`${owner}/${repo}#${branchBehind} probably does not exist ( branch: ${branch})`);
return;
}
const [branchBehindVersion, branchAheadVersion] = yield Promise.all([branchBehind, branch]

View 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);
})()

View file

@ -73,7 +73,7 @@ export async function action(
if( commits === undefined ){
core.warning(`${branchBehind} probably does not exist`);
core.warning(`${owner}/${repo}#${branchBehind} probably does not exist ( branch: ${branch})`);
return;