8000 feat: Add Email field support for Line connections by developerkunal · Pull Request #680 · auth0/go-auth0 · GitHub
[go: up one dir, main page]

Skip to content

feat: Add Email field support for Line connections#680

Merged
developerkunal merged 2 commits intov1from
fix/line-connection-email-field
Jan 30, 2026
Merged

feat: Add Email field support for Line connections#680
developerkunal merged 2 commits intov1from
fix/line-connection-email-field

Conversation

@developerkunal
Copy link
Contributor

🔧 Changes

This PR adds support for the email field in Line social connections to fix issue #675.

Types and methods changed:

  • Added Email *bool field to ConnectionOptionsOAuth2 struct with json:"email,omitempty" tag
  • Updated UnmarshalJSON method in connection.go to properly handle Line strategy with ConnectionOptionsOAuth2
  • Generated GetEmail() getter method and test in management.gen.go and management.gen_test.go

Summary:
The Email field allows users to request the email scope for Line connections (and other OAuth2 connections that support it). This field is optional and uses omitempty.

📚 References

🔬 Testing

Integration tests added:

  • It_can_successfully_create_a_Line_Connection - Tests creating a Line connection with Email field
  • It_can_successfully_read_a_Line_Connection - Tests reading a Line connection with Email field
  • It_can_successfully_find_a_Line_Connection_by_its_name - Tests finding a Line connection by name
  • It_can_successfully_update_a_Line_Connection - Tests updating a Line connection with Email field

All tests include HTTP recordings showing the email field is correctly sent in requests and received in responses.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

- 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
Copilot AI review requested due to automatic review settings January 14, 2026 11:05
@developerkunal developerkunal requested a review from a team as a code owner January 14, 2026 11:05
Copy link
Copilot AI left a comment

Choose a reason for hiding this comment

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

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 *bool field to ConnectionOptionsOAuth2 struct 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.

@developerkunal developerkunal changed the title Add Email field support for Line connections feat: Add Email field support for Line connections Jan 14, 2026
@developerkunal developerkunal linked an issue Jan 14, 2026 that may be closed by this pull request
6 tasks
@codecov-commenter
Copy link
codecov-commenter commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.69%. Comparing base (c34a45f) to head (76ab76f).
⚠️ Report is 1 commits behind head on v1.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@developerkunal developerkunal enabled auto-merge (squash) January 30, 2026 06:52
@developerkunal developerkunal merged commit d00068f into v1 Jan 30, 2026
4 checks passed
@developerkunal developerkunal deleted the fix/line-connection-email-field branch January 30, 2026 06:56
@developerkunal developerkunal mentioned this pull request Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have 800C an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConnectionOptionsLine missing Email field for LINE social connection

4 participants

0