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

Branch is undefined #31

Closed
ckipp01 opened this issue Feb 23, 2020 · 4 comments · Fixed by #33
Closed

Branch is undefined #31

ckipp01 opened this issue Feb 23, 2020 · 4 comments · Fixed by #33
Assignees
Labels
Type: Bug Bug or Bug fixes
Milestone

Comments

@ckipp01
Copy link

ckipp01 commented Feb 23, 2020

Hello! Thanks for the great action. I've noticed that when I check in the Zeit Dashboard, the branch name is undefined that caused the deployment. Am I potentially missing something, or is this just not being set?

My setup:

      - name: Zeit Now Deployment
        uses: amondnet/now-deployment@v2.0.0
        with:
          zeit-token: ${{ secrets.ZEIT_TOKEN }}
          now-org-id: ${{ secrets.ORG_ID }}
          now-project-id: ${{ secrets.PROJECT_ID }}
          now-args: '--prod'

Everything deploys correctly, but you can see in the deployments page that the commit message is there, but no branch name

Screenshot 2020-02-23 at 13 41 27

Then when you click into the deployment, you'll again see the missing branch name that leads you to tree/undefined which will obviously 404 on github.

Screenshot 2020-02-23 at 13 42 45

@ckipp01
Copy link
Author

ckipp01 commented Feb 23, 2020

Looking at it, my naive thought is that there is a missing key here:

now-deployment/index.js

Lines 80 to 104 in 1defb91

return await exec.exec('npx', [
'now',
...(nowArgs.split(/ +/)),
'-t',
zeitToken,
'-m',
`githubCommitSha=${context.sha}`,
'-m',
`githubCommitAuthorName=${context.actor}`,
'-m',
`githubCommitAuthorLogin=${context.actor}`,
'-m',
'githubDeployment=1',
'-m',
`githubOrg=${context.repo.owner}`,
'-m',
`githubRepo=${context.repo.repo}`,
'-m',
`githubCommitOrg=${context.repo.owner}`,
'-m',
`githubCommitRepo=${context.repo.repo}`,
'-m',
`githubCommitMessage=${commit}`], options).then(() => {
})
}

However, I'm unable to quickly find it in the Zeit Deployment api docs.

@amondnet amondnet self-assigned this Feb 25, 2020
@amondnet amondnet added the Type: Bug Bug or Bug fixes label Feb 25, 2020
@amondnet
Copy link
Owner

@ckipp01
I think githubCommitRef needs to be added.
Can you tell me if branch is displayed after setting like below?

      - name: Zeit Now Deployment
        uses: amondnet/now-deployment@v2.0.0
        with:
          zeit-token: ${{ secrets.ZEIT_TOKEN }}
          now-org-id: ${{ secrets.ORG_ID }}
          now-project-id: ${{ secrets.PROJECT_ID }}
          now-args: '--prod -m githubCommitRef=YOUR_BRANCH' #-m githubCommitRef=YOUR_BRANCH

@amondnet amondnet added this to the v2.0.2 milestone Feb 25, 2020
@ckipp01
Copy link
Author

ckipp01 commented Feb 25, 2020

Just tested. 👍 the branch appears when that is filled in.

@amondnet
Copy link
Owner

@ckipp01 Thank you. I will fix it in the next release(v2.0.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants