Simple app querying public repos, Oauth app or Github app?

Hello,

I’ve been reading over the documentation for Github apps and Oauth apps and I need a bit of advice. Also I just want to make sure what I want to do is possible before I get to far down the road trying to figure things out.

I want to make a very simple app that takes 2 inputs: A topic, and a label

It then queries public repos of given topic, for issues with the given label.

For example if I provide “Laravel” as the topic, and “Good first issue” as the label, then I would get a list of issues labeled good first issue from only repos with the topic “Laravel”

Is it possible to query for issues from public repos? Or do permissions need to be granted first?

Should I pursue this as an oauth app or github app?

Thanks!
Isaac

:wave: hello there @isaackearl, and welcome to the GitHub Support Community!

It’s exciting to hear that you’re using GitHub data for your application. For these sorts of questions, I always find it very helpful to consult this article outlining the differences between GitHub Apps and OAuth Apps to start.

You can use either application––I think it would ultimately depend on your decision and the scope of your project’s requirements. Here’s some information about our search interface and our APIs that might help you make that decision.

On Search :mag:

For searching repositories, it’s possible to search by topic.

For searching issues and pull requests, it’s not possible to search for repositories with a certain topic. However, it is possible to filter that search type by using one of the following qualifiers:

  • repo qualifier: limit the issues to a specific repository
  • is qualifier: find issues in either public repositories only (is:public) or private repositories only (is:private)
  • label qualifier: find issues with a specific label

Here’s an example of searching for searching all public repositories with the good first issue label:

is:public label:"good first issue"

And here’s another example searching for a specific repository with that label:

repo:vuejs/vue label:"good first issue"

On APIs :bank:

Using either an OAuth App or a GitHub App requires programmatically interacting with the GitHub API. The Search API exposes these relevant endpoints for your use case:

Given the context so far, one approach your application can take is making two requests:

  • searching for repositories by some topic and store the results (where each result is a repository)
  • given those results, searching for issues with one of those repositories and one of those labels

Alternatively, you could also make just one request searching for issues with a specific label across all public repositories if that makes things easier!

On App permissions :robot::key:

Once a user has authorized access to your OAuth App, that application can use the access token to make requests on behalf of that user regardless of the scopes granted since these endpoints are accessible to the public.

On the other hand, GitHub Apps can only access these endpoint if it has the Read-only metadata permission (enabled by default).

Does this help? :thought_balloon: