mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Fix previous commit
This commit is contained in:
parent
6c824d7c3c
commit
66b83c9642
3 changed files with 16 additions and 4 deletions
10
dist/index.js
vendored
10
dist/index.js
vendored
|
|
@ -921,7 +921,10 @@ function action(_actionName, params, core) {
|
|||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.debug(JSON.stringify(params));
|
||||
const { owner, repo } = params;
|
||||
const branch = params.branch.split("/").reverse()[0];
|
||||
//params.branch <- github.head_ref || github.ref
|
||||
//When it's a normal branch: github.head_ref==="" and github.ref==="refs/heads/main"
|
||||
//When it's a pr from: github.head_ref==="<name of the branch branch>"
|
||||
const branch = params.branch.replace(/^refs\/heads\//, "");
|
||||
const npm_or_yarn = yield node_fetch_1.default(urlJoin("https://raw.github.com", owner, repo, branch, "yarn.lock")).then(res => res.status === 404 ? "npm" : "yarn");
|
||||
core.debug(`Version on ${owner}/${repo}#${branch} is using ${npm_or_yarn}`);
|
||||
return { npm_or_yarn };
|
||||
|
|
@ -9168,7 +9171,10 @@ function action(_actionName, params, core) {
|
|||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { owner, repo, github_token } = params;
|
||||
const branch = params.branch.split("/").reverse()[0];
|
||||
//params.branch <- github.head_ref || github.ref
|
||||
//When it's a normal branch: github.head_ref==="" and github.ref==="refs/heads/main"
|
||||
//When it's a pr from: github.head_ref==="<name of the branch branch>"
|
||||
const branch = params.branch.replace(/^refs\/heads\//, "");
|
||||
core.debug(`params: ${JSON.stringify(params)}`);
|
||||
const exclude_commit_from_author_names = JSON.parse(params.exclude_commit_from_author_names_json);
|
||||
const octokit = createOctokit_1.createOctokit({ github_token });
|
||||
|
|
|
|||
|
|
@ -31,7 +31,10 @@ export async function action(
|
|||
|
||||
const { owner, repo } = params;
|
||||
|
||||
const branch = params.branch.split("/").reverse()[0];
|
||||
//params.branch <- github.head_ref || github.ref
|
||||
//When it's a normal branch: github.head_ref==="" and github.ref==="refs/heads/main"
|
||||
//When it's a pr from: github.head_ref==="<name of the branch branch>"
|
||||
const branch = params.branch.replace(/^refs\/heads\//, "");
|
||||
|
||||
const npm_or_yarn = await fetch(
|
||||
urlJoin(
|
||||
|
|
|
|||
|
|
@ -39,7 +39,10 @@ export async function action(
|
|||
github_token
|
||||
} = params;
|
||||
|
||||
const branch = params.branch.split("/").reverse()[0];
|
||||
//params.branch <- github.head_ref || github.ref
|
||||
//When it's a normal branch: github.head_ref==="" and github.ref==="refs/heads/main"
|
||||
//When it's a pr from: github.head_ref==="<name of the branch branch>"
|
||||
const branch = params.branch.replace(/^refs\/heads\//, "");
|
||||
|
||||
core.debug(`params: ${JSON.stringify(params)}`);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue