@signalk/github-create-release
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -42,8 +42,20 @@ #!/usr/bin/env node | ||
{ | ||
const tags = await octokit.repos.listTags({owner, repo, per_page:!updateAll ? 2 : 100, pages:1 }) | ||
const tags = await octokit.repos.listTags({owner, repo, per_page:!updateAll ? 10 : 100, pages:1 }) | ||
for ( let i = 0; i < tags.data.length; i++ ) { | ||
if ( tags.data.length == 0 ) { | ||
console.error('no tags found') | ||
process.exit(-1) | ||
} | ||
if ( tags.data[0].name.includes('beta') ) { | ||
console.log('Not creating release notes for a beta') | ||
process.exit(0) | ||
} | ||
let prev = tags.data[0].name | ||
for ( let i = 1; i < tags.data.length; i++ ) { | ||
const tag = tags.data[i] | ||
if ( tag.name != 'latest' && i != 0 ) { | ||
const prev = tags.data[i-1].name | ||
if ( !tag.name.includes('beta') && tag.name != 'latest' ) { | ||
console.log(`compare base: ${tag.name} head: ${prev}`) | ||
//const commits = { data: { commits: [] } } | ||
const commits = await octokit.repos.compareCommits({owner, repo, base:tag.name, head:prev}) | ||
@@ -74,2 +86,3 @@ | ||
console.log(`created or updated ${prev}`) | ||
prev = tag.name | ||
if ( !updateAll ) { | ||
@@ -76,0 +89,0 @@ break |
{ | ||
"name": "@signalk/github-create-release", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Create a GitHub Release Using Pull Requests", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
15483
82
0