Hi we have a requirement to fetch service deployment logs in github pr as comment,
I tried to use List logs but I am unable to fetch the logs, can anyone help me?
In case the deployment is failed it should show the last 20 lines of logs from the render service deployment in the github PR as comment.
try {
const logsRes = await fetch(`https://api.render.com/v1/logs?direction=backward&limit=20`, {
headers: {
'accept': 'application/json',
'authorization': `Bearer ${apiKey}`
}