cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject cordova-coho git commit: filter out "close #XXX" commit messages from release note compilation.
Date Wed, 26 Apr 2017 01:24:56 GMT
Repository: cordova-coho
Updated Branches:
  refs/heads/master 90187c337 -> 521dad479


filter out "close #XXX" commit messages from release note compilation.


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/521dad47
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/521dad47
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/521dad47

Branch: refs/heads/master
Commit: 521dad4791498e5de06013e2e1b8956b32ba88d9
Parents: 90187c3
Author: filmaj <maj.fil@gmail.com>
Authored: Tue Apr 25 18:24:52 2017 -0700
Committer: filmaj <maj.fil@gmail.com>
Committed: Tue Apr 25 18:24:52 2017 -0700

----------------------------------------------------------------------
 src/update-release-notes.js | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/521dad47/src/update-release-notes.js
----------------------------------------------------------------------
diff --git a/src/update-release-notes.js b/src/update-release-notes.js
index 62324c0..87cebab 100644
--- a/src/update-release-notes.js
+++ b/src/update-release-notes.js
@@ -113,6 +113,8 @@ function bold(text, token) {
     return text.replace(new RegExp(" " + token, "gi"), " **" + token + "**");
 }
 
+var GITHUB_CLOSE_COMMIT_MSG = /^\*\s+Close\s+\#\d+$/gi;
+
 function *createNotes(repo, newVersion, changes, overrideDate) {
     // pump changes through JIRA linkifier first through a stream pipe
 	var transformer = linkify.stream("CB");
@@ -128,6 +130,12 @@ function *createNotes(repo, newVersion, changes, overrideDate) {
 	}
 	read.pipe(transformer).pipe(write);
     yield co_stream.wait(write); // wait for the writable stream to finish/end
+    // remove any commit logs in the form "Close #xxx", used for closing github pull requests.
+    var lines = data.split('\n');
+    data = lines.filter(function(line) {
+        return !(line.match(GITHUB_CLOSE_COMMIT_MSG));
+    }).join('\n');
+
     // some more release note linting: enclose in backticks certain tokens
     data = backtick(data, 'plugin.xml');
     flagutil.computeReposFromFlag('platforms').map(function(r) { return r.repoName; }).forEach(function(platform_name)
{


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message