Skip to content

Commit

Permalink
chore: merge changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Sep 1, 2024
1 parent eb37a3d commit 1977116
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 30 deletions.
25 changes: 0 additions & 25 deletions src/handlers/shared/get-user-task-limit-and-role.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/types/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ export type Assignee = Issue["assignee"];
export type GitHubIssueSearch = RestEndpointMethodTypes["search"]["issuesAndPullRequests"]["response"]["data"];
export type Sender = { login: string; id: number };

export type Sender = { login: string; id: number };

export const ISSUE_TYPE = {
OPEN: "open",
CLOSED: "closed",
Expand Down
6 changes: 3 additions & 3 deletions src/utils/issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function isParentIssue(body: string) {
return body.match(parentPattern);
}

export async function getAssignedIssues(context: Context, username: string): Promise<GitHubIssueSearch["items"]> {
export async function getAssignedIssues(context: Context, username: string): Promise<Issue[]> {
const { payload } = context;

try {
Expand Down Expand Up @@ -163,7 +163,7 @@ export async function getAllPullRequests(context: Context, state: "open" | "clos

try {
return (await context.octokit.paginate(context.octokit.search.issuesAndPullRequests, {
q: `org:${payload.repository.owner.login} author:${username} state:${state} is:pr`,
q: `org:${payload.repository.owner.login} author:${username} state:${state}`,
per_page: 100,
order: "desc",
sort: "created",
Expand Down Expand Up @@ -206,7 +206,7 @@ export async function getAvailableOpenedPullRequests(context: Context, username:

for (let i = 0; i < openedPullRequests.length; i++) {
const openedPullRequest = openedPullRequests[i];
const [owner, repo] = openedPullRequest.html_url.split("/").slice(3, 4);
const { owner, repo } = getOwnerRepoFromHtmlUrl(openedPullRequest.html_url);
const reviews = await getAllPullRequestReviews(context, openedPullRequest.number, owner, repo);

if (reviews.length > 0) {
Expand Down

0 comments on commit 1977116

Please sign in to comment.