format upload url

This commit is contained in:
softprops 2021-08-07 18:33:23 -04:00
parent 11282f4ee9
commit d9cc08588c
4 changed files with 25 additions and 3 deletions

View file

@ -144,7 +144,10 @@ export const upload = async (
method: "POST",
body
});
return resp.json();
console.log(`resp`, resp);
const json = await resp.json();
console.log(`body`, json);
return json;
// return await gh.rest.repos.uploadReleaseAsset({
// url,

View file

@ -18,6 +18,14 @@ export interface Config {
input_target_commitish?: string;
}
export const uploadUrl = (url: string): string => {
const templateMarkerPos = url.indexOf("{");
if (templateMarkerPos > -1) {
return url.substring(0, templateMarkerPos);
}
return url;
};
export const releaseBody = (config: Config): string | undefined => {
return (
(config.input_body_path &&