Skip to content

Commit ab95802

Browse files
committed
Update docs
1 parent 1c83bb9 commit ab95802

File tree

5 files changed

+18
-27
lines changed

5 files changed

+18
-27
lines changed

docs/GithubReleaseNotes.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ <h5>Parameters:</h5>
211211
<ul class="dummy">
212212
<li>
213213
<a href="gren.js.html">gren.js</a>,
214-
<a href="gren.js.html#sunlight-1-line-785">line 785</a>
214+
<a href="gren.js.html#sunlight-1-line-783">line 783</a>
215215
</li>
216216
</ul>
217217
</dd>
@@ -374,7 +374,7 @@ <h5>Parameters:</h5>
374374
<ul class="dummy">
375375
<li>
376376
<a href="gren.js.html">gren.js</a>,
377-
<a href="gren.js.html#sunlight-1-line-879">line 879</a>
377+
<a href="gren.js.html#sunlight-1-line-877">line 877</a>
378378
</li>
379379
</ul>
380380
</dd>
@@ -519,7 +519,7 @@ <h5>Parameters:</h5>
519519
<ul class="dummy">
520520
<li>
521521
<a href="gren.js.html">gren.js</a>,
522-
<a href="gren.js.html#sunlight-1-line-806">line 806</a>
522+
<a href="gren.js.html#sunlight-1-line-804">line 804</a>
523523
</li>
524524
</ul>
525525
</dd>
@@ -638,7 +638,7 @@ <h4 class="name" id="release"><span class="type-signature"></span>release()</h4>
638638
<ul class="dummy">
639639
<li>
640640
<a href="gren.js.html">gren.js</a>,
641-
<a href="gren.js.html#sunlight-1-line-839">line 839</a>
641+
<a href="gren.js.html#sunlight-1-line-837">line 837</a>
642642
</li>
643643
</ul>
644644
</dd>

docs/gren.js.html

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h1 class="page-title">Source: gren.js</h1>
103103
prerelease: false,
104104
dateZero: new Date(0),
105105
override: false,
106-
ignoredLabels: false, // || array of labels
106+
ignoreLabels: false, // || array of labels
107107
ignoreIssuesWith: false, // || array of labels
108108
template: templateConfig
109109
};
@@ -397,7 +397,7 @@ <h1 class="page-title">Source: gren.js</h1>
397397

398398
return issue.labels
399399
.filter(function(label) {
400-
return gren.options.ignoredLabels.indexOf(label.name) === -1;
400+
return gren.options.ignoreLabels.indexOf(label.name) === -1;
401401
})
402402
.map(function(label) {
403403
return template.generate({
@@ -597,13 +597,13 @@ <h1 class="page-title">Source: gren.js</h1>
597597
* @since 0.6.0
598598
* @private
599599
*
600-
* @param {Array} ignoredLabels The labels to ignore
600+
* @param {Array} ignoreLabels The labels to ignore
601601
* @param {Array} labels The labels to check
602602
*
603603
* @return {boolean} If the labels array contain any of the ignore ones
604604
*/
605-
function compareIssueLabels(ignoredLabels, labels) {
606-
return ignoredLabels
605+
function compareIssueLabels(ignoreLabels, labels) {
606+
return ignoreLabels
607607
.reduce(function(carry, ignoredLabel) {
608608
return carry &amp;&amp; labels.map(function(label) {
609609
return label.name;
@@ -840,12 +840,10 @@ <h1 class="page-title">Source: gren.js</h1>
840840
* @return {Promise}
841841
*/
842842
function hasNetwork() {
843-
return new Promise(function(resolve, reject) {
843+
return new Promise(function(resolve) {
844844
connectivity(function(isOnline) {
845845
if (!isOnline) {
846-
reject(chalk.red('You need to have network connectivity'));
847-
848-
return;
846+
console.warn(chalk.yellow('WARNING: Looks like you don\'t have network connectivity!'));
849847
}
850848

851849
resolve();
@@ -864,7 +862,7 @@ <h1 class="page-title">Source: gren.js</h1>
864862
function GithubReleaseNotes(options) {
865863
this.options = ObjectAssign({}, defaults, configFile, options || utils.getBashOptions(process.argv));
866864
this.options.tags = utils.convertStringToArray(this.options.tags);
867-
this.options.ignoredLabels = utils.convertStringToArray(this.options.ignoredLabels);
865+
this.options.ignoreLabels = utils.convertStringToArray(this.options.ignoreLabels);
868866
this.options.ignoreIssuesWith = utils.convertStringToArray(this.options.ignoreIssuesWith);
869867
this.repo = null;
870868
this.issues = null;

docs/index.html

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494

9595
<section class="readme-section">
96-
<article><h1>Github Release Notes</h1><p><a href="https://badge.fury.io/js/github-release-notes"><img src="https://badge.fury.io/js/github-release-notes.svg" alt="npm version"></a><br><a href="http://standardjs.com"><img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="js-standard-style"></a><br><a href="https://travis-ci.org/github-tools/github-release-notes"><img src="https://travis-ci.org/github-tools/github-release-notes.svg?branch=master" alt="Build Status"></a></p>
96+
<article><h1>Github Release Notes</h1><p><a href="https://badge.fury.io/js/github-release-notes"><img src="https://badge.fury.io/js/github-release-notes.svg" alt="npm version"></a><br><a href="http://standardjs.com"><img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="js-standard-style"></a><br><a href="https://travis-ci.org/github-tools/github-release-notes"><img src="https://travis-ci.org/github-tools/github-release-notes.svg?branch=master" alt="Build Status"></a><br><a href="https://gitter.im/github-release-notes/Lobby?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://badges.gitter.im/github-release-notes/Lobby.svg" alt="Join the chat at https://gitter.im/github-release-notes/Lobby"></a></p>
9797
<blockquote>
9898
<p>Node module that generates release notes based on commit messages or closed issues between tags. It also can create a full changelog or add the latest release notes to the existing changelog file.</p>
9999
</blockquote>
@@ -112,7 +112,7 @@ <h2>Options</h2><p>Following the options for the module:</p>
112112
<li><code>--action=release|changelog</code> The <strong>gren</strong> action to run. Default: <code>release</code> <em>(see details below for changelog generator)</em></li>
113113
<li><code>--tags=0.1.0|0.2.0,0.1.0</code> A specific tag or the range of tags to build the release notes from.</li>
114114
<li><code>--ignore-labels=wont_fix|wont_fix,duplicate</code> One or more labels to ignore in the output. Default: <code>false</code> <em>(it will still output the issue, just without the specified labels)</em></li>
115-
<li><code>--ignore-issues-with=wont_fix|wont_fix,duplicate</code> Ignore issues that contains one of the specified issues. Default: <code>false</code></li>
115+
<li><code>--ignore-issues-with=wont_fix|wont_fix,duplicate</code> Ignore issues that contains one of the specified labels. Default: <code>false</code></li>
116116
<li><code>--time-wrap=latest|history</code> The release notes you want to include in the changelog. Default: <code>latest</code> <em>Only applicable to the <code>changelog</code> action</em></li>
117117
<li><code>--changelog-filename=CHANGELOG.md</code> The name of the changelog file. Default: <code>CHANGELOG.md</code></li>
118118
<li><code>--data-source=issues|commits</code> The informations you want to use to build release notes. Default: <code>issues</code></li>
@@ -131,10 +131,8 @@ <h3>Config file</h3><p>You can create a <code>.gren.json</code> file where the t
131131
&quot;wontfix&quot;,
132132
&quot;duplicate&quot;
133133
]
134-
}</code></pre><h3>Templates</h3><p>With <strong>gren</strong> you can decide how you want to output the informations, using the templates.</p>
135-
<p>The default configuration is the following:</p>
134+
}</code></pre><h3>Templates</h3><p>You can configure the output of <strong>gren</strong> using templates. Set your own configuration inside the config file, which will be merged with the defaults, shown below:</p>
136135
<pre class="prettyprint source lang-json"><code>{
137-
&quot;...&quot;: &quot;...&quot;,
138136
&quot;template&quot;: {
139137
&quot;commit&quot;: &quot;- {{message}}&quot;,
140138
&quot;issue&quot;: &quot;- {{labels}} {{name}} {{link}}&quot;,
@@ -150,11 +148,6 @@ <h3>Config file</h3><p>You can create a <code>.gren.json</code> file where the t
150148
&quot;date&quot;: &quot;({{date}})&quot;
151149
}
152150
}
153-
}</code></pre><p>To customise the templates you need to change the <code>.gren.json</code> config file. You only need to specify what you want to change <em>e.g.</em></p>
154-
<pre class="prettyprint source lang-json"><code>{
155-
&quot;template&quot;: {
156-
&quot;issue&quot;: &quot;- {{name}}&quot;
157-
}
158151
}</code></pre><h2>Examples</h2><p>The ways to use <strong>gren</strong> are various.</p>
159152
<h3>Simple</h3><p>The simple way, just looks for the last tag, gets all the issues closed between that tag and the one before and creates the new release with the generated body.</p>
160153
<pre class="prettyprint source"><code>gren</code></pre><h3>Commit messages</h3><p>Adding the flag <code>--data-source=commits</code> will change the source of the release notes to be the commit messages.</p>
@@ -169,7 +162,7 @@ <h1>Changelog</h1><h2>v0.4.3 (02/03/2016)</h2><p>[<strong>bug</strong>] This is
169162
<h3>Generate a full changelog</h3><p>If tou want to generate the whole changelog, you need to use the <code>--time-wrap=history</code>. This will generate a changelog based on issues (or on commit messages if the <code>--data-source=commits</code> is present).</p>
170163
<p>If you want to override the existing changelog, use <code>--override</code>.</p>
171164
<p>The usage would then be:</p>
172-
<pre class="prettyprint source"><code>gren --time-wrap=history --override</code></pre><p>To see a full example of the changelog here <a href="https://github.com/github-tools/github-release-notes/blob/develop/CHANGELOG.md">CHANGELOG.md</a></p></article>
165+
<pre class="prettyprint source"><code>gren --action=changelog --time-wrap=history --override</code></pre><p>To see a full example of the changelog here <a href="https://github.com/github-tools/github-release-notes/blob/develop/CHANGELOG.md">CHANGELOG.md</a></p></article>
173166
</section>
174167

175168

docs/quicksearch.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/utils.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h1 class="page-title">Source: utils.js</h1>
130130
* @param {GithubReleaseNotes} gren
131131
*/
132132
function clearTasks(gren) {
133-
if (!gren.tasks.length) {
133+
if (!Object.keys(gren.tasks.length)) {
134134
return;
135135
}
136136

0 commit comments

Comments
 (0)