Given the following config in codefresh to use the container:
add_url_to_comment_on_pr:
title: Comment on PR with the deployed URL
stage: Deploy
image: cloudposse/github-commenter
environment:
- GITHUB_TOKEN=${{GITHUB_REPO_STATUS_TOKEN}}
- GITHUB_OWNER=${{CF_REPO_OWNER}}
- GITHUB_REPO=${{CF_REPO_NAME}}
- GITHUB_COMMENT_TYPE=pr
- GITHUB_PR_ISSUE_NUMBER=${{CF_PULL_REQUEST_NUMBER}}
- GITHUB_COMMENT_FORMAT="My comment:<br/>{{.}}"
- GITHUB_COMMENT="Version ${{CF_SHORT_REVISION}} should be up, the health page is at http://${{APP_HOST}}/healthz/"
when:
condition:
all:
deployLabel: "match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == true"
githubNotificationsEnabled: "'${{GITHUB_NOTIFICATIONS_ENABLED}}' == 'true'"
The container exits with the following error
2019/07/15 21:26:44 POST https://api.github.com/repos/example-org/example-app/issues/82/comments: 404 Not Found []
It looks like the URL is incorrect according to the documentation here:
https://developer.github.com/v3/pulls/comments/#create-a-comment
POST /repos/:owner/:repo/pulls/:pull_number/comments
If I get time, I'll try to fix this issue myself, just ran out of work day today.
Given the following config in codefresh to use the container:
The container exits with the following error
It looks like the URL is incorrect according to the documentation here:
https://developer.github.com/v3/pulls/comments/#create-a-comment
If I get time, I'll try to fix this issue myself, just ran out of work day today.