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

Add URL swapping for marketplace based on environment #8418

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Abhi1992002
Copy link
Contributor

Fixes #8371

These changes are needed to automatically switch between local and production marketplace URLs, ensuring the app connects to the correct environment (dev or prod) without manual intervention.

Changes 🏗️

  1. Swaps marketplace URL based on APP_ENV (dev or prod).
  2. Ensures correct URL is used for local or production environments.

@Abhi1992002 Abhi1992002 requested a review from a team as a code owner October 24, 2024 05:43
@Abhi1992002 Abhi1992002 requested review from Torantulino and aarushik93 and removed request for a team October 24, 2024 05:43
@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end labels Oct 24, 2024
Copy link

PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

8371 - Fully compliant

Fully compliant requirements:

  • Allow swapping of marketplace URL based on dev or prod environment
  • Use local marketplace for dev environment
  • Use production marketplace for prod environment
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns

Hardcoded URLs:
The PR introduces hardcoded URLs for both production and development environments. While this doesn't directly expose sensitive information, it's generally considered a security best practice to avoid hardcoding URLs, especially production ones, directly in the source code. Consider using environment variables or a secure configuration management system to store and retrieve these URLs.

⚡ Recommended focus areas for review

Hardcoded URLs
The production and local marketplace URLs are hardcoded in the component. Consider moving these to environment variables or a configuration file for better maintainability and security.

Copy link

netlify bot commented Oct 24, 2024

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit a7a5f68
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/673e3b668d677600097c4e9f
😎 Deploy Preview https://deploy-preview-8418--auto-gpt-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -7,7 +7,9 @@ interface MarketPopupProps extends ButtonHTMLAttributes<HTMLButtonElement> {

export default function MarketPopup({
className = "",
marketplaceUrl = "http://platform.agpt.co/marketplace",
marketplaceUrl = process.env.APP_ENV === "prod"
? "https://production-marketplace-url.com"
Copy link
Member

Choose a reason for hiding this comment

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

can we keep the existing link for prod and add a spot for one for "dev": https://dev-builder.agpt.co/marketplace and finally have the localhost fallback for local

@aarushik93 aarushik93 changed the base branch from master to dev October 31, 2024 17:56
@github-actions github-actions bot added size/m and removed size/s labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end Review effort [1-5]: 2 size/m
Projects
Status: 🚧 Needs work
Development

Successfully merging this pull request may close these issues.

[Market] Allow use of dev marketplace in dev project
3 participants