Skip to content

Commit

Permalink
fix: force reviewflow name as username in slack
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Aug 25, 2019
1 parent a4812c6 commit 2b3b898
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 19 deletions.
23 changes: 14 additions & 9 deletions dist/index-node10-dev.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node10-dev.cjs.js.map

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions dist/index-node10.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node10.cjs.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/context/initTeamSlack.ts
Expand Up @@ -81,12 +81,13 @@ export const initTeamSlack = async <GroupNames extends string>(
return `<@${user.member.id}>`;
},
postMessage: async (githubLogin: string, text: string): Promise<void> => {
context.log.info('send slack', { githubLogin, text });
context.log.debug('send slack', { githubLogin, text });
if (process.env.DRY_RUN) return;

const user = getUserFromGithubLogin(githubLogin);
if (!user || !user.im) return;
await slackClient.chat.postMessage({
username: process.env.REVIEWFLOW_NAME,
channel: user.im.id,
text,
});
Expand Down

0 comments on commit 2b3b898

Please sign in to comment.