Skip to content

Commit

Permalink
adjust api endpoint used to retrieve previous release tag
Browse files Browse the repository at this point in the history
The example I was working from was relying on the previous release being fully published and marked latest.
Since we leave experimental releases in prerelease state we need to retrieve it slightly differently.
  • Loading branch information
kevingranade authored Mar 20, 2024
1 parent 8d5e2e5 commit 35a22ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build-scripts/generate-release-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function main() {
const client = github.getOctokit(token);

const latestReleaseResponse = await client.request(
'GET /repos/{owner}/{repo}/releases/latest',
'GET /repos/{owner}/{repo}/releases',
{
owner: owner,
repo: repo,
Expand All @@ -29,7 +29,7 @@ async function main() {
},
}
);
const previousTag = latestReleaseResponse.data?.tag_name;
const previousTag = latestReleaseResponse.data?[0].tag_name;

const response = await client.request(
'POST /repos/{owner}/{repo}/releases/generate-notes',
Expand Down

0 comments on commit 35a22ef

Please sign in to comment.