Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 4

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

Solved! Go to Solution.

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

3 Replies
Solution
Community Manager
Message 2 of 4

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

Hi @colorbox,

 

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

 

Thanks!

Copilot Lvl 2
Message 3 of 4

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

Thank you so much.

It seems very good.

 

Community Manager
Message 4 of 4

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

Glad to hear it!