How can I create PR comment on the file that includes space

Hi

I want to create PR comment on file that name includes space via GitHub API.

But response is “422 Validation Failed”.

Does anyone know how to create comment on file that includes space in name?

Escaping with backslash, and \u200 was still response 422.

app/models/space_include_\ _file_name.rb
app/models/space_include_\u200_file_name.rb

I use command and PR below

curl -X POST  -H "Content-Type: application/json" -H "Authorization: token <your token>" --data '{"commit_id":"8ae911bfd368794ba8955793faff475dcf0b81b7","body":"test","path":"app/models/space_include_ _file_name.rb","position":2}' https://api.github.com/repos/colorbox/kata/pulls/3/comments

https://github.com/colorbox/kata/pull/3/files

Hi @colorbox,

We tried out your cURL command and were able to get it to work. Are you still having this issue?

Thanks!

2 Likes

Thank you so much.

It seems very good.

Glad to hear it!