3 ms·
I just updated a userscript I created a while back so it works with the new code search: https://github.com/skratchdot/github-code-search.user.js/ https://githu
by BinaryBullet 14y ago
I just updated a userscript I created a while back so it works with the new code search: https://github.com/skratchdot/github-code-search.user.js/ https://github.com/skratchdot/github-code-search.user.js/
It's just a shortcut for searching the current repository you are viewing (by adding a search box next to the tag count).
- BillSaysThis 14y agoYour script would be awesome, something I don't understand why Github doesn't provide natively. Unfortunately it isn't working for me that well. Go to one of my org's repos: http://github.com/railsforcharity/spokenvote http://github.com/railsforcharity/spokenvote and search this string (which is in our seeds.rb): users << User.create({name: 'Voter1', email: 'voter1@example.com', password: 'abc123', password_confirmation: 'abc123'}) I not only don't get the right result, I don't get any text in the search results area of the page, not even a nothing found message. Same thing if I do the search on my personal fork.
- BinaryBullet 14y agoSorry for the delay. I was at work so couldn't respond right away. All the userscript does is proxy the advanced search results page, so the search you tried hits this page: https://github.com/search?type=Code&q=users+%3C%3C+User.create%28{name%3A+%27Voter1%27%2C+email%3A+%27voter1%40example.com%27%2C+password%3A+%27abc123%27%2C+password_confirmation%3A+%27abc123%27}%29+repo%3Arailsforcharity%2Fspokenvote&p=1 https://github.com/search?type=Code&q=users+%3C%3C+User.... If you only search for voter1@example.com, results are shown: https://github.com/search?type=Code&q=voter1%40example.com+repo%3Arailsforcharity%2Fspokenvote&p=1 https://github.com/search?type=Code&q=voter1%40example.c... Anyways, you did find a "0 results" bug which should now be fixed. Thanks for that!
- BillSaysThis 14y agoGlad to point out someone else's mistake for a change ;)