-
Notifications
You must be signed in to change notification settings - Fork 55
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
Search query for PRs returns metrics for issues #59
Comments
I haven't been able to reproduce this. Here's what I'm doing and maybe you can tell me if there is something different. I've got this as my search query:
That returns this as the results which are all pull requests: Issue Metrics
|
Query looks basically the same. The response from the PR query lists issue titles in the workflow logs, so something fundamentally isn't right |
I am seeing the same thing, I think it is because this looks to only work for PRs that have issues attached (and it actually uses the Issues API instead of the PR api, so it pulls the metrics to related Issues instead of the PR?). |
is there an open source repository we can troubleshoot/reproduce this on or should I create one? |
Maybe we should be using |
I tested to see if it pull only metrics related to issues and it does not appear to work that way. Not in the output below that many of the pull requests do not have associated issues. SEARCH_QUERY='repo:github/issue-metrics is:pr' Output: Issue Metrics
|
at least for my use case, I figured out the problem. I was trying to edit your code a bit to try something and didn't fully understand yet! can't speak to paul's problem however, but mine at least was unrelated to this issue. Thanks for open sourcing this and sorry for the noise on this issue (hope you can help paul)! |
Thanks for reporting back @philnielsen. Glad its working for you!! |
Is my query going to return PRs created in said month, if they have been merged and closed? Does |
Yes, the query you mentioned,
When I test out type:pr is works the same as is:pr, but maybe you will get different results. Interested to hear. This also makes me think, did your repo have any pull requests that were created in June? If not, I wouldn't expect any results. |
Definitely had PRs created in June. Will try |
I'm experiencing a similar thing, if I use the query in the UI: I get over 100 pr's, however running this inside the action I get: |
Solved my own problem... Not sure if it's worth a doc change, but if wanting to search for pr's, make sure the permissions are enabled at the start (rather than just write for issues, eg: permissions: |
I'll add this and report back |
Setting the Thanks @andrewgbell for the tip. |
I have a query "repo:owner/repo is:pr created:${{ env.last_month }}" that I run after the same query, but for issues.
However, the issue created for this query is exactly the same as the one for issues. No PRs are mentioned in the issue metrics text.
The text was updated successfully, but these errors were encountered: