iterative / iterative/cml

pr + comment create Error: PR for commit sha not found

Open
#1,418 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.2k
Forks
345
PR merge metrics
No merged PRs in 30d

Description

I have a basic GitLab CI pipeline that looks like:
Related to https://discord.com/channels/485586884165107732/728693131557732403/1144379101176660029
```
cml pr .
echo README.md >> report.md
cml comment create --target=pr report.md
```

I am getting an error:

```
{"level":"error","message":"PR for commit sha \"4d2069245c68a65774a4a0d64a1efb3611a93b55\" not found","stack":"Error: PR for commit sha \"4d2069245c68a65774a4a0d64a1efb3611a93b55\" not found\n at parseCommentTarget (/usr/lib/node_modules/@dvcorg/cml/src/commenttarget.js:54:13)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async CML.commentCreate (/usr/lib/node_modules/@dvcorg/cml/src/cml.js:308:20)\n at async Object.exports.handler (/usr/lib/node_modules/@dvcorg/cml/bin/cml/comment/create.js:11:15)"}
```

I've set up an example repo with the run results here: https://gitlab.com/bjohnson210/cml-pr-bug/-/jobs/4945761331 to reproduce this issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.