Skip to content

Commit

Permalink
fix: cast objects to string actions/toolkit#321
Browse files Browse the repository at this point in the history
  • Loading branch information
reiked committed Mar 17, 2020
1 parent e07c1f1 commit cd4675a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2024,17 +2024,17 @@ async function run() {
`Pull request (${pullRequest.number}) successful! You can view it here: ${pullRequest.url}.`
);

core.setOutput("PULL_REQUEST_URL", pullRequest.url)
core.setOutput("PULL_REQUEST_NUMBER", pullRequest.number);
core.setOutput("PULL_REQUEST_URL", pullRequest.url.toString())
core.setOutput("PULL_REQUEST_NUMBER", pullRequest.number.toString());

} else {
console.log(
`There is already a pull request (${currentPull.number}) to ${toBranch} from ${fromBranch}.`,
`You can view it here: ${currentPull.url}`
);

core.setOutput("PULL_REQUEST_URL", currentPull.url);
core.setOutput("PULL_REQUEST_NUMBER", currentPull.number);
core.setOutput("PULL_REQUEST_URL", currentPull.url.toString());
core.setOutput("PULL_REQUEST_NUMBER", currentPull.number.toString());
}
} catch (error) {
core.setFailed(error.message);
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ async function run() {
`Pull request (${pullRequest.number}) successful! You can view it here: ${pullRequest.url}.`
);

core.setOutput("PULL_REQUEST_URL", pullRequest.url);
core.setOutput("PULL_REQUEST_NUMBER", pullRequest.number);
core.setOutput("PULL_REQUEST_URL", pullRequest.url.toString());
core.setOutput("PULL_REQUEST_NUMBER", pullRequest.number.toString());
} else {
console.log(
`There is already a pull request (${currentPull.number}) to ${toBranch} from ${fromBranch}.`,
`You can view it here: ${currentPull.url}`
);

core.setOutput("PULL_REQUEST_URL", currentPull.url);
core.setOutput("PULL_REQUEST_NUMBER", currentPull.number);
core.setOutput("PULL_REQUEST_URL", currentPull.url.toString());
core.setOutput("PULL_REQUEST_NUMBER", currentPull.number.toString());
}
} catch (error) {
core.setFailed(error.message);
Expand Down

0 comments on commit cd4675a

Please sign in to comment.