Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
requested_reviewers
Browse files Browse the repository at this point in the history
  • Loading branch information
shikajiro committed Mar 13, 2024
1 parent 0b3d7b9 commit d2a75a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/repository/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios from "axios";
import * as core from "@actions/core";

type GithubGetPR = {
users: GithubGetReviewerNameResult[];
requested_reviewers: GithubGetReviewerNameResult[];
title: string;
html_url: string;
};
Expand All @@ -23,5 +23,7 @@ export const getPR = async (
headers: { authorization: `Bearer ${repoToken}` },
},
);
if (result.data.requested_reviewers.length == 0) return null;

return result.data;
};
2 changes: 1 addition & 1 deletion src/usecase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const execPrReviewRequestedMention = async (
throw new Error("Can not find review requested user.");
}

const reviewers = pr.users.map((user) => user.login)
const reviewers = pr.requested_reviewers.map((user) => user.login)
core.info(`reviewers ${reviewers}`);

const slackIds = convertToChatworkUsername(reviewers, mapping);
Expand Down

0 comments on commit d2a75a5

Please sign in to comment.