feat: Add Email field support for Line connections#680
Merged
developerkunal merged 2 commits intov1from Jan 30, 2026
Merged
Conversation
- Add Email field to ConnectionOptionsOAuth2 for Line social connections - Update UnmarshalJSON to properly handle Line strategy - Add comprehensive tests for Create, Read, ReadByName, and Update operations - Generate getter methods and tests for the new Email field Fixes #675
There was a problem hiding this comment.
Pull request overview
This PR adds support for the email field in Line social connections, enabling users to request the email scope for OAuth2 connections that support it.
Changes:
- Added
Email *boolfield toConnectionOptionsOAuth2struct with appropriate JSON marshaling - Generated getter method
GetEmail()for the new field - Added comprehensive integration tests for Line connections covering create, read, find by name, and update operations
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| management/connection.go | Added Email field to ConnectionOptionsOAuth2 struct with documentation |
| management/management.gen.go | Generated GetEmail() getter method for the Email field |
| management/management.gen_test.go | Generated test coverage for GetEmail() method |
| management/connection_test.go | Added Line connection test case with Email field configuration |
| test/data/recordings/TestConnectionManager_Create/It_can_successfully_create_a_Line_Connection.yaml | HTTP recording validating Email field in Line connection creation |
| test/data/recordings/TestConnectionManager_Read/It_can_successfully_read_a_Line_Connection.yaml | HTTP recording validating Email field in Line connection read operations |
| test/data/recordings/TestConnectionManager_ReadByName/It_can_successfully_find_a_Line_Connection_by_its_name.yaml | HTTP recording validating Email field in Line connection find by name |
| test/data/recordings/TestConnectionManager_Update/It_can_successfully_update_a_Line_Connection.yaml | HTTP recording validating Email field in Line connection updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1 #680 +/- ##
=======================================
Coverage 96.69% 96.69%
=======================================
Files 62 62
Lines 10744 10748 +4
=======================================
+ Hits 10389 10393 +4
Misses 236 236
Partials 119 119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
duedares-rvj
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have
800C
an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
This PR adds support for the
emailfield in Line social connections to fix issue #675.Types and methods changed:
Email *boolfield toConnectionOptionsOAuth2struct withjson:"email,omitempty"tagUnmarshalJSONmethod inconnection.goto properly handle Line strategy withConnectionOptionsOAuth2GetEmail()getter method and test inmanagement.gen.goandmanagement.gen_test.goSummary:
The
Emailfield allows users to request the email scope for Line connections (and other OAuth2 connections that support it). This field is optional and usesomitempty.📚 References
🔬 Testing
Integration tests added:
It_can_successfully_create_a_Line_Connection- Tests creating a Line connection with Email fieldIt_can_successfully_read_a_Line_Connection- Tests reading a Line connection with Email fieldIt_can_successfully_find_a_Line_Connection_by_its_name- Tests finding a Line connection by nameIt_can_successfully_update_a_Line_Connection- Tests updating a Line connection with Email fieldAll tests include HTTP recordings showing the
emailfield is correctly sent in requests and received in responses.📝 Checklist