Skip to content

Commit

Permalink
fix: stop gen pipe if no PRs found (#84)
Browse files Browse the repository at this point in the history
* docs: rollback latest release note

* fix: stop gen pipe if no PRs found
  • Loading branch information
adrianiy committed Oct 31, 2021
1 parent 3933f50 commit 985b304
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
15 changes: 15 additions & 0 deletions release-notes/RELEASE-NOTES-v1.8.0.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# RELEASE NOTES

# :rocket: Release 1.8.0
###### 2021-10-30

---

## :zap: Split release notes by release number
###### 2021-10-30

### Changes
<!-- Specify changes you've done in your PR, be as specific as you can! :) -->

Now we are splitting release notes by release number instead of timestamp, this help us avoid unnecessary files creation.

To improve experience we've changed default value of `useLast` to `2` so we get release-notes from the second latest release to the latest one, and we use latest release number in file name.

9 changes: 6 additions & 3 deletions src/generator/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ export abstract class Generator {

async generateReleaseNotes(): Promise<void> {
const list = await this._getPullRequestList();
const markdown = this._parsePullRequests(list);

await this._labelPullRequests(list);
if (list.length) {
const markdown = this._parsePullRequests(list);

this._storeMarkdown(markdown);
await this._labelPullRequests(list);

this._storeMarkdown(markdown);
}
}

async publishReleaseNotes(): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class PluginLoader {
}

async executePlugins(): Promise<void> {
if (this._configuration.webhooks) {
if (Object.keys(this._configuration.webhooks || {}).length) {
let willExecute = true;
if (this._interactive) {
const { response } = await inquirer.prompt([
Expand Down

0 comments on commit 985b304

Please sign in to comment.