Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to pass in raw GitHub Issues Search query instead of scopes and labels #3

Open
izuzak opened this issue Sep 20, 2015 · 2 comments

Comments

@izuzak
Copy link
Owner

izuzak commented Sep 20, 2015

Currently, github_issue_stats uses the scopes and labels parameters to define the set of issues for which statistics are collected. This is then transformed into a GitHub Issues Search query and the statistics are collected by executing that query via the Search API.

However, the GitHub Issues Search is much more powerful than that and offers more filters. For example, it's possible to define a query on two repositories and scope it to issues with no labels. Such a query is not possible currently with only the scopes and labels parameters.

It would be neat to support any Issues Search query as a valid way to select the set of issues for which stats are collected, instead of using scopes and labels. Such a query could be passed in using a new parameter --query. That would make this tool even more powerful and flexible.

@izuzak
Copy link
Owner Author

izuzak commented Sep 29, 2015

I was thinking a bit more about this, and it seems to me that both "row" and "columns" of the matrix with the desired data could be defined using search queries.

For example, a command which computes the breakdown of issues by created_at would have these as rows:

  • repo:atom/atom is:issue
  • repo:atom/atom label:bug
  • repo:atom/atom label:enhancement
  • repo:atom/atom is:pr

And would have these as columns:

  • created:2012-01-01..2013-01-01
  • created:2013-01-01..2014-01-01
  • created:2014-01-01..2015-01-01

And the program would then combine these to get to 4 x 3 = 12 full queries which it would execute and return data for.

@izuzak
Copy link
Owner Author

izuzak commented Sep 29, 2015

Even if this workflow isn't what's exposed to the user, it would be interesting to have this as infrastructure to have a unified way of collecting data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant