@@ -42,8 +42,8 @@ const encode = (str: string): string =>
4242
4343async function run ( ) : Promise < void > {
4444 try {
45- const tagName = getReleaseTagName ( )
46- const version = getVersion ( tagName )
45+ const tempTagName = getReleaseTagName ( )
46+ const version = getVersion ( tempTagName )
4747 const indent = parseInt ( core . getInput ( 'indent' ) || DEFAULT_INDENT )
4848 const allReleases = await octokit . rest . repos . listReleases ( {
4949 owner : github . context . repo . owner ,
@@ -55,12 +55,18 @@ async function run(): Promise<void> {
5555 await addDelay ( 10 * 1000 )
5656
5757 const release = allReleases . data . find (
58- item => item . tag_name === tagName || item . tag_name === `v${ tagName } `
58+ item =>
59+ item . tag_name === tempTagName || item . tag_name === `v${ tempTagName } `
5960 )
6061 if ( ! release ) {
61- throw new Error ( `no release found with tag ${ tagName } or v${ tagName } ` )
62+ throw new Error (
63+ `no release found with tag ${ tempTagName } or v${ tempTagName } `
64+ )
6265 }
6366
67+ // use the tag from the release
68+ const tagName = release . tag_name
69+
6470 const releaseMap = new Map < string , string > ( )
6571 for ( const asset of release ?. assets || [ ] ) {
6672 core . info ( `calculating sha of ${ asset . browser_download_url } ` )
@@ -147,8 +153,9 @@ async function run(): Promise<void> {
147153 return
148154 }
149155
150- core . info ( 'making webhook request to create PR' )
151- await httpclient . post ( RELEASE_BOT_WEBHOOK_URL , JSON . stringify ( releaseReq ) )
156+ const rawBody = JSON . stringify ( releaseReq )
157+ core . info ( `making webhook request to create PR ${ rawBody } ` )
158+ await httpclient . post ( RELEASE_BOT_WEBHOOK_URL , rawBody )
152159 } catch ( error ) {
153160 if ( error instanceof Error ) core . setFailed ( error . message )
154161 }
0 commit comments