Skip to content

userSetEnvType and envType keynames are replaced by the string env #2663

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

Merged
merged 8 commits into from
Jun 12, 2025

Conversation

aanchalakto
Copy link
Contributor

No description provided.

@gauravakto gauravakto requested a review from Copilot June 12, 2025 09:28
Copy link
Contributor

@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 updates how environment key names are handled by replacing the "userSetEnvType" and "envType" prefixes with "env". Key changes include:

  • Updating the key transformation logic in util functions.
  • Adjusting the API collection conversion to apply the new key naming.
  • Refactoring the filter choices update in IssuesPage to use a more robust lookup rather than a hard-coded index.

Reviewed Changes

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

File Description
apps/dashboard/web/polaris_web/web/src/util/func.js Updated key transformation logic to replace prefixes.
apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/observe/api_collections/ApiCollections.jsx Modified environment key mapping to incorporate the new transformation.
apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/issues/IssuesPage/IssuesPage.jsx Refactored filter selection to use a key-based lookup for tags.
Comments suppressed due to low confidence (2)

apps/dashboard/web/polaris_web/web/src/util/func.js:710

  • Consider extracting the environment key transformation logic into a helper function to reduce duplication and improve maintainability across the codebase.
const keyName = env.keyName.startsWith('userSetEnvType') || env.keyName.startsWith('envType') ? env.keyName.replace(/^(userSetEnvType|envType)/, 'env') : env.keyName;

apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/observe/api_collections/ApiCollections.jsx:205

  • The key transformation logic is repeated in multiple places; consider extracting it into a shared utility function to ensure consistency and ease future updates.
envType: c?.envType?.map((type) => (type?.keyName?.replace(/^(userSetEnvType|envType)/, 'env')?.slice(0, 30) + '=' + type?.value)),

…tions-integration

# Conflicts:
#	apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/observe/api_collections/ApiCollections.jsx
… API Collections - Collection type column and tags search
… API Collections - Collection type column and tags search
… API Collections - Collection type column and tags search
@gauravakto gauravakto merged commit dcbb5b4 into master Jun 12, 2025
3 checks passed
@gauravakto gauravakto deleted the feature/tags-collections-integration branch June 12, 2025 10:02
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