| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 return match[1]; | 35 return match[1]; |
| 36 return null; | 36 return null; |
| 37 } | 37 } |
| 38 | 38 |
| 39 function findReviewer(message) | 39 function findReviewer(message) |
| 40 { | 40 { |
| 41 var regexp = /(?:^|\n)\s*(?:TB)?R=(.+)/; | 41 var regexp = /(?:^|\n)\s*(?:TB)?R=(.+)/; |
| 42 var reviewers = findUsingRegExp(message, regexp); | 42 var reviewers = findUsingRegExp(message, regexp); |
| 43 if (!reviewers) | 43 if (!reviewers) |
| 44 return null; | 44 return null; |
| 45 return reviewers.replace(/\s*,\s*/, ', '); | 45 return reviewers.replace(/\s*,\s*/g, ', '); |
| 46 } | 46 } |
| 47 | 47 |
| 48 function findBugID(message) | 48 function findBugID(message) |
| 49 { | 49 { |
| 50 var regexp = /(?:^|\n)\s*BUG=(.+)/; | 50 var regexp = /(?:^|\n)\s*BUG=(.+)/; |
| 51 var value = findUsingRegExp(message, regexp); | 51 var value = findUsingRegExp(message, regexp); |
| 52 if (!value) | 52 if (!value) |
| 53 return null; | 53 return null; |
| 54 var result = value.split(/\s*,\s*/).map(function(id) { | 54 var result = value.split(/\s*,\s*/).map(function(id) { |
| 55 var parsedID = parseInt(id.replace(/[^\d]/g, ''), 10); | 55 var parsedID = parseInt(id.replace(/[^\d]/g, ''), 10); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 trac.recentCommitData = function(path, limit) | 126 trac.recentCommitData = function(path, limit) |
| 127 { | 127 { |
| 128 return net.xml('http://blink.lc/blink/atom').then(function(commitData) { | 128 return net.xml('http://blink.lc/blink/atom').then(function(commitData) { |
| 129 return parseCommitData(commitData); | 129 return parseCommitData(commitData); |
| 130 }); | 130 }); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 })(); | 133 })(); |
| OLD | NEW |