Skip to content

Commit

Permalink
fix: Configure the post install redirect for BitBucket
Browse files Browse the repository at this point in the history
Signed-off-by: Yoriyasu Yano <[email protected]>
  • Loading branch information
yorinasub17 committed Nov 2, 2023
1 parent 3661454 commit 7de5bd9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/custom-environment-variables.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{
env: "FENSAK_ENV",
appURL: "FENSAK_APP_URL",
dashboardAppURL: "FENSAK_DASHBOARD_APP_URL",
configFileSizeLimit: {
__name: "FENSAK_CONFIG_FILE_SIZE_LIMIT",
__format: "number",
Expand Down
4 changes: 4 additions & 0 deletions config/default.json5
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// The URL where the app is hosted. Used for constructing self-referencing URLs for the app.
appURL: "",

// The URL where the dashboard app is hosted. Used for constructing redirecting URLs for certain workflows
// (e.g., post install redirect for BitBucket).
dashboardAppURL: "",

// The maximum size of config files that can be accepted (in bytes).
configFileSizeLimit: 1024000,

Expand Down
7 changes: 5 additions & 2 deletions web/atlassian_connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { getBitBucketAppKey } from "../bbstd/mod.ts";

const appEnv = config.get("env");
const appURL = config.get("appURL");
const dashboardAppURL = config.get("dashboardAppURL");

/**
* The handler function for serving the Atlassian Connect App descriptor.
Expand Down Expand Up @@ -75,8 +76,10 @@ export function atlassianConnectJSON(ctx: Context): void {
contexts: ["account"],
modules: {
webhooks,
// TODO
// - configure postInstallRedirect
postInstallRedirect: {
key: "postinstallredirect",
url: dashboardAppURL,
},
},
};

Expand Down

0 comments on commit 7de5bd9

Please sign in to comment.