This commit is contained in:
Stephan 2022-03-18 18:30:07 +01:00
parent 10c0963c6d
commit 06bdaca2c1

View File

@ -104,6 +104,10 @@ module.exports = /*async*/ ({github, context, core}) => {
// note: getReleaseByTag only returns published releases
// note: we may eventually need to paginate
// and then releases.headers should contain what we need?
// https://octokit.github.io/rest.js/v18#pagination
const version = context.payload.inputs.version
const tag = `v${version}`
const releases = await restapi.repos.listReleases({
@ -111,7 +115,7 @@ module.exports = /*async*/ ({github, context, core}) => {
repo: context.repo.repo
})
console.log(releases)
const release = firstOrDefault(releases.data, (x) => x.tag == tag)
const release = firstOrDefault(releases.data, (x) => x.tag_name == tag)
return release
}