diff --git a/README.md b/README.md index 63f85c5..47718b1 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ For the first matching pull request, these outputs will be set: - `base-sha` - `base-repo` - `state` +- `author` See [action.yml](action.yml) for more details. diff --git a/action.yml b/action.yml index b3bb940..d039dcd 100644 --- a/action.yml +++ b/action.yml @@ -59,6 +59,8 @@ outputs: 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 + author: + description: The Pull Request's author if one was found runs: using: 'node20' diff --git a/index.js b/index.js index 59fe171..a2fd93c 100644 --- a/index.js +++ b/index.js @@ -69,6 +69,7 @@ const main = async () => { core.setOutput('base-sha', pr ? pr.base.sha : '') core.setOutput('base-repo', pr ? pr.base.repo.full_name : '') core.setOutput('state', pr ? pr.state : '') + core.setOutput('author', pr ? pr.user?.login : '') } main().catch(err => core.setFailed(err.message))