Skip to content

Commit

Permalink
update build 36
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 20, 2021
2 parents 739d35c + 87be0e5 commit 340b4ae
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 7 deletions.
29 changes: 26 additions & 3 deletions dist/index.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.js.map

Large diffs are not rendered by default.

33 changes: 30 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,40 @@ export const convertToSlackUsername = async (
context.sha
);

const slackIds = githubUsernames
.map((githubUsername) => mapping[githubUsername])
.filter((slackId) => slackId !== undefined) as string[];
// const slackIds = githubUsernames
// .map((githubUsername) => mapping[githubUsername])
// .filter((slackId) => slackId !== undefined) as string[];
const slackIds = githubUsernames.map(
(githubUsername) => {
var slackId = mapping[githubUsername];
return (slackId !== undefined)? slackId : githubUsernames;
}
) as string[];

return slackIds;
};

// export const convertToSlackUsername = async (
// githubUsernames: string[],
// githubClient: typeof GithubRepositoryImpl,
// repoToken: string,
// configurationPath: string,
// context: Pick<Context, "repo" | "sha">
// ): Promise<string[]> => {

// const slackIds = githubUsernames.map(async (it) => {
// const slackId = await convertSingleName(
// [it],
// githubClient,
// repoToken,
// configurationPath,
// context
// );
// return (slackId[0] === "undefined" ? it : slackId[0]) as string;
// });
// return slackIds;
// };

// Pull Request
export const execPullRequestMention = async (
payload: WebhookPayload,
Expand Down

0 comments on commit 340b4ae

Please sign in to comment.