@withgateway/sdk 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -1
- package/dist/index.mjs.map +1 -1
- package/dist/tracing/index.js +10 -1
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/index.mjs +10 -1
- package/dist/tracing/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var require_package = __commonJS({
|
|
|
25
25
|
"package.json"(exports2, module2) {
|
|
26
26
|
module2.exports = {
|
|
27
27
|
name: "@withgateway/sdk",
|
|
28
|
-
version: "0.1.
|
|
28
|
+
version: "0.1.10",
|
|
29
29
|
description: "Gateway SDK for TypeScript - A/B experiments, tracing, and observability",
|
|
30
30
|
main: "./dist/index.js",
|
|
31
31
|
module: "./dist/index.mjs",
|
|
@@ -2938,6 +2938,15 @@ function attributionFromEnv() {
|
|
|
2938
2938
|
const ref = process.env.GITHUB_REF ?? "";
|
|
2939
2939
|
const prMatch = /refs\/pull\/(\d+)\//.exec(ref);
|
|
2940
2940
|
if (prMatch) attribution.prNumber = Number(prMatch[1]);
|
|
2941
|
+
if (process.env.GATEWAY_PR_TITLE) {
|
|
2942
|
+
attribution.prTitle = process.env.GATEWAY_PR_TITLE.slice(0, 300);
|
|
2943
|
+
}
|
|
2944
|
+
if (process.env.GATEWAY_PR_BODY) {
|
|
2945
|
+
attribution.prDescription = process.env.GATEWAY_PR_BODY.slice(0, 2e3);
|
|
2946
|
+
}
|
|
2947
|
+
if (attribution.repo && attribution.prNumber && !("prUrl" in attribution)) {
|
|
2948
|
+
attribution.prUrl = `https://github.com/${String(attribution.repo)}/pull/${String(attribution.prNumber)}`;
|
|
2949
|
+
}
|
|
2941
2950
|
return attribution;
|
|
2942
2951
|
}
|
|
2943
2952
|
async function registerBuild(params) {
|