Skip to content

Conversation

@koblas
Copy link
Owner

@koblas koblas commented Oct 15, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 15, 2025 07:09
@gemini-code-assist
Copy link

Summary of Changes

Hello @koblas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request expands the library's international identifier validation capabilities by adding support for the Anguilla Tax Identification Number (TIN). It provides robust validation logic, proper formatting, and seamless integration, ensuring that Anguilla TINs can be accurately processed and verified within the system.

Highlights

  • New Anguilla TIN Support: Introduced full support for the Anguilla Tax Identification Number (TIN), including validation, formatting, and compaction functions.
  • README Update: The README.md file has been updated to reflect the addition of Anguilla's TIN to the list of supported identifiers.
  • Integration into Core Library: The new Anguilla TIN validator has been integrated into the main library's personValidators and entityValidators for the 'AI' country code.
  • Comprehensive Testing: Dedicated unit tests have been added for the Anguilla TIN to ensure correct validation and formatting behavior.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/release.yaml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

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 Anguilla Tax Identification Number (TIN) validation to the library, expanding the supported countries for tax ID validation.

  • Added complete implementation of Anguilla TIN validator with proper formatting and validation logic
  • Updated release workflow permissions for OIDC authentication
  • Added documentation entry for the new Anguilla TIN support

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/index.ts Imports new AI module and registers TIN validator for both person and entity validation
src/ai/tin.ts Implements Anguilla TIN validation logic with 9-digit format and prefix validation
src/ai/tin.spec.ts Comprehensive test suite covering valid/invalid formats and edge cases
src/ai/index.ts Module export file for AI country validators
README.md Documentation update adding Anguilla TIN to supported countries table
.github/workflows/release.yaml Adds OIDC permissions for GitHub Actions workflow

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to add support for the Anguilla Tax Identification Number (TIN). While the intent is good, the current implementation has several critical issues. The validation logic incorrectly assumes a 9-digit TIN, whereas the official OECD documentation cited in the code specifies a 10-digit number. This discrepancy affects length checks, formatting, and tests. Additionally, the logic to determine if a TIN belongs to an individual or a company is flawed. I've left specific comments on these points. Furthermore, this PR includes unrelated changes for Ghana, Taiwan, and Vietnam, which would be better handled in a separate pull request to maintain a clean commit history.

@koblas koblas requested a review from Copilot October 15, 2025 07:16
Copy link
Contributor

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

src/ai/tin.ts Outdated
isValid: true,
compact: value,
isIndividual: prefix == '1',
isCompany: prefix == '2',
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

Use strict equality operators (===) instead of loose equality (==) for type safety and consistency with TypeScript best practices.

Suggested change
isCompany: prefix == '2',
isCompany: prefix === '2',

Copilot uses AI. Check for mistakes.
koblas and others added 3 commits October 15, 2025 03:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@koblas koblas merged commit ce31473 into main Oct 15, 2025
2 checks passed
@koblas koblas deleted the add-ai-tin branch October 15, 2025 07:21
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.

2 participants