Skip to content

Commit

Permalink
Merge pull request #46 from r-argentina-programa/feature/extract-bloc…
Browse files Browse the repository at this point in the history
…k-of-code

Feature: Extract block of code from submission
  • Loading branch information
innerlize authored Jul 11, 2023
2 parents dc14e0c + 74f009b commit fbba8d3
Show file tree
Hide file tree
Showing 9 changed files with 963 additions and 941 deletions.
24 changes: 12 additions & 12 deletions src/config/env.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as dotenv from 'dotenv';

dotenv.config();

const env = {
API_BASE_URL: process.env.API_URL,
AUTH0_DOMAIN: process.env.AUTH0_DOMAIN,
BOT_ID: process.env.BOT_ID,
SLACK_TEAM_ID: process.env.SLACK_TEAM_ID,
};

export default env;
import * as dotenv from 'dotenv';

dotenv.config();

const env = {
API_BASE_URL: process.env.API_URL,
AUTH0_DOMAIN: process.env.AUTH0_DOMAIN,
BOT_ID: process.env.BOT_ID,
SLACK_TEAM_ID: process.env.SLACK_TEAM_ID,
};

export default env;
20 changes: 10 additions & 10 deletions src/events/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { App as SlackApp } from '@slack/bolt';
import subscribeToMessageEvents from './message';
import subscribeToTeamJoinEvents from './teamJoin';
import subscribeToReactionEvents from './reaction';

export const configureAppEvents = (app: SlackApp) => {
subscribeToMessageEvents(app);
subscribeToTeamJoinEvents(app);
subscribeToReactionEvents(app);
};
import { App as SlackApp } from '@slack/bolt';
import subscribeToMessageEvents from './message';
import subscribeToTeamJoinEvents from './teamJoin';
import subscribeToReactionEvents from './reaction';

export const configureAppEvents = (app: SlackApp) => {
subscribeToMessageEvents(app);
subscribeToTeamJoinEvents(app);
subscribeToReactionEvents(app);
};
34 changes: 17 additions & 17 deletions src/events/reaction/__test__/fixture/robotFaceReactionEvent.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
export const messageAuthorEvent = {
type: 'reaction_added',
user: 'U044WEP8EQ1',
reaction: 'robot_face',
item: { type: 'message', channel: 'C04T7UT7QSE', ts: '1688995701.853679' },
item_user: 'U044WEP8EQ1',
event_ts: '1688995705.001400',
};

export const randomUserEvent = {
type: 'reaction_added',
user: 'U044WEP8EQ2',
reaction: 'robot_face',
item: { type: 'message', channel: 'C04T7UT7QSE', ts: '1688995701.853679' },
item_user: 'U044WEP8EQ1',
event_ts: '1688995705.001400',
};
export const messageAuthorEvent = {
type: 'reaction_added',
user: 'U044WEP8EQ1',
reaction: 'robot_face',
item: { type: 'message', channel: 'C04T7UT7QSE', ts: '1688995701.853679' },
item_user: 'U044WEP8EQ1',
event_ts: '1688995705.001400',
};

export const randomUserEvent = {
type: 'reaction_added',
user: 'U044WEP8EQ2',
reaction: 'robot_face',
item: { type: 'message', channel: 'C04T7UT7QSE', ts: '1688995701.853679' },
item_user: 'U044WEP8EQ1',
event_ts: '1688995705.001400',
};
Loading

0 comments on commit fbba8d3

Please sign in to comment.