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

IsEmergency functions for short numbers #191

Merged

Conversation

S4more
Copy link
Contributor

@S4more S4more commented Jan 17, 2025

Added ConnectsToEmergencyNumber and IsEmergencyNumber based on Java implementation.
There was also a typo XML builder that would prevent the emergency XML tag from being parsed.

The metadata for shortnumbers needs to be updated. Not sure if I should also update the other as well

partially solves #184

@S4more S4more changed the title Change builder and add shortnumber emergency functions Emergency functionality for short numbers Jan 17, 2025
@S4more S4more marked this pull request as ready for review January 17, 2025 21:22
@S4more S4more changed the title Emergency functionality for short numbers IsEmergency functions for short numbers Jan 17, 2025
@@ -1,6 +1,8 @@
package phonenumbers

import (
"slices"
Copy link
Member

Choose a reason for hiding this comment

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

use golang.org/x/exp/slices

@rowanseymour
Copy link
Member

@S4more merge main to get tests to pass even with codecov flakiness (a1a3a19)

@S4more S4more requested a review from rowanseymour January 17, 2025 22:06
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 47.61%. Comparing base (a1a3a19) to head (5f7382b).

Files with missing lines Patch % Lines
shortnumber_info.go 85.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #191      +/-   ##
==========================================
+ Coverage   46.81%   47.61%   +0.80%     
==========================================
  Files          11       11              
  Lines        3798     3818      +20     
==========================================
+ Hits         1778     1818      +40     
+ Misses       1869     1851      -18     
+ Partials      151      149       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rowanseymour rowanseymour merged commit a8597be into nyaruka:main Jan 18, 2025
5 checks passed
@rowanseymour
Copy link
Member

@S4more thanks! Released as 1.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants