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

feat(service): Add Google Chat Service #501

Merged
merged 16 commits into from
Jan 19, 2023

Conversation

EthanEFung
Copy link
Contributor

@EthanEFung EthanEFung commented Dec 31, 2022

Fixes issue #459

Description

Implements Google Chat Service integration.

Motivation and Context

This PR solves Issue #459

How Has This Been Tested?

Decent unit test coverage

gocov test | gocov report
ok      github.com/nikoksr/notify/service/googlechat    0.384s  coverage: 85.2% of statements

github.com/nikoksr/notify/service/googlechat/mock_create_call.go                 newMockCreateCall               100.00% (4/4)
github.com/nikoksr/notify/service/googlechat/mock_spaces_message_creator.go      newMockSpacesMessageCreator     100.00% (4/4)
github.com/nikoksr/notify/service/googlechat/mock_create_call.go                 @55:12                          100.00% (1/1)
github.com/nikoksr/notify/service/googlechat/mock_spaces_message_creator.go      @41:12                          100.00% (1/1)
github.com/nikoksr/notify/service/googlechat/googlechat.go                       Service.AddReceivers            100.00% (1/1)
github.com/nikoksr/notify/service/googlechat/googlechat.go                       Service.Send                    88.89% (8/9)
github.com/nikoksr/notify/service/googlechat/mock_spaces_message_creator.go      mockSpacesMessageCreator.Create 85.71% (6/7)
github.com/nikoksr/notify/service/googlechat/mock_create_call.go                 mockCreateCall.Do               81.25% (13/16)
github.com/nikoksr/notify/service/googlechat/googlechat.go                       newMessageCreator               80.00% (4/5)
github.com/nikoksr/notify/service/googlechat/googlechat.go                       New                             80.00% (4/5)
github.com/nikoksr/notify/service/googlechat/googlechat.go                       messageCreator.Create           0.00% (0/1)
github.com/nikoksr/notify/service/googlechat                                     ------------------------------- 85.19% (46/54)

Total Coverage: 85.19% (46/54)

Manual Testing
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@EthanEFung EthanEFung marked this pull request as draft January 2, 2023 23:35
@EthanEFung EthanEFung marked this pull request as ready for review January 3, 2023 17:03
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2023

Codecov Report

Base: 75.39% // Head: 75.18% // Decreases project coverage by -0.21% ⚠️

Coverage data is based on head (0c0b66c) compared to base (c9c12d4).
Patch coverage: 72.22% of modified lines in pull request are covered.

❗ Current head 0c0b66c differs from pull request most recent head 24b75cf. Consider uploading reports for the commit 24b75cf to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #501      +/-   ##
==========================================
- Coverage   75.39%   75.18%   -0.21%     
==========================================
  Files          38       41       +3     
  Lines        1276     1366      +90     
==========================================
+ Hits          962     1027      +65     
- Misses        234      249      +15     
- Partials       80       90      +10     
Impacted Files Coverage Δ
service/googlechat/mock_create_call.go 68.96% <68.96%> (ø)
service/googlechat/googlechat.go 70.45% <70.45%> (ø)
service/googlechat/mock_spaces_message_creator.go 82.35% <82.35%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@nikoksr nikoksr left a comment

Choose a reason for hiding this comment

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

@EthanEFung what an amazing PR! We appreciate it so much. Really, really high quality delivered from you here.

I just added some minor formatting/style changes, a missing comment or two, and one (I suppose) minor thing that needs our exchange. Other than that, there's basically nothing to do! Can't wait to get this merged into Notify.

service/googlechat/README.md Outdated Show resolved Hide resolved
service/googlechat/README.md Outdated Show resolved Hide resolved
service/googlechat/doc.go Outdated Show resolved Hide resolved
service/googlechat/doc.go Outdated Show resolved Hide resolved
service/googlechat/googlechat.go Outdated Show resolved Hide resolved
service/googlechat/googlechat.go Show resolved Hide resolved
service/googlechat/googlechat.go Outdated Show resolved Hide resolved
service/googlechat/googlechat.go Outdated Show resolved Hide resolved
@EthanEFung
Copy link
Contributor Author

Hey @nikoksr I'm having some trouble trying to resolve my dependencies with the main branch. I've tried resolving the conflicts by editing the go.mod file directly and running go mod tidy, but whenever I run the tidy command, my changes to the mod file are removed. I've tried updating the oauth package using go get golang.org/x/oauth2 but this upgrades the package to v0.4.0. I've also tried targeting the v.0.0.0 but this didn't work either. Any advise you can give to point me in the right direction?

@nikoksr
Copy link
Owner

nikoksr commented Jan 18, 2023

@EthanEFung sure thing! Should be resolved now. Could you please verify that everything's still working as intented? Tests and linter are happy.

Copy link
Owner

@nikoksr nikoksr left a comment

Choose a reason for hiding this comment

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

Sweet, all looking good! Waiting for your confirmation that everything's still working as intended and we're ready to merge.

@EthanEFung
Copy link
Contributor Author

@nikoksr Works well on my end

@nikoksr
Copy link
Owner

nikoksr commented Jan 19, 2023

@EthanEFung alright, ready to merge. Thank you so much once again for your contribution, we really appreciate it.

@nikoksr nikoksr merged commit 4f2a8f6 into nikoksr:main Jan 19, 2023
KaviiSuri added a commit to KaviiSuri/notify that referenced this pull request Feb 16, 2023
…ush-notification-service

* 'main' of https://github.com/nikoksr/notify: (65 commits)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/config to v1.18.13 (nikoksr#529)
  fix(deps): update module github.com/plivo/plivo-go/v7 to v7.19.0 (nikoksr#528)
  fix(deps): update module google.golang.org/api to v0.110.0 (nikoksr#527)
  fix(deps): update module github.com/bwmarrin/discordgo to v0.27.0 (nikoksr#509)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/service/sns to v1.20.2 (nikoksr#526)
  fix(deps): update module github.com/mailgun/mailgun-go/v4 to v4.8.2 (nikoksr#525)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/service/sns to v1.20.1 (nikoksr#524)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/service/ses to v1.15.1 (nikoksr#523)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/config to v1.18.12 (nikoksr#522)
  fix(deps): update module github.com/aws/aws-sdk-go-v2 to v1.17.4 (nikoksr#521)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/service/sns to v1.20.0 (nikoksr#520)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/config to v1.18.11 (nikoksr#519)
  fix(deps): update module google.golang.org/api to v0.109.0 (nikoksr#518)
  fix(deps): update module github.com/plivo/plivo-go/v7 to v7.18.0 (nikoksr#517)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/config to v1.18.10 (nikoksr#515)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/service/sns to v1.19.1 (nikoksr#514)
  fix(deps): update module github.com/aws/aws-sdk-go-v2/config to v1.18.9 (nikoksr#512)
  fix(deps): update module google.golang.org/api to v0.108.0 (nikoksr#511)
  feat(service): Add Google Chat Service (nikoksr#501)
  fix(deps): update module github.com/plivo/plivo-go/v7 to v7.17.1 (nikoksr#510)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants