Skip to content

Commit

Permalink
Merge pull request #5 from 8BitJonny/returnOnlyOpenPr
Browse files Browse the repository at this point in the history
Added filter for open PR
  • Loading branch information
jwalton authored Feb 11, 2021
2 parents b4cdaa6 + 6c3ee1d commit da4a054
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function main() {
commit_sha: sha || context.sha,
});

const pr = result.data.length > 0 && result.data[0];
const pr = result.data.length > 0 && result.data.filter(el => el.state === 'open')[0];

core.setOutput('pr', pr && pr.number || '');
core.setOutput('number', pr && pr.number || '');
Expand Down

0 comments on commit da4a054

Please sign in to comment.