Skip to content

Conversation

purplecabbage
Copy link
Member

@purplecabbage purplecabbage commented Aug 12, 2025

Description

This PR modifies the logic for determining whether an API host is custom by comparing against a list of supported Adobe annotation endpoints instead of comparing against a default API host.

Changes the custom API host detection logic to use a whitelist approach
Adds debug logging for both custom API host and hostname detection

Related Issue

https://jira.corp.adobe.com/browse/ACNA-3977

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

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)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@purplecabbage purplecabbage requested a review from Copilot August 12, 2025 21:46
Copilot

This comment was marked as outdated.

purplecabbage and others added 2 commits August 12, 2025 14:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@purplecabbage purplecabbage requested a review from Copilot August 12, 2025 22:14
Copy link

@Copilot 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 modifies the custom API host detection logic to use a whitelist approach instead of comparing against a single default API host. The change compares the API host against a list of supported Adobe annotation endpoints to determine if it's custom.

  • Changes custom API host detection from single default comparison to whitelist validation
  • Adds debug logging for both API host and hostname custom detection
  • Includes a commented test case for future investigation of package action issues

Reviewed Changes

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

File Description
src/utils.js Updates custom API host detection logic to use whitelist approach and adds debug logging
test/utils.test.js Adds commented test case documenting known issue with non-default package actions

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

Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Member

@shazron shazron left a comment

Choose a reason for hiding this comment

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

Tested with a project, looks good

@purplecabbage purplecabbage merged commit 47331f3 into master Aug 12, 2025
9 checks passed
@shazron shazron deleted the FixCustomApi branch August 12, 2025 23:07
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