Sathish Kumar

04/07/2022, 6:07 PM
$ infracost comment gitlab --path infracost.json --repo $CI_PROJECT_PATH --merge-request $CI_MERGE_REQUEST_IID --gitlab-token $GITLAB_TOKEN
time="2022-04-07T17:52:21Z" level=info msg="Finding matching comments for tag infracost-comment"
time="2022-04-07T17:52:21Z" level=info msg="Found 0 matching comments"
time="2022-04-07T17:52:21Z" level=info msg="Creating new comment"
Error: Error creating comment: 401 Unauthorized
Imam Muslim

Imam Muslim

04/08/2022, 9:52 AM
same issue here. anyone have suggestion ? im already create project token and personal token full access, still got same error. thanks
Tim (Infracost)

Tim (Infracost)

04/08/2022, 11:36 AM
Are you self-hosting the runner? Sathish needed to pass
to infracost comment.
11:36 AM
Also, can you create comments manually, something like:
curl -X POST --header "PRIVATE-TOKEN: redacted" --data-urlencode "body=test" <https://gitlab>.[redacted]/merge_requests/1/notes