-
Notifications
You must be signed in to change notification settings - Fork 409
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
Check that linked issues are open #3277
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3277 +/- ##
==========================================
- Coverage 61.65% 61.51% -0.14%
==========================================
Files 426 426
Lines 27399 27399
==========================================
- Hits 16892 16855 -37
- Misses 9506 9540 +34
- Partials 1001 1004 +3 see 10 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to testdata.go with an open and closed issue? If implemented correctly, they will show that this code doesn't detect closed issues correctly
@AlekSi I realised now there in no clear way to find issue open or closed by issue url like we used in our test, is there any better way? |
I think we could use the GitHub API via https://github.com/google/go-github. We have some examples there: https://github.com/FerretDB/github-actions/blob/main/conform-pr/main.go |
@KrishnaSindhur, any news? Anything we could help you with? |
Will raise a PR shortly!! |
@AlekSi this PR is like draft just want to know how to test locally? github token is required to test it locally and some repo information please check!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests fail because they are getting URLs like https://api.github.com/repos/owner/https://github.com/FerretDB/FerretDB/issues/2733
. They don't look valid :)
what we should do if we have below URL? should we ignore or catch it? |
That would be the equivalent of removing a test, and we want to keep that test. Let's find some other solution. For example, we could remove Let's also gather all URLs first, remove duplicates, and then check them. Right now we check the same issue multiple times, quickly running over a rate limit for unauthenticated requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlekSi should i make change to remove? this should be check in todo statement to check file name something and then avoid // want ..
so then how do we check for duplicate issue without a api hit? |
By collecting already checked URLs and not checking the same URL twice |
Thank you for all the hard work! |
hey sorry i was occupied with some other things could not spend time last 2 weeks |
No worries! :) |
Description
Closes #2733.
Readiness checklist
task all
, and it passed.@FerretDB/core
), Milestone (Next
), Labels, Project and project's Sprint fields.