Skip to content

Conversation

@dwhoban
Copy link

@dwhoban dwhoban commented Dec 5, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 5, 2025 12:16
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 a new 1Password provider to Alchemy, enabling infrastructure-as-code management of 1Password items through the 1Password JavaScript SDK.

Key changes:

  • Implements Item resource for creating/updating/deleting 1Password items with support for various categories (Login, SecureNote, ApiCredentials, etc.)
  • Adds ItemRef function for read-only fetching of existing items
  • Includes comprehensive test coverage for item lifecycle management

Reviewed changes

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

Show a summary per file
File Description
alchemy/src/1password/item.ts Core implementation of Item resource and ItemRef function with lifecycle management and type mapping
alchemy/src/1password/api.ts API client wrapper for 1Password SDK with authentication handling
alchemy/src/1password/index.ts Barrel export for 1Password provider modules
alchemy/test/1password/item.test.ts Comprehensive tests for Item and ItemRef functionality
alchemy/package.json Adds @1password/sdk dependency as optional peer dependency
alchemy/src/1password/README.md Provider documentation with usage examples
alchemy-web/src/content/docs/providers/1password/item.md User-facing documentation for Item resource
alchemy-web/src/content/docs/providers/1password/index.md Provider overview and authentication guide

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +378 to +384
const validCategories = new Set<string>([
"Login", "SecureNote", "CreditCard", "CryptoWallet", "Identity",
"Password", "Document", "ApiCredentials", "BankAccount", "Database",
"DriverLicense", "Email", "MedicalRecord", "Membership", "OutdoorLicense",
"Passport", "Rewards", "Router", "Server", "SshKey", "SocialSecurityNumber",
"SoftwareLicense", "Person", "Unsupported"
]);
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The validCategories, validFieldTypes, and validAutofillBehaviors sets are duplicated between the Item resource function (lines 378-396) and ItemRef function (lines 585-603). Extract these into shared constants at the module level to eliminate duplication and ensure consistency.

Copilot uses AI. Check for mistakes.
Comment on lines +404 to +409
const mapFieldType = (fieldType: ItemFieldType) => {
if (validFieldTypes.has(fieldType)) {
return sdk.ItemFieldType[fieldType as keyof typeof sdk.ItemFieldType] ?? sdk.ItemFieldType.Text;
}
return sdk.ItemFieldType.Text;
};
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The mapping functions (mapFieldType, mapAutofillBehavior, mapCategoryFromSdk, mapFieldTypeFromSdk, mapAutofillBehaviorFromSdk) are duplicated between the Item resource and ItemRef function. Extract these into shared utility functions at the module level to reduce duplication.

Copilot uses AI. Check for mistakes.
@sam-goodwin
Copy link
Collaborator

Can you provide a more informative PR title than "develop"?

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