Skip to content

Commit

Permalink
Merge pull request #18 from blombard/fix/http-error
Browse files Browse the repository at this point in the history
Fix the HTTP error
  • Loading branch information
blombard authored Jan 19, 2022
2 parents 9c6502f + bdd0dab commit c2ac200
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ const run = async () => {
const daysBeforeReminder = core.getInput('days-before-reminder');

const octokit = github.getOctokit(token);
const { GITHUB_REPOSITORY_OWNER: owner, GITHUB_REPOSITORY: repo } = process.env;
const { data } = await octokit.pulls.list({ owner, repo: repo.split('/')[1], state: 'open' });
const { GITHUB_REPOSITORY_OWNER: owner, GITHUB_REPOSITORY } = process.env;
const repo = GITHUB_REPOSITORY.split('/')[1];
const { data } = await octokit.pulls.list({ owner, repo, state: 'open' });

data.forEach(({ requested_reviewers, updated_at, number }) => {
if (requested_reviewers.length && rightTimeForReminder(updated_at, daysBeforeReminder)) {
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ const run = async () => {
const daysBeforeReminder = core.getInput('days-before-reminder');

const octokit = github.getOctokit(token);
const { GITHUB_REPOSITORY_OWNER: owner, GITHUB_REPOSITORY: repo } = process.env;
const { data } = await octokit.pulls.list({ owner, repo: repo.split('/')[1], state: 'open' });
const { GITHUB_REPOSITORY_OWNER: owner, GITHUB_REPOSITORY } = process.env;
const repo = GITHUB_REPOSITORY.split('/')[1];
const { data } = await octokit.pulls.list({ owner, repo, state: 'open' });

data.forEach(({ requested_reviewers, updated_at, number }) => {
if (requested_reviewers.length && rightTimeForReminder(updated_at, daysBeforeReminder)) {
Expand Down

0 comments on commit c2ac200

Please sign in to comment.