A query tool for searching on projects in github - search

I am looking for an advanced query tool for github. the advanced search of github is not enough since it does not let you search for examples like this:
give me all projects that use a library such as qunit and have at least 100 closed issues.

Such an advanced search could only use the GitHub API.
However, none of the Issue API exposes closed issue for all repos.
It only find closed issues for a specific repo or a specific user, which means you would have first to list all repos, and then make a query for each one.
SO right now, the search is still a work in progress, and has seen many improvement in 2013 (see "Search code inside a Github project"), but it isn't yet at the level you are after.

Related

Where can I find a hook to customize the search via Shopware App?

I am prototyping a Shopware App right now, where I want to extend the search with our search API. We already have a working plugin in the store for that.
I found those two references for hooks:
https://developer.shopware.com/docs/resources/references/app-reference/webhook-events-reference
https://developer.shopware.com/docs/resources/references/app-reference/script-reference/script-hooks-reference
Seems like there is no webhook for the search at all and just a script-hook for a finished search. In the plugin, we could just extend the ProductSearchRoute and be completely flexible.
Are search extension not planned right now?
Cheers,
Tobias
I assume you want to alter the criteria for fetching the products. As of today this is not yet possible with non-self-hosted apps. You could use the app scripts to enrich or replace the contents of an already loaded page as you already mentioned. Obviously that comes with some drawbacks regarding performance. The capabilities of apps are being enhanced continuously though so there's chance search manipulation might become possible rather soon.

Creating a github dashboard on portfolio site

Thank you for giving me a piece of your time. This question really isn't a "how to", but more of a "is this possible or am I just insane?". I've recently looked at some portfolio pages and found a really great idea from https://flexdinesh.github.io/, but in the "portfolio" section instead of having just the characteristics of the project, is it possible to somehow use the Github API or some other equivalent to extract and present data like number of commits (or the table that github shows on your project page) and what project type it is (i.e. Java, Javascript, etc.) and maybe even some more related information. For background I am using React with Node.js. Again, this is probably useless to everyone out there, but I think it could be something cool if A) it actually exists, and B) it's not too much of a pain to implement. I've tried reading up on the documentation from Github, looking online, and looking at different source code, but no luck there. If anyone has any information or feedback I'm always open to help!
Thank you and have a good day
from what I understand, you want to display statistical information about the projects on your portfolio website.
Github provides an API that can get almost all the information you see on their website
so, to get all the languages being used in repository you can do a GET request on https://api.github.com/repos/:owner/:repo/languages,
To get the number of commits you can do a GET request on https://api.github.com/repos/:owner/:repo/commits
and so on
By default, these will get you the data of the public repositories, if you want to display info from your Private repositories, you need to provide an authentication token with each request.
You can read more about the API calls available here
let me know if you need any more help

github, how to search issues I posted or commented

github only list top several issues I posted or commented, so I'm wondering how to search for the rest of them myself, of all issues that I myself participated.
I achieved this by putting is:issue involves:my-username in GitHub search.
This chapter from official docs can be really helpful GitHub Help: Searching issues and pull requests.
Converting my comment to an answer - once you're logged in, navigating to https://github.com/issues will show all your issues (categorized to open and closed ones).
There isn't an officially supported way to do that yet. See issue: https://github.com/isaacs/github/issues/283.
However, in the Notification Settings, there is an option called "Include your own updates" which is unchecked by default.
If you check that, Github will send you an email for every comment/PR you make. Now you can use appropriate email filters/labels to make sure it doesn't clutter your email. Then searching for the issue you commented reduces to a problem of searching your email, which if done correctly, is much efficient.

In Excel Online, OfficeJS API is not passing the host_Info_ parameter anymore to Excel Add-In

I don't know when this started happening or if things have changed but the _host_Info param is not being passed by the framework to my Excel Add-In in Excel Online.
It passes an empty "et=" parameter which is OK in this case since I'm in dev mode. The Excel desktop client is still passing it.
This is required by my add-ins to switch functionality between Excel Online and Excel for Windows.
I've checked the docs and can't find that anything has changed.
To append to Sudhi's answer: with the official API coming as per the link in Sudhi's answer, we've gone ahead and also added a "shim" for the API in the OfficeJsHelpers library.
The shim still uses the workaround code that Sudhi mentions -- window.sessionStorage['hostInfoValue'] -- but it wraps it in an API very similar to what is coming in the official Office.js. Once the official API is available, we'll switch the shim code to make use of that instead. The beauty of this approach is that if you use OfficeJsHelpers via an NPM package, all you have to do is update your package dependency, and you'll suddenly go from an unofficial and potentially-fragile workaround to an API that relies on 100% officially-exposed properties -- all without changing your own code! Likewise, if at that time you decide to switch back to using the official Office.js version, the similarity of the APIs (essentially just namespace differences) should make it trivial to switch over the implementations.
The helper APIs are OfficeHelpers.Utilities.host (which will return WORD, EXCEL, etc.) and OfficeHelpers.Utilities.platform (which will return IOS, PC, OFFICE_ONLINE, or MAC). The constants are defined in OfficeHelpers.HostType and OfficeHelpers.PlatformType.
You can find the NPM package at https://www.npmjs.com/package/#microsoft/office-js-helpers, and either install it via NPM, or use a CDN like Unpkg to quickly try it out: https://unpkg.com/#microsoft/office-js-helpers#0.4.2/dist/office.helpers.min.js
console.log(OfficeHelpers.Utilities.host);
console.log(OfficeHelpers.Utilities.platform);
if (OfficeHelpers.Utilities.platform === OfficeHelpers.PlatformType.OFFICE_ONLINE) {
console.log("Yep, I'm on the web client");
}
I hope you find the above helpful as an interim measure, and we'll be sure to update this StackOverflow thread (and the OfficeJsHelpers code) once the official API is released.
Jim and others who may be affected by this change: it is unfortunate that an unrelated change meant to improve the add-in experience caused the query string parameter in online platform to be removed. Note that URL query parameters and session storage settings are used to launch and setup the add-in environment and are not meant for developer consumption. However, we understand the importance of this to the developers as described in this thread.
Hence, we are adding formal APIs to make this information available. Please see the specs that describes upcoming APIs: https://github.com/OfficeDev/office-js-docs/tree/ContextAdditions_OpenSpec
Until the APIs become available (should be very soon), you could use the following temporary workaround. The same query host_info_ parameter value is available in the following variable: window.sessionStorage.hostInfoValue. Please note that this should be considered a temporary measure and you should switch to using the formal API as soon as they are made available. I'll update the this thread when the API is released, which should be available for all supported Office versions.
If you have any comments, please leave your comments on the specs directly in Github specification branch using the links provided.
UPDATE:
Please see my answer above, instead (https://stackoverflow.com/a/40963500/678505), as the scenario is now possible.
[Old response:]
Jim, could you describe your scenario more? Why is it that you need to distinguish between Online and Desktop?
For the disappearance of host_info_: you won't find it in the docs, because host_info_ was never in the docs. Anything not documented is an internal API, which might change as needed by the internal workings of Office.js. We take back-compat very seriously, but only for actual official documented APIs.
Without an API, there's not much you can do to tell the two apart (or rather, not without relying on other bits of internal workings which might also change over time). We've discussed this internally before, but found it surprisingly difficult to point to a particular scenario where the platform information was necessary and legitimate ("legitimate" in the sense that if you're using platform information to check whether an API is available, for example, that's precisely what we don't want you to do; we want you to use Office.context.requirements.isSetSupported instead).
If you can share your scenario details, I might be able to advise an alternate way of determining whatever you need, or have a solid scenario to bring back to the team.

Is it possible to use multiple parameters in SonarQube search API?

After some time spent scouring google and looking through the Sonar Qube API documentation, along with trying a few permutations on common patterns, I have arrived to the point where I am wondering if it is even possible to use multiple parameters when doing an issue search in SonarQube's API.
Purpose of search is to populate a team radiator with issue data from Sonarqube. This data will be combined with build data from other sources (Or else I would just link to the SonarQube display page)
current configured URL to api is:
https://sonarqubesitehere.com/api/issues/search?=projectKeys=com.projectnamehere
(This is dummy code with names changed to protect the innocent)
I would like to be able to add a second parameter to this search that allows me to receive only major (or minor) issues that belong to the specific project I specify. the search term for that search is /search?severities=MAJOR
Anyone wrangled with this particular problem?
Please check the WS API on sonarqube.com or your own instance like: https://your-sonarqube.com/web_api/api/issues/search.
Here's an example of api/issues/search with several parameters
Hummmm... Provided that you read the Web API documentation for /issues/search, and that you know how to correctly write a URL that uses parameters, then it's quite easy to find that the solution is the following:
https://<your_server>/api/issues/search?projectKeys=project1Key,project2Key&severities=MINOR,MAJOR
Live example on SonarQube.com: https://sonarqube.com/api/issues/search?projectKeys=clang,git&severities=BLOCKER

Resources