modern-engine-38533
04/12/2024, 3:47 PMError: invalid argument "23" for "--pull-request" flag: must be integer
pipeline value;
###############################
23
################################
busy-agent-35515
04/12/2024, 4:24 PMbusy-agent-35515
04/12/2024, 4:27 PMmodern-engine-38533
04/13/2024, 1:24 PMinfracost comment bitbucket --path=/tmp/infracost.json \
--repo=test/test \
--pull-request=$(prno) \
--bitbucket-token=user:$(BitbucketToken) \
--behavior=update
modern-engine-38533
04/13/2024, 1:24 PM- pwsh: |
'Write-Host "##vso[task.setvariable variable=prno]$(System.PullRequest.PullRequestNumber)"'
busy-agent-35515
04/13/2024, 4:55 PM--pull-request=$(System.PullRequest.PullRequestId)
directly?modern-engine-38533
04/15/2024, 8:39 AMmodern-engine-38533
04/15/2024, 2:53 PM2024-04-15T14:40:07Z INF Finding matching comments for tag generated by Infracost
Error: The pull request comment was generated successfully but could not be posted:
Error getting comments: 500 Internal Server Error
busy-agent-35515
04/15/2024, 8:11 PM"##vso[task.setvariable variable=prno]$(System.PullRequest.PullRequestId)"
instead of PullRequestNumber
. I have low hopes on this, but worth a try. It's a really strange error. The only way I was able to reproduce it is by adding spaces in front of the value: --pull-request= 23
. I'm not very familiar with Azure Devops. Is it possible to use a trim function or something to modify the value here?
The 500 error comes from your Bitbucket server API when CLI tries to fetch the PR comments. Are you able to get the API logs to see why it fails?modern-engine-38533
04/16/2024, 8:38 AMbusy-agent-35515
04/18/2024, 3:19 PMbusy-agent-35515
04/18/2024, 3:21 PMcomment
command is the same in both cases (meaning the same API request is going out to the server), but we don't control how the server treats the provided values. It's a guess, but maybe it doesn't like the strings too?modern-engine-38533
04/19/2024, 7:52 AMbusy-agent-35515
04/19/2024, 8:21 AM