-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[WIP] Make multiple repositories selectable @ issues/PR page #6369
Conversation
Will partially fix #6355
Codecov Report
@@ Coverage Diff @@
## master #6369 +/- ##
==========================================
+ Coverage 41.45% 41.48% +0.02%
==========================================
Files 442 442
Lines 59610 59636 +26
==========================================
+ Hits 24712 24739 +27
+ Misses 31667 31663 -4
- Partials 3231 3234 +3
Continue to review full report at Codecov.
|
Part of issue #6355 * Add RepoIDs to UserIssueStatsOptions to make "type" count correct when selecting one/multiple repos. * Replace variable "repo" with list "repos[]" and enable multiple selections of repositories from list by including/excluding RepoIDs in list. *
I'm not completely in the loop for this but why do we still have repoID and repoIDs here? |
Assuming you mean "why both", I think it is for fear of accidentally influencing something outside the scope of my intentions. I believe we can replace repoID with repoIDs[0] in the cases where there is only one, but I haven't been wanting to accidentally overreach. |
@oscarlofwenhamn for code readable consideration, I think @zeripath 's idea is better to keep only |
Improves functionality of the page, so that backtracking is not necessary to reset the page
Completely replace 'RepoID' with 'RepoIDs' and remove redundant code
* Pass repoIDs as `repos=[1,2,3...]` instead of several `repos[]=..` * Update tests file to reflect new functionality * Update template with new `repos` format * Implement new solution to show constant "total issues" count for "All" button
I'm at a loss, if I don't have a eureka moment when working on this next I think I will comment out the test in question: Messages: Request: GET /issues?type=created_by&repos=[0]&sort=&state=closed
--
247 | testlogger.go:57: 2019/05/15 06:47:22 ...ers/routes/routes.go:108:func1() [I] Completed GET /issues?type=created_by&repos=[0]&sort=&state=closed 404 Not Found in 2.919792ms Since there are a number of tests in the same document that are commented out, with reason listed as basically "these 404 when they should be fine", it doesn't seem like something that is unheard of. If the rest of the build runs fine, we can take a stance on the test in question, unless someone can think of what might be wrong - functionality is now as expected and desired.
|
This keeps returning 404 in the test despite working in practice, for the sake of running more tests I am commenting it out
Last attempt, if more tests crash I will uncomment the urls and request assistance.
It seems like the issue is the combination of
If anyone has any suggestions I would really appreciate a hand, currently I'm out of ideas. |
Hmm commenting out tests with the message "these should be fine but they're not" means that things are not fine at all... Ok you've got my attention. Look at a single URL that doesn't work and trace it back through. |
Your 404 is probably coming from here: Which implies that the testing user does not have permission to read the issues of that's repository. Does that make sense at all? |
Now probably I'd say that if you can't read a repository you should drop those issues from the list and from the totals found but I would have to look properly at this. It might be better to only search in repositories that the user has access to but you'd have to look at which is more efficient. |
@zeripath Thanks, that gives me some new points to mix my thought loop up. I feel like I've been staring myself blind at it a bit, so it's good to get a second look. I am suspecting the same source of the 404 (tampering with that chunk was what made the one previous test succeed despite not working in practice), so I'll make some new attempts at what you're suggesting. Also
Yes, very much so! |
* Re-enable tests * Make selecting "In your repositories" reset selection as passing IDs of repos belonging to other profiles causes breakage * Remove unnecessary (with multi-selection enable) code
I'm currently not able to keep working on this for a while, so I'm thinking it can be moved to 1.x.x for now. If someone feels like picking it up, they'd be welcome to do so. |
Will
partiallyfix #6355