Skip to content

fix: update type of some field of Project struct to match response from deps.dev API#71

Merged
edoardottt merged 3 commits into
edoardottt:develfrom
zaibon:project-types
May 17, 2024
Merged

fix: update type of some field of Project struct to match response from deps.dev API#71
edoardottt merged 3 commits into
edoardottt:develfrom
zaibon:project-types

Conversation

@zaibon

@zaibon zaibon commented May 16, 2024

Copy link
Copy Markdown
Contributor

fixes #70

@auto-assign
auto-assign Bot requested a review from edoardottt May 16, 2024 12:40
@edoardottt
edoardottt changed the base branch from main to devel May 16, 2024 14:38
@edoardottt

Copy link
Copy Markdown
Owner

Hi @zaibon. I've changed the base form main to devel. There are some conflicts that need to be resolved.

@zaibon
zaibon force-pushed the project-types branch 3 times, most recently from 1b2c788 to 38276d9 Compare May 16, 2024 15:03
@zaibon

zaibon commented May 16, 2024

Copy link
Copy Markdown
Contributor Author

@edoardottt Thanks, I've didn't see the devel branch. So I've rebased on it and fixed the conflict.

api = depsdev.NewV3API()
)

func TestGetProject(t *testing.T) {

Copy link
Copy Markdown
Owner

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

Copy link
Copy Markdown
Contributor Author

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"`

Copy link
Copy Markdown
Owner

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,

Score string `json:"score,omitempty"`
should be a number as far as I can see in the docs.
What do you think?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

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?

@edoardottt edoardottt self-assigned this May 17, 2024
@edoardottt
edoardottt self-requested a review May 17, 2024 14:24

@edoardottt edoardottt left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@edoardottt
edoardottt merged commit 47f5f63 into edoardottt:devel May 17, 2024
@zaibon
zaibon deleted the project-types branch May 28, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project structure contains field with wrong type

2 participants