Skip to content

Commit

Permalink
Use page detect
Browse files Browse the repository at this point in the history
  • Loading branch information
yakov116 committed Oct 13, 2020
1 parent da02105 commit 27d4cd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/features/bypass-checks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import * as api from '../github-helpers/api';
import {getRepoURL} from '../github-helpers';

async function bypass(detailsLink: HTMLAnchorElement): Promise<void> {
const runId = /runs\/\d*$/.exec(detailsLink.pathname) ? // Exclude any URL that does not end with runs. They already link to its own direct page.
detailsLink.pathname.split('/').pop() : new URLSearchParams(detailsLink.search).get('check_run_id');
const runId = pageDetect.isActionJobRun(detailsLink) ? detailsLink.pathname.split('/').pop() :// https://github.com/xojs/xo/runs/1104625522
new URLSearchParams(detailsLink.search).get('check_run_id'); // https://github.com/sindresorhus/refined-github/pull/3629/checks?check_run_id=1223857819
if (!runId) {
return;
}
Expand Down

0 comments on commit 27d4cd1

Please sign in to comment.