Skip to content

Commit

Permalink
fix: replace all instances of pr number in the routing url
Browse files Browse the repository at this point in the history
  • Loading branch information
JivusAyrus committed Aug 22, 2024
1 parent 4c693e5 commit f0b4062
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const create = async ({
continue;
}
const featureSubgraphName = `${subgraph.name}-${inputs.namespace}-${prNumber}`;
const routingURL = subgraph.routingUrl.replace('${PR_NUMBER}', prNumber.toString());
const routingURL = subgraph.routingUrl.replaceAll('${PR_NUMBER}', prNumber.toString());
const command = `wgc feature-subgraph publish ${featureSubgraphName} --subgraph ${subgraph.name} --routing-url ${routingURL} --schema ${subgraph.schemaPath} -n ${inputs.namespace}`;
await exec.exec(command);
featureSubgraphNames.push(featureSubgraphName);
Expand Down Expand Up @@ -257,7 +257,7 @@ const update = async ({
continue;
}
const featureSubgraphName = `${subgraph.name}-${inputs.namespace}-${prNumber}`;
const routingURL = subgraph.routingUrl.replace('${PR_NUMBER}', prNumber.toString());
const routingURL = subgraph.routingUrl.replaceAll('${PR_NUMBER}', prNumber.toString());
const command = `wgc subgraph delete ${featureSubgraphName} -n ${inputs.namespace} -f`;
await exec.exec(command);
featureSubgraphsToDestroy.push({
Expand All @@ -274,7 +274,7 @@ const update = async ({
continue;
}
const featureSubgraphName = `${subgraph.name}-${inputs.namespace}-${prNumber}`;
const routingURL = subgraph.routingUrl.replace('${PR_NUMBER}', prNumber.toString());
const routingURL = subgraph.routingUrl.replaceAll('${PR_NUMBER}', prNumber.toString());
const command = `wgc feature-subgraph publish ${featureSubgraphName} --subgraph ${subgraph.name} --routing-url ${routingURL} --schema ${subgraph.schemaPath} -n ${inputs.namespace}`;
await exec.exec(command);
featureSubgraphNames.push(featureSubgraphName);
Expand Down Expand Up @@ -383,7 +383,7 @@ const destroy = async ({
continue;
}
const featureSubgraphName = `${subgraph.name}-${inputs.namespace}-${prNumber}`;
const routingURL = subgraph.routingUrl.replace('${PR_NUMBER}', prNumber.toString());
const routingURL = subgraph.routingUrl.replaceAll('${PR_NUMBER}', prNumber.toString());
const command = `wgc subgraph delete ${featureSubgraphName} -n ${inputs.namespace} -f`;
await exec.exec(command);
featureSubgraphsToDestroy.push({
Expand Down

0 comments on commit f0b4062

Please sign in to comment.