From 8ffd0e61e1cf0e1ed2ea39ce4551aa6c43bbf799 Mon Sep 17 00:00:00 2001 From: Mark Patterson <35724907+markpatterson27@users.noreply.github.com> Date: Mon, 30 Jan 2023 12:33:13 +0000 Subject: [PATCH] add state output (#40) --- action.yml | 2 ++ index.js | 1 + 2 files changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 024ac86..d89f34c 100644 --- a/action.yml +++ b/action.yml @@ -54,6 +54,8 @@ outputs: description: The Pull Request's base sha if one was found base-repo: description: The Pull Request's base repository full name (e.g. octocat/Hello-World) + state: + description: The Pull Request's open or closed state if one was found runs: using: 'node16' diff --git a/index.js b/index.js index 817172b..c168106 100644 --- a/index.js +++ b/index.js @@ -57,6 +57,7 @@ const main = async () => { core.setOutput('base-ref', pr ? pr.base.ref : '') core.setOutput('base-sha', pr ? pr.base.sha : '') core.setOutput('base-repo', pr ? pr.base.repo.full_name : '') + core.setOutput('state', pr ? pr.state : '') } main().catch(err => core.setFailed(err.message))