Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: third_party/pkg/angular/scripts/git/validate-commit-msg.js

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env node 1 #!/usr/bin/env node
2 2
3 /** 3 /**
4 * Git COMMIT-MSG hook for validating commit message 4 * Git COMMIT-MSG hook for validating commit message
5 * See https://docs.google.com/document/d/1rk04jEuGfk9kYzfqCuOlPTSJw3hEDZJTBN5E5 f1SALo/edit 5 * See https://docs.google.com/document/d/1rk04jEuGfk9kYzfqCuOlPTSJw3hEDZJTBN5E5 f1SALo/edit
6 * 6 *
7 * Installation: 7 * Installation:
8 * >> cd <angular-repo> 8 * >> cd <angular-repo>
9 * >> ln -s scripts/git/validate-commit-msg.js .git/hooks/commit-msg 9 * >> ln -s ../../scripts/git/validate-commit-msg.js .git/hooks/commit-msg
10 */ 10 */
11 var fs = require('fs'); 11 var fs = require('fs');
12 var util = require('util'); 12 var util = require('util');
13 13
14 14
15 var MAX_LENGTH = 100; 15 var MAX_LENGTH = 100;
16 var PATTERN = /^(?:fixup!\s*)?(\w*)(\(([\w\$\.\-\*/]*)\))?\: (.*)$/; 16 var PATTERN = /^(?:fixup!\s*)?(\w*)(\(([\w\$\.\-\*/]*)\))?\: (.*)$/;
17 var IGNORED = /^WIP\:/; 17 var IGNORED = /^WIP\:/;
18 var TYPES = { 18 var TYPES = {
19 feat: true, 19 feat: true,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 if (!validateMessage(msg)) { 97 if (!validateMessage(msg)) {
98 fs.appendFile(incorrectLogFile, msg + '\n', function() { 98 fs.appendFile(incorrectLogFile, msg + '\n', function() {
99 process.exit(1); 99 process.exit(1);
100 }); 100 });
101 } else { 101 } else {
102 process.exit(0); 102 process.exit(0);
103 } 103 }
104 }); 104 });
105 } 105 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/scripts/generate-expressions.sh ('k') | third_party/pkg/angular/scripts/karma/snapshot.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698