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

Commit

Permalink
feat: add reviewer follow up
Browse files Browse the repository at this point in the history
  • Loading branch information
EtherealGlow committed Oct 21, 2023
1 parent badf8e8 commit 4d09c74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/handlers/wildcard/unassign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const checkBountyToUnassign = async (issue: Issue): Promise<boolean> => {
msg += "@" + reviewer.login + " ";
}
}
if (!msg.includes("@")) return false;
msg += "Can you please review this pull request";
// the below function can also add comment to prs
await addCommentToIssue(msg, pullRequest[0].number);
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const getAllIssueEvents = async () => {
// Fetch issue events
const response = await context.octokit.issues.listEvents({
owner: payload.repository.owner.login,
repo: payload.repository.full_name,
repo: payload.repository.name,
issue_number: payload.issue.number,
per_page: 100,
page: page_number,
Expand Down Expand Up @@ -658,7 +658,7 @@ export const getPullByNumber = async (context: Context, pull_number: number) =>
}
};

export async function getRequestedReviewerStart (user: string) {
export async function getRequestedReviewerStart(user: string) {
let events = await getAllIssueEvents();

Check failure on line 662 in src/helpers/issue.ts

View workflow job for this annotation

GitHub Actions / build

'events' is never reassigned. Use 'const' instead
if (!events) return null;
const filteredEvents = events.filter((e) => e.event === "review_requested" && e.requested_reviewer?.login === user);
Expand All @@ -667,7 +667,7 @@ export async function getRequestedReviewerStart (user: string) {
} else {
return events[events.length - 1].created_at;
}
};
}
// Get issues assigned to a username
export const getAssignedIssues = async (username: string) => {
const issuesArr = [];
Expand Down

0 comments on commit 4d09c74

Please sign in to comment.