From 0947c5274311840d5367758931b0285a56df5be0 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Date: Fri, 7 Oct 2022 13:28:00 +0100 Subject: [PATCH] fix: repository name --- src/Repository.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Repository.js b/src/Repository.js index d1e7f3d..50c57e4 100644 --- a/src/Repository.js +++ b/src/Repository.js @@ -20,10 +20,10 @@ class Repository { async getPullRequests() { const pullRequests = []; - const q = `is:pr state:open repo:${this.owner}/${this.repo} head:${this.branch}`; + const q = `is:pr state:open repo:${this.owner}/${this.name} head:${this.branch}`; core.info('q: ' + q); const { data: pulls } = await this.github.rest.search.issuesAndPullRequests({ - q: `is:pr state:open repo:${this.owner}/${this.repo} head:${this.branch}` + q: `is:pr state:open repo:${this.owner}/${this.name} head:${this.branch}` }); for (let i = 0; i < pulls.items.length; i++) { @@ -49,7 +49,7 @@ class Repository { async commentPullRequest(pullRequest, testResults, fullReportUrl) { const { data: comments } = await this.github.rest.issues.listComments({ owner: this.owner, - repo: this.repo, + repo: this.name, issue_number: pullRequest.number }); const botComment = comments.find(comment => comment.user.id === 41898282); @@ -80,7 +80,7 @@ class Repository { if (botComment) { await this.github.rest.issues.updateComment({ owner: this.owner, - repo: this.repo, + repo: this.name, comment_id: botComment.id, body: commentBody });