@shipfox/api-integration-linear 9.0.2 → 9.1.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/api-integration-linear",
3
3
  "license": "MIT",
4
- "version": "9.0.2",
4
+ "version": "9.1.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -22,12 +22,12 @@
22
22
  "drizzle-orm": "^0.45.2",
23
23
  "ky": "^2.0.0",
24
24
  "zod": "^4.4.3",
25
- "@shipfox/api-auth-context": "9.0.2",
25
+ "@shipfox/api-auth-context": "9.0.3",
26
26
  "@shipfox/api-integration-spi": "0.2.2",
27
27
  "@shipfox/api-integration-linear-dto": "9.0.2",
28
28
  "@shipfox/config": "1.2.4",
29
29
  "@shipfox/node-drizzle": "0.3.4",
30
- "@shipfox/node-fastify": "0.3.2",
30
+ "@shipfox/node-fastify": "0.3.3",
31
31
  "@shipfox/node-opentelemetry": "0.6.2",
32
32
  "@shipfox/node-postgres": "0.4.4"
33
33
  },
@@ -18,7 +18,7 @@ function installation(overrides: Partial<LinearInstallation> = {}): LinearInstal
18
18
  }
19
19
 
20
20
  describe('linear connectionExternalUrl', () => {
21
- it('resolves the organization settings URL from the installation row', async () => {
21
+ it('resolves the organization application settings URL from the installation row', async () => {
22
22
  const connectionId = crypto.randomUUID();
23
23
  const provider = createLinearIntegrationProvider({
24
24
  getLinearInstallationByConnectionId: () =>
@@ -27,7 +27,7 @@ describe('linear connectionExternalUrl', () => {
27
27
 
28
28
  const url = await provider.connectionExternalUrl({id: connectionId});
29
29
 
30
- expect(url).toBe('https://linear.app/acme/settings');
30
+ expect(url).toBe('https://linear.app/acme/settings/applications/test-client-id');
31
31
  });
32
32
 
33
33
  it('URL-encodes the organization URL key', async () => {
@@ -38,7 +38,7 @@ describe('linear connectionExternalUrl', () => {
38
38
 
39
39
  const url = await provider.connectionExternalUrl({id: crypto.randomUUID()});
40
40
 
41
- expect(url).toBe('https://linear.app/a%2Fb%20c/settings');
41
+ expect(url).toBe('https://linear.app/a%2Fb%20c/settings/applications/test-client-id');
42
42
  });
43
43
 
44
44
  it('returns undefined when the installation row is missing', async () => {
package/src/index.ts CHANGED
@@ -155,7 +155,7 @@ export function createLinearIntegrationProvider(
155
155
  async connectionExternalUrl(connection: {id: string}): Promise<string | undefined> {
156
156
  const installation = await getInstallationByConnectionId(connection.id);
157
157
  if (!installation?.organizationUrlKey) return undefined;
158
- return `https://linear.app/${encodeURIComponent(installation.organizationUrlKey)}/settings`;
158
+ return `https://linear.app/${encodeURIComponent(installation.organizationUrlKey)}/settings/applications/${encodeURIComponent(config.LINEAR_OAUTH_CLIENT_ID)}`;
159
159
  },
160
160
  ...options.cleanup,
161
161
  routes,