Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: branch is undefined #33

Merged
merged 22 commits into from
Apr 4, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pull
amondnet committed Apr 4, 2020
commit 3d2fb9b69cfb22c302759144c936dce3ab23dd60
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ async function run() {
} else {
core.warning("get preview-url error");
}
const commit = context.ref;
if (githubComment && githubToken) {
if (context.issue.number) {
core.info("this is related issue or pull_request ");
@@ -40,6 +41,8 @@ async function run() {
core.info("comment : disabled");
}
if ( octokit ) {
core.debug('octokie');

const pull = await octokit.pulls.get({
...context.repo, pull_number: context.payload.pull_request.number
});
@@ -188,11 +191,11 @@ async function createCommentOnPullRequest(deploymentCommit, deploymentUrl) {
);

const commentBody = stripIndents`
Deploy preview for _website_ ready!
This pull request is being automatically deployed with [now-deployment](https://github.com/amondnet/now-deployment)
Built with commit ${deploymentCommit}
https://${deploymentUrl}
✅ Preview: ${deploymentUrl}
`;

if (commentId) {