andygrunwald / go-jira

Go client library for Atlassian Jira
https://pkg.go.dev/github.com/andygrunwald/go-jira?tab=doc
MIT License
1.47k stars 469 forks source link

export custom types in user service that are exposed in function signatures #633

Closed AlexVulaj closed 10 months ago

AlexVulaj commented 1 year ago

What type of PR is this?

What this PR does / why we need it:

This PR takes a few custom, unexported types in user.go and exports them. These types are used in multiple function signatures on UserService, making it impossible to write a user-defined interface for those functions which UserService can implement. Exporting these types will allow UserService to properly implement a user-defined interface, which will in turn allow for cleaner testing and mocking.

Which issue(s) this PR fixes:

Fixes #179

Special notes for your reviewer:

It would be awesome to get this out in a 1.x release before 2.x to unblock any ongoing testing efforts from users. This shouldn't be a breaking change, as nobody would've been able to use the unexported type prior to this pull request anyway.

Additional documentation e.g., usage docs, etc.:

noticed a minor typo in the README while going through and cleaned that up as well

andygrunwald commented 1 year ago

Thanks @AlexVulaj for this pr. I am currently short on time for open-source contributions due to other/private obligations. This means the review of this PR can take a bit. I have seen that my peer @ghostsquad already had a look into it (this is great!). Thanks for contributing to open source, and thanks for understanding.

AlexVulaj commented 1 year ago

@andygrunwald no worries! I appreciate you taking a look. Let me know if there are any changes required.

AlexVulaj commented 10 months ago

@andygrunwald gentle ping - any updates?

andygrunwald commented 10 months ago

@AlexVulaj Sorry for the delay. Private things. I had a quick check on this. Looks good from my side.

I won't merge this into the 1.x branch anymore.