Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kovsu committed Nov 4, 2024
1 parent 50de384 commit 9d23801
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,17 +289,22 @@ TEST: addTests('isQuickPR', [
export const isDraftPR = (): boolean => exists('#partial-discussion-header .octicon-git-pull-request-draft');
export const isOpenPR = (): boolean => exists('#partial-discussion-header :is(.octicon-git-pull-request, .octicon-git-pull-request-draft)');
export const isMergedPR = (): boolean => {
if (exists('#partial-discussion-header :is(.octicon-git-merge)'))
if (exists('#partial-discussion-header :is(.octicon-git-merge)')) {
return true;
const status = $('[class^="StateLabel"]')!.textContent
return status === 'Merged'
}
}

const status = $('[class^="StateLabel"]')!.textContent;
return status === 'Merged';
};

export const isClosedPR = (): boolean => {
if (exists('#partial-discussion-header :is(.octicon-git-pull-request-closed, .octicon-git-merge)'))
if (exists('#partial-discussion-header :is(.octicon-git-pull-request-closed, .octicon-git-merge)')) {
return true;
const status = $('[class^="StateLabel"]')!.textContent
return status === 'Closed' || status === 'Merged'
}
}

const status = $('[class^="StateLabel"]')!.textContent;
return status === 'Closed' || status === 'Merged';
};

export const isClosedIssue = (): boolean => exists('#partial-discussion-header :is(.octicon-issue-closed, .octicon-skip)');

Expand Down Expand Up @@ -751,7 +756,6 @@ TEST: addTests('isRepositoryActions', [

export const isUserTheOrganizationOwner = (): boolean => isOrganizationProfile() && exists('[aria-label="Organization"] [data-tab-item="org-header-settings-tab"]');


export const canUserAdminRepo = (): boolean => isRepo() && exists('.reponav-item[href$="/settings"], [data-tab-item$="settings-tab"]');

/** @deprecated Use `canUserAdminRepo` */
Expand Down

0 comments on commit 9d23801

Please sign in to comment.