Conversation

li-clement

No description provided.

@coveralls

Coverage Status

Coverage decreased (-1.2%) to 87.04% when pulling 2755e3c on robekeane:gitee into 9c954e2 on go-playground:master.

@li-clement

It seems to be a lint-tool issue

)

type CommentEventPayload struct {
Action *string `json:"action,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be sure, do we actually need use pointers everywhere?
Probably sometimes it make sense to have simple types as is. Or you should distinguish empty string and nil?

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, you can generally omit "omitempty" for "incoming" types. You will use full structure anyway. It's more make sense for instantiating JSONs.

Copy link
Author

Choose a reason for hiding this comment

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

BTW, you can generally omit "omitempty" for "incoming" types. You will use full structure anyway. It's more make sense for instantiating JSONs.

Thanks, I'll make some improvements and then retest it.

Before *string `json:"before,omitempty"`
After *string `json:"after,omitempty"`
TotalCommitsCount int64 `json:"total_commits_count,omitempty"`
CommitsMoreThanTen *bool `json:"commits_more_than_ten,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

The same thing about bool! Do we actually need to distinguish false and nil everywhere?


// LabelHook : Label, issue and pull request labels
type LabelHook struct {
Id int32 `json:"id,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting thing! Sometimes you use int32, but sometimes int64. Does it make sense to have different types for IDs?

@Toshik1978

It seems to be a lint-tool issue

It should be good to investigate it. May be run linter locally. Are you sure, that linter pass successful?

@li-clement

The lint tool shows this, I don't know if there's something wrong with it. I test all the code on my own server, all the check items are pass.

level=error msg="Running error: buildir: failed to load package goarch: could not load export data: cannot import \"internal/goarch\" (unknown iexport format version 2), export data is newer version - update tool"

@Toshik1978

The lint tool shows this, I don't know if there's something wrong with it.

I'm a little bit busy right now, but will be able to investigate it in 1-2 weeks. Can you try, pls, the following: update linter version to the latest one (1.45.2). It's here:
https://.com/go-playground/webhooks/blob/master/./workflows/workflow.yml#L19

@li-clement

The lint tool shows this, I don't know if there's something wrong with it.

I'm a little bit busy right now, but will be able to investigate it in 1-2 weeks. Can you try, pls, the following: update linter version to the latest one (1.45.2). It's here: https://.com/go-playground/webhooks/blob/master/./workflows/workflow.yml#L19

@Toshik1978 Thanks for remind me that. I will try to fix it.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.