Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Oct 25, 2024
1 parent 2aea654 commit 0c7834d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/integrations/src/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ const SLACK_CLIENT_SECRET = process.env.SLACK_CLIENT_SECRET;
const SLACK_OAUTH_REDIRECT_URL = process.env.SLACK_OAUTH_REDIRECT_URL;
const SLACK_STATE_SECRET = process.env.SLACK_STATE_SECRET;

export const slackInstaller = new InstallProvider({
clientId: SLACK_CLIENT_ID!,
clientSecret: SLACK_CLIENT_SECRET!,
stateSecret: SLACK_STATE_SECRET,
logLevel: process.env.NODE_ENV === 'development' ? LogLevel.DEBUG : undefined,
});


export const getSlackInstallUrl = ({
integrationId,
organizationId,
projectId,
}: { integrationId: string; organizationId: string; projectId: string }) => {
const slackInstaller = new InstallProvider({
clientId: SLACK_CLIENT_ID!,
clientSecret: SLACK_CLIENT_SECRET!,
stateSecret: SLACK_STATE_SECRET,
logLevel: process.env.NODE_ENV === 'development' ? LogLevel.DEBUG : undefined,
});

return slackInstaller.generateInstallUrl({
scopes: [
'incoming-webhook',
Expand Down

0 comments on commit 0c7834d

Please sign in to comment.