Skip to content

Commit

Permalink
[#1] client payload
Browse files Browse the repository at this point in the history
  • Loading branch information
feelform committed Nov 9, 2021
1 parent 913cc42 commit 350f166
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ class GithubRelease {
}

static async make() {
const envClientPayload = core.getInput('client_payload')
if (!envClientPayload) {
return
}
const payload = envClientPayload.length > 0 ? JSON.parse(envClientPayload) : github.context.payload['client_payload']
const payload = github.context.payload['client_payload']
const { data } = await axios.get(`https://api.github.com/users/${payload.username}`)
return new GithubRelease(payload, { name: data.name, email: `${payload.username}@users.noreply.github.com` })
}
Expand Down

0 comments on commit 350f166

Please sign in to comment.