Skip to content

Commit

Permalink
1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Oct 14, 2022
1 parent a263583 commit afdd62c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9688,7 +9688,7 @@ var __webpack_exports__ = {};


const core = __nccwpck_require__(2186)
const { GitHub, context } = __nccwpck_require__(5438)
const github = __nccwpck_require__(5438)

const main = async () => {
const token = core.getInput('github-token')
Expand All @@ -9705,7 +9705,7 @@ const main = async () => {
const [owner, repo] = repoString.split('/')
repoObject = { owner, repo }
} else {
repoObject = context.repo
repoObject = github.context.repo
}

const query = {
Expand All @@ -9714,7 +9714,9 @@ const main = async () => {
}
if (branch) {
query.head =
branch.indexOf(':') === -1 ? `${context.repo.owner}:${branch}` : branch
branch.indexOf(':') === -1
? `${github.context.repo.owner}:${branch}`
: branch
}
if (base) {
query.base = base
Expand All @@ -9726,9 +9728,9 @@ const main = async () => {
query.direction = direction
}

const octokit = new GitHub(token)
const octokit = github.getOctokit(token)

const res = await octokit.pulls.list(query)
const res = await octokit.rest.pulls.list(query)
const pr = author
? res.data.length && res.data.filter(pr => pr.user.login === author)[0]
: res.data.length && res.data[0]
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "find-pull-request-action",
"private": true,
"version": "1.7.1",
"version": "1.7.2",
"license": "MIT",
"description": "GitHub Action for finding pull requests",
"repository": "juliangruber/find-pull-request-action",
Expand Down

0 comments on commit afdd62c

Please sign in to comment.