paperclip-github-plugin 0.15.4 → 0.15.5
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/manifest.js +1 -1
- package/dist/worker.js +6 -2
- package/package.json +1 -1
package/dist/manifest.js
CHANGED
|
@@ -675,7 +675,7 @@ var COMPANY_METRIC_API_ROUTE_URL_PATH = `/api/plugins/${GITHUB_SYNC_PLUGIN_ID}/a
|
|
|
675
675
|
var require2 = createRequire(import.meta.url);
|
|
676
676
|
var packageJson = require2("../package.json");
|
|
677
677
|
var SCHEDULE_TICK_CRON = "* * * * *";
|
|
678
|
-
var MANIFEST_VERSION = "0.15.
|
|
678
|
+
var MANIFEST_VERSION = "0.15.5"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
|
|
679
679
|
var manifest = {
|
|
680
680
|
id: GITHUB_SYNC_PLUGIN_ID,
|
|
681
681
|
apiVersion: 1,
|
package/dist/worker.js
CHANGED
|
@@ -17497,7 +17497,10 @@ var plugin = definePlugin({
|
|
|
17497
17497
|
});
|
|
17498
17498
|
ctx.actions.register("settings.updateBoardAccess", async (input, actionContext) => {
|
|
17499
17499
|
const previous = normalizeSettings(await ctx.state.get(SETTINGS_SCOPE));
|
|
17500
|
-
const config = await
|
|
17500
|
+
const [config, trustedConfig] = await Promise.all([
|
|
17501
|
+
getResolvedConfig(ctx),
|
|
17502
|
+
ctx.config.get().then((value) => normalizeConfig(value))
|
|
17503
|
+
]);
|
|
17501
17504
|
const record = normalizeActionRecord(input, actionContext);
|
|
17502
17505
|
const companyId = normalizeCompanyId(record.companyId);
|
|
17503
17506
|
if (!companyId) {
|
|
@@ -17517,7 +17520,8 @@ var plugin = definePlugin({
|
|
|
17517
17520
|
if (nextSecretRef) {
|
|
17518
17521
|
nextPaperclipBoardApiTokenRefs[companyId] = nextSecretRef;
|
|
17519
17522
|
if (nextBoardApiToken) {
|
|
17520
|
-
|
|
17523
|
+
const configuredSecretRef = getConfiguredPaperclipBoardApiTokenRef(trustedConfig, companyId);
|
|
17524
|
+
if (configuredSecretRef !== nextSecretRef || await shouldSeedExternalPaperclipBoardTokenFallback(ctx, companyId, nextSecretRef)) {
|
|
17521
17525
|
await writeExternalCompanyPaperclipBoardApiTokenFallback(ctx, companyId, nextBoardApiToken);
|
|
17522
17526
|
} else {
|
|
17523
17527
|
await clearExternalCompanyPaperclipBoardApiTokenFallback(ctx, companyId);
|