-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: update LD importer to use v2 endpoints #167
Conversation
elliotCamblor
commented
Oct 1, 2024
•
edited
Loading
edited
- Update to use v2 endpoints. These consolidate the feature configuration and feature updating into one endpoint.
- Update to support new startWith/endWith comparators. These map to LD startsWith/endsWith.
- Tested manually here: https://app.devcycle.com/o/org_U9F8YMaTChTEndWw/p/elliot-importer-test/features
@@ -140,7 +141,7 @@ | |||
|
|||
async createFeature(projectKey: string, feature: Feature): Promise<Feature> { | |||
const headers = await this.getHeaders() | |||
const response = await fetch(`${DVC_BASE_URL}/projects/${projectKey}/features`, { | |||
const response = await fetch(`${DVC_BASE_URL_V2}/projects/${projectKey}/features`, { |
Check warning
Code scanning / CodeQL
File data in outbound network request Medium
file data
@@ -151,7 +152,7 @@ | |||
|
|||
async updateFeature(projectKey: string, feature: Feature): Promise<Feature> { | |||
const headers = await this.getHeaders() | |||
const response = await fetch(`${DVC_BASE_URL}/projects/${projectKey}/features/${feature.key}`, { | |||
const response = await fetch(`${DVC_BASE_URL_V2}/projects/${projectKey}/features/${feature.key}`, { |
Check warning
Code scanning / CodeQL
File data in outbound network request Medium
file data
@@ -162,7 +163,7 @@ | |||
|
|||
async getFeaturesForProject(projectKey: string): Promise<Feature[]> { | |||
const headers = await this.getHeaders() | |||
const response = await fetch(`${DVC_BASE_URL}/projects/${projectKey}/features?perPage=1000`, { | |||
const response = await fetch(`${DVC_BASE_URL_V2}/projects/${projectKey}/features?perPage=1000`, { |
Check warning
Code scanning / CodeQL
File data in outbound network request Medium
file data
61eea77
to
d3f991a
Compare
d3f991a
to
3d5e453
Compare
Co-authored-by: Kaushal Kapasi <[email protected]>
options: { throwOnError: boolean } = { throwOnError: true } | ||
): Promise<FeatureConfiguration> { | ||
const headers = await this.getHeaders() | ||
const response = await fetch( | ||
`${DVC_BASE_URL}/projects/${projectKey}/features/${featureKey}/configurations?environment=${environment}`, | ||
`${DVC_BASE_URL_V2}/projects/${projectKey}/features/${feature.key}`, |
Check warning
Code scanning / CodeQL
File data in outbound network request Medium