givi - When pasting in PR URLs for review, accept URLs from the "Commits" and "Files...
authorTim Otten <totten@civicrm.org>
Sun, 28 Apr 2013 23:23:15 +0000 (16:23 -0700)
committerTim Otten <totten@civicrm.org>
Sun, 28 Apr 2013 23:23:15 +0000 (16:23 -0700)
bin/givi

index da9f07da825bc39298338600fb5811f5ce87436b..1769577571d0d7e4da8d054095b2f078c684463b 100755 (executable)
--- a/bin/givi
+++ b/bin/givi
@@ -43,7 +43,7 @@ class PullRequest {
    */
   public static function get($url, $repos) {
     foreach ($repos as $repo => $relPath) {
-      if (preg_match("/^https:\/\/github.com\/(.*)\/(civicrm-{$repo})\/pull\/([0-9]+)$/", $url, $matches)) {
+      if (preg_match("/^https:\/\/github.com\/(.*)\/(civicrm-{$repo})\/pull\/([0-9]+)(|\/commits|\/files)$/", $url, $matches)) {
         list ($full, $githubUser, $githubRepo, $githubPr) = $matches;
 
         $pr = new PullRequest();