Skip to content

Commit 9497798

Browse files
committed
fix: repo in github.context is an object, not a prop
1 parent c2b8525 commit 9497798

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

dist/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61996,10 +61996,9 @@ const {getUserIsApprover} = __nccwpck_require__(5008);
6199661996
// const actor = 'username';
6199761997
// const repo = 'repo';
6199861998
// const org = 'org';
61999-
const { actor, repo, org } = github.context;
62000-
console.log(actor, repo, org);
61999+
const { actor, repo } = github.context;
6200162000
try {
62002-
const isApprover = await getUserIsApprover(org, repo, actor);
62001+
const isApprover = await getUserIsApprover(repo.owner, repo.repo, actor);
6200362002
if (!isApprover) {
6200462003
core.setFailed(`${actor} is not an approver`);
6200562004
} else return true

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ const {getUserIsApprover} = require('./lib/helpers');
77
// const actor = 'username';
88
// const repo = 'repo';
99
// const org = 'org';
10-
const { actor, repo, org } = github.context;
11-
console.log(actor, repo, org);
10+
const { actor, repo } = github.context;
1211
try {
13-
const isApprover = await getUserIsApprover(org, repo, actor);
12+
const isApprover = await getUserIsApprover(repo.owner, repo.repo, actor);
1413
if (!isApprover) {
1514
core.setFailed(`${actor} is not an approver`);
1615
} else return true

0 commit comments

Comments
 (0)