fix: #221 filtered issues in archived repositories#223
Conversation
|
This is almost exactly what I was planning on doing to address #221 - thank you for beating me to it, @yokishava ! I am curious to learn more about why you removed the test. I was planning on adding a test to I think there's still value in testing the archived/sort functionality - do you agree ? If so, should we add the test back in? |
|
Thank you for comment! The reason for removing the tests is that the changes made it harder to write tests. You are right that it would be better to have tests, but if we are going to write tests, I think we need to make more changes to FetchIssue and FetchPullRequests to get there. I have lowered the priority of the tests to reduce the scope of the changes. If you still think it would be better to have tests, I would be happy to modify them too. |
Ah, yes. The I agree that both of those seem out of scope for this change, so I agree with removing the tests. |
|
I'm good with this as well. |
data/issueapi.go
Outdated
| issues = append(issues, node.Issue) | ||
| } | ||
|
|
||
| sort.Slice(issues, func(i, j int) bool { |
There was a problem hiding this comment.
Can you please create an issue that removes the sorting code, and adds a default sort:updated like in https://docs.github.com/en/search-github/getting-started-with-searching-on-github/sorting-search-results#sort-by-updated-date
There was a problem hiding this comment.
I'm not sure I follow the reference - this PR is #223 and when I searched existing issues and PRs for sort I don't see any other issue that I could reference.
There was a problem hiding this comment.
I swear I pasted a link to the Github filters docs and not an issue number :D
There was a problem hiding this comment.
Thanks for review!
I removed soting codes.
I added sort qualifier to makeIssuesQuery and makePullRequestsQuery .
Summary
I've tried to filter archived pull requests before, but I saw this issue
We have done the same for issues in archived repositories.
#221
I also saw a comment that the code was becoming redundant. I considered modifying the code to take that into account, but decided against it because the scope of the change would be too large.
How did you test this change?
excludeArvhicedPullRequestsin prsection.gosortin prsection.go and issuesection.goImages/Videos
before

after

I used this repository to check if archived issues are filtered.
https://github.com/yokishava/element