@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.mjs
CHANGED
|
@@ -21,7 +21,7 @@ var require_package = __commonJS({
|
|
|
21
21
|
"package.json"(exports, module) {
|
|
22
22
|
module.exports = {
|
|
23
23
|
name: "@withgateway/sdk",
|
|
24
|
-
version: "0.1.
|
|
24
|
+
version: "0.1.10",
|
|
25
25
|
description: "Gateway SDK for TypeScript - A/B experiments, tracing, and observability",
|
|
26
26
|
main: "./dist/index.js",
|
|
27
27
|
module: "./dist/index.mjs",
|
|
@@ -2858,6 +2858,15 @@ function attributionFromEnv() {
|
|
|
2858
2858
|
const ref = process.env.GITHUB_REF ?? "";
|
|
2859
2859
|
const prMatch = /refs\/pull\/(\d+)\//.exec(ref);
|
|
2860
2860
|
if (prMatch) attribution.prNumber = Number(prMatch[1]);
|
|
2861
|
+
if (process.env.GATEWAY_PR_TITLE) {
|
|
2862
|
+
attribution.prTitle = process.env.GATEWAY_PR_TITLE.slice(0, 300);
|
|
2863
|
+
}
|
|
2864
|
+
if (process.env.GATEWAY_PR_BODY) {
|
|
2865
|
+
attribution.prDescription = process.env.GATEWAY_PR_BODY.slice(0, 2e3);
|
|
2866
|
+
}
|
|
2867
|
+
if (attribution.repo && attribution.prNumber && !("prUrl" in attribution)) {
|
|
2868
|
+
attribution.prUrl = `https://github.com/${String(attribution.repo)}/pull/${String(attribution.prNumber)}`;
|
|
2869
|
+
}
|
|
2861
2870
|
return attribution;
|
|
2862
2871
|
}
|
|
2863
2872
|
async function registerBuild(params) {
|