File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ function getVersionTags() {
175
175
* @private
176
176
*/
177
177
function parseLogs ( logs ) {
178
- var regexp = / ^ (?: \* ) ? ( [ 0 - 9 a - f ] { 7 } ) ( (?: ( [ a - z ] + ) : ? ) ? .* ) \( ( .* ) \) / i,
178
+ var regexp = / ^ (?: \* ) ? ( [ 0 - 9 a - f ] { 7 , } ) ( (?: ( [ a - z ] + ) : ? ) ? .* ) \( ( .* ) \) / i,
179
179
parsed = [ ] ;
180
180
181
181
logs . forEach ( function ( log ) {
Original file line number Diff line number Diff line change @@ -249,6 +249,29 @@ describe("ReleaseOps", function() {
249
249
} ) ;
250
250
} ) ;
251
251
252
+ // https://github.com/eslint/eslint-release/issues/15
253
+ it ( "should gracefully handle commit shorthashes longer than 7 characters" , function ( ) {
254
+ var logs = [
255
+ "* 6b498edabcde Build: package.json and changelog update for 0.4.0-alpha.4 (Nicholas C. Zakas)" ,
256
+ "* 2578f31000 Fix: Changelog output (Nicholas C. Zakas)"
257
+ ] ,
258
+ releaseInfo = ReleaseOps . calculateReleaseFromGitLogs ( "0.4.0-alpha.4" , logs , "alpha" ) ;
259
+
260
+ assert . deepEqual ( releaseInfo , {
261
+ version : "0.4.0-alpha.5" ,
262
+ type : "patch" ,
263
+ changelog : {
264
+ build : [
265
+ "* 6b498edabcde Build: package.json and changelog update for 0.4.0-alpha.4 (Nicholas C. Zakas)"
266
+ ] ,
267
+ fix : [
268
+ "* 2578f31000 Fix: Changelog output (Nicholas C. Zakas)"
269
+ ]
270
+ } ,
271
+ rawChangelog : logs . join ( "\n" )
272
+ } ) ;
273
+ } ) ;
274
+
252
275
} ) ;
253
276
254
277
} ) ;
You can’t perform that action at this time.
0 commit comments