-
Notifications
You must be signed in to change notification settings - Fork 36
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
skip draft pull requests #615
Conversation
github doesn't run any checks on draft PRs emulate this behaviour by skipping prs as long as they are draft fix: #596 Signed-off-by: Maxim Sukharev <[email protected]>
re-pushed with the test |
LGTM 👍 |
if called { | ||
cancel() | ||
} | ||
fmt.Fprint(w, `[{"id":1},{"id":2,"draft":true},{"id":3}]`) |
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.
Wound't it be better to use lookout-test-fixtures here?
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.
- It's a unit test, usually, it's a bad idea to use huge fixtures in unit tests. Unit tests should test the smallest part of the logic possible and it should be easy to understand what they do.
- We don't have fixtures for PRs list in lookout-test-fixtures repository.
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.
I don't entirely agree. In my opinion using fixture data does not automatically transform a unit test into an integration test. In this case the fixture is even vendored, so it's not so different from a hardcoded string.
But I don't want to block this PR for this.
github doesn't run any checks on draft PRs
emulate this behaviour by skipping prs as long as they are draft
fix: #596