asfgit closed pull request #32: add PR title to the PR number for autocomplete 
TC branch
URL: https://github.com/apache/ignite-teamcity-bot/pull/32
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ignite-tc-helper-web/src/main/webapp/index.html 
b/ignite-tc-helper-web/src/main/webapp/index.html
index 3e4909b..4a1c520 100644
--- a/ignite-tc-helper-web/src/main/webapp/index.html
+++ b/ignite-tc-helper-web/src/main/webapp/index.html
@@ -47,7 +47,7 @@
     <div style="text-align: center">I need to:</div>
     <a href="prs.html"><button class="idxpgbutton"><font 
size="30px">&#128269;</font><br>Inspect Contribution</button></a>
     <a href="guard.html"><button class="idxpgbutton"><font 
size="30px">&#x1F6E1;&#xFE0F;</font><br>Monitor TC state</button></a>
-    <a href="comparison.html"><button class="idxpgbutton"><font 
size="30px">&#x1F4C9;</font><br>See test progres</button></a>
+    <a href="comparison.html"><button class="idxpgbutton"><font 
size="30px">&#x1F4C9;</font><br>See test progress</button></a>
     <a href="index0.html"><button class="idxpgbutton"><font 
size="30px">&lambda;</font><br>I like old home page</button></a>
 </div>
 
diff --git a/ignite-tc-helper-web/src/main/webapp/js/common-1.6.js 
b/ignite-tc-helper-web/src/main/webapp/js/common-1.6.js
index b1a925c..613e411 100644
--- a/ignite-tc-helper-web/src/main/webapp/js/common-1.6.js
+++ b/ignite-tc-helper-web/src/main/webapp/js/common-1.6.js
@@ -214,13 +214,15 @@ function tcHelperLogout() {
 /**
  * Change autocomplete filter to show results only when they starts from 
written text.
  */
-$.ui.autocomplete.filter = function (array, term) {
-    var matcher = new RegExp("^" + $.ui.autocomplete.escapeRegex(term), "i");
+function setAutocompleteFilter() {
+    $.ui.autocomplete.filter = function (array, term) {
+        var matcher = new RegExp("^" + $.ui.autocomplete.escapeRegex(term), 
"i");
 
-    return $.grep(array, function (value) {
-        return matcher.test(value.label || value.value || value);
-    });
-};
+        return $.grep(array, function (value) {
+            return matcher.test(value.label || value.value || value);
+        });
+    };
+}
 
 var callbackRegistry = {};
 
@@ -278,6 +280,8 @@ function setupAutocompleteList(srvIds) {
     for (let srvId of srvIds)
         gitUrls.set(srvId, "");
 
+    setAutocompleteFilter();
+
     startFillAutocompleteListsProcess();
 }
 
@@ -347,8 +351,11 @@ function _fillBranchAutocompleteList(result) {
 
         branchesForTc[entry[0]] = [{label:"master", 
value:"refs/heads/master"}];
 
-        for (let pr of result.data)
-            branchesForTc[entry[0]].push({label: pr.number, value: "pull/" + 
pr.number + "/head"});
+        for (let pr of result.data) {
+            branchesForTc[entry[0]].push({label: pr.number + " " + pr.title, 
value: "pull/" + pr.number + "/head"});
+            branchesForTc[entry[0]].push({label: "pull/" + pr.number + "/head 
" + pr.title,
+                value: "pull/" + pr.number + "/head"});
+        }
 
         $(".branchForTc" + entry[0]).autocomplete({source: 
branchesForTc[entry[0]]});
     }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to