-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: update type of some field of Project struct to match response from deps.dev API #71
Conversation
Hi @zaibon. I've changed the base form main to devel. There are some conflicts that need to be resolved. |
1b2c788
to
38276d9
Compare
@edoardottt Thanks, I've didn't see the devel branch. So I've rebased on it and fixed the conflict. |
…om deps.dev API fixes edoardottt#70
"github.com/stretchr/testify/require" | ||
) | ||
|
||
var ( | ||
api = depsdev.NewV3API() | ||
) | ||
|
||
func TestGetProject(t *testing.T) { |
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.
Unreliable. If someone stars the repo or fork it the test will fail
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.
Make sense, I've updated the test to skip comparing actual value.
OpenIssuesCount string `json:"openIssuesCount,omitempty"` | ||
StarsCount string `json:"starsCount,omitempty"` | ||
ForksCount string `json:"forksCount,omitempty"` | ||
OpenIssuesCount int `json:"openIssuesCount,omitempty"` |
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 would be better to change all the occurences of this issue. For example,
depsdev/pkg/depsdev/project.go
Line 53 in d19b20c
Score string `json:"score,omitempty"` |
What do you think?
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.
references: https://docs.deps.dev/api/v3/
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've added some other type fixe I could find. Any other I've missed?
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.
lgtm
fixes #70