Skip to content

Commit 8b75aaa

Browse files
committed
refactor: Remove static PR number
1 parent 2beea11 commit 8b75aaa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ async function setOutputs(files) {
1414

1515
const main = async () => {
1616
try {
17-
const path = core.getInput('path', {required: false}) || "./";
18-
const token = core.getInput('token', {required: true}) ;
17+
const path = core.getInput('path', {required: false}) || "./"
18+
const token = core.getInput('token', {required: true})
19+
const pr = github.context.payload.pull_request
1920
const regExp = RegExp(path)
2021
const octokit = new github.getOctokit(token);
2122

2223
const response = await octokit.rest.pulls.listFiles({
2324
owner: github.context.repo.owner,
2425
repo: github.context.repo.repo,
25-
pull_number: "13"
26+
pull_number: pr.number
2627
})
2728

2829
const filteredFiles = (response.data || []).filter(file => {

0 commit comments

Comments
 (0)