Fix previous commit

This commit is contained in:
garronej 2022-01-19 01:26:19 +01:00
parent 6c824d7c3c
commit 66b83c9642
3 changed files with 16 additions and 4 deletions

View file

@ -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(