Skip to content

Commit

Permalink
back to reg gen
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-statsig committed Jun 5, 2023
1 parent e04f721 commit 1b575c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
15 changes: 3 additions & 12 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

17 changes: 3 additions & 14 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,13 @@ async function run(): Promise<void> {

const octokit = github.getOctokit(token);

const latest = await octokit.rest.repos.getLatestRelease({
owner: 'statsig-io',
repo: publicRepo
});

const notes = await octokit.rest.repos.generateReleaseNotes({
owner: 'statsig-io',
repo: publicRepo,
tag_name: version,
previous_tag_name: latest.data.tag_name
});

const response = await octokit.rest.repos.createRelease({
owner: 'statsig-io',
repo: publicRepo,
tag_name: version,
body: `${body}\n\n###Genereated\n${notes.data.body}`,
name: title
body,
name: title,
generate_release_notes: true
});

console.log(`Released: ${response}`);
Expand Down

0 comments on commit 1b575c8

Please sign in to comment.