Need to Fetch service deployment logs in github

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}`
                }


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.