Skip to content

Commit afdd62c

Browse files
committed
1.7.2
1 parent a263583 commit afdd62c

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

dist/index.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9688,7 +9688,7 @@ var __webpack_exports__ = {};
96889688

96899689

96909690
const core = __nccwpck_require__(2186)
9691-
const { GitHub, context } = __nccwpck_require__(5438)
9691+
const github = __nccwpck_require__(5438)
96929692

96939693
const main = async () => {
96949694
const token = core.getInput('github-token')
@@ -9705,7 +9705,7 @@ const main = async () => {
97059705
const [owner, repo] = repoString.split('/')
97069706
repoObject = { owner, repo }
97079707
} else {
9708-
repoObject = context.repo
9708+
repoObject = github.context.repo
97099709
}
97109710

97119711
const query = {
@@ -9714,7 +9714,9 @@ const main = async () => {
97149714
}
97159715
if (branch) {
97169716
query.head =
9717-
branch.indexOf(':') === -1 ? `${context.repo.owner}:${branch}` : branch
9717+
branch.indexOf(':') === -1
9718+
? `${github.context.repo.owner}:${branch}`
9719+
: branch
97189720
}
97199721
if (base) {
97209722
query.base = base
@@ -9726,9 +9728,9 @@ const main = async () => {
97269728
query.direction = direction
97279729
}
97289730

9729-
const octokit = new GitHub(token)
9731+
const octokit = github.getOctokit(token)
97309732

9731-
const res = await octokit.pulls.list(query)
9733+
const res = await octokit.rest.pulls.list(query)
97329734
const pr = author
97339735
? res.data.length && res.data.filter(pr => pr.user.login === author)[0]
97349736
: res.data.length && res.data[0]

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "find-pull-request-action",
33
"private": true,
4-
"version": "1.7.1",
4+
"version": "1.7.2",
55
"license": "MIT",
66
"description": "GitHub Action for finding pull requests",
77
"repository": "juliangruber/find-pull-request-action",

0 commit comments

Comments
 (0)