Skip to content

Commit

Permalink
Ignore prereleases
Browse files Browse the repository at this point in the history
#75

Co-authored-by: Ryan Tsao <[email protected]>
  • Loading branch information
rtsao authored and fusion-bot[bot] committed Mar 11, 2019
1 parent 9543304 commit a3321d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ module.exports = robot => {
async function handler(context) {
const release = context.payload.release;

// Don't generate release notes for prereleases
if (release.prerelease) {
return;
}

const releasesBySha = await fetchAllReleases(context);

const {commits} = await getChangeInfo(
Expand Down Expand Up @@ -99,6 +104,10 @@ async function fetchAllReleases(context, handler = () => {}) {
);
await fetchPages(github, req, results => {
results.data.forEach(release => {
if (release.prerelease) {
// Ignore prereleases, so changelog reflects changes since last non-prerelease
return;
}
releasesBySha.set(release.target_commitish, release);
handler(release);
});
Expand Down

0 comments on commit a3321d0

Please sign in to comment.