Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Conversation

@MorganEPatch
Copy link
Contributor

Depends on #14.

Group the GitHub and JIRA functions into client API objects which wrap the library APIs. This hides the details of the GitHub and JIRA APIs from the rest of the library, and allows us to create multiple clients for dry runs and test mocking.

@squat

@MorganEPatch MorganEPatch self-assigned this Aug 1, 2017
This was referenced Aug 2, 2017
@MorganEPatch
Copy link
Contributor Author

This isn't ready for review yet. I've been testing with dry runs, which do work just fine here, but there seems to be a bug causing crashes when run for real.

@squat
Copy link
Contributor

squat commented Aug 7, 2017

@LyonesGamer Ok. Please let me know if you need a hand. I would be happy to help you debug.

@MorganEPatch
Copy link
Contributor Author

@squat Should be fixed now. The issue is that the endpoints to create or update a JIRA issue return an issue object, but I didn't realize that object only has the key and ID set. So I need to call GET after a create or update in order to have the complete issue object.

Copy link
Contributor

@squat squat left a comment

Choose a reason for hiding this comment

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

@LyonesGamer overall this looks great. It nicely abstracts the logic from the rest of the library into new types. To clean this up further, it would be good to put the individual client go files into the lib package or a sub-package. The functions in these files are really dependencies of the library code and are not very useful as a standalone package. So after this we would have:

└── lib
     ├── clients
     │   ├── jira.go
     │   └── github.go
     ├── comments.go
     ├── issues.go
     └── ...

Copy link
Contributor

@squat squat left a comment

Choose a reason for hiding this comment

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

Cool let's merge this and iterate further.

Group the GitHub and JIRA functions into client API object which
wrap the library APIs. This hides the details of the GitHub and
JIRA APIs from the rest of the library, and allows us to create
multiple clients for dry runs and test mocking.
@MorganEPatch MorganEPatch merged commit 05f5a95 into coreos:master Aug 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants