Skip to content
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

Refactor client composition logic and remove unnecessary Toggl flag #30

Merged
merged 4 commits into from
Oct 22, 2021

Conversation

gabor-boros
Copy link
Owner

Description

This PR does a major refactor on how the client composition is done and simplify client logic. Besides that, this commit reduces the duplicated logic across clients and outsources the authentication setter.

Additionally, it makes it easier to integrate new clients with more complex authentication methods, like Oauth2.

Also, the commit contains a change that removes the illogical flag for setting Toggl Track client base URL, hence that never changes.

Supporting information

N/A

Dependencies

N/A

Screenshots

N/A

Testing instructions

  • Run a fetch for every source
  • Run an upload for every target

Other information

This PR is kind of a requirement for integrating Zoho Books and other targets later on.

Checklist

  • Documentation is updated
  • Pull request is rebased onto main
  • Commit history is clean

Do a major refactor on how the client composition is done and simplify
client logic. Besides that, this commit reduces the duplicated logic
across clients and outsources the authentication setter.

Additionally, it makes it easier to integrate new clients with more
complex authentication methods, like Oauth2.

Also, the commit contains a change that removes the illogical flag for
setting toggl client base URL, hence that never changes.
@gabor-boros gabor-boros added the enhancement New feature or request label Oct 22, 2021
@gabor-boros gabor-boros added this to the v0.2.0 milestone Oct 22, 2021
@gabor-boros gabor-boros self-assigned this Oct 22, 2021
@boring-cyborg boring-cyborg bot added clockify Clockify integration documentation Improvements or additions to documentation tempo Tempo integration timewarrior Timewarrior integration toggl Toggl integration labels Oct 22, 2021
@codeclimate
Copy link

codeclimate bot commented Oct 22, 2021

Code Climate has analyzed commit 41398f5 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

The test coverage on the diff in this pull request is 91.8% (75% is the threshold).

This pull request will bring the total coverage in the repository to 78.8% (0.5% change).

View more on Code Climate.

@gabor-boros gabor-boros merged commit ecd1f08 into main Oct 22, 2021
@gabor-boros gabor-boros deleted the gabor/refactor-clients branch October 22, 2021 17:25
gabor-boros added a commit that referenced this pull request Oct 23, 2021
…l flag (#30)

* refactor: create Entries type
* refactor(tempo): use new Entries type and inline entry group upload
* refactor: add date time helpers
* refactor: reorganize client composition

Do a major refactor on how the client composition is done and simplify
client logic. Besides that, this commit reduces the duplicated logic
across clients and outsources the authentication setter.

Additionally, it makes it easier to integrate new clients with more
complex authentication methods, like Oauth2.

Also, the commit contains a change that removes the illogical flag for
setting toggl client base URL, hence that never changes.
gabor-boros added a commit that referenced this pull request Oct 23, 2021
…l flag (#30)

* refactor: create Entries type
* refactor(tempo): use new Entries type and inline entry group upload
* refactor: add date time helpers
* refactor: reorganize client composition

Do a major refactor on how the client composition is done and simplify
client logic. Besides that, this commit reduces the duplicated logic
across clients and outsources the authentication setter.

Additionally, it makes it easier to integrate new clients with more
complex authentication methods, like Oauth2.

Also, the commit contains a change that removes the illogical flag for
setting toggl client base URL, hence that never changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clockify Clockify integration documentation Improvements or additions to documentation enhancement New feature or request tempo Tempo integration timewarrior Timewarrior integration toggl Toggl integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant