Get Changed Pages / Posts in PR

Hi all, brand new to netlify so forgive me if this is obvious.

Take this PR which creates this deploy log.

What I need is the list of pages in my onSuccess Hook. In the form you see on the build log.

* **23 new files uploaded**

8 generated pages and 15 assets changed.

New pages include:

  * index.html
  * posts/another-post-in-the-wall.html
  * posts/example-post.html
  * posts/hello-world.html
  * posts/one-more-post.html
  * posts/test-post.html

In short, all I really want is: https://peppy-zuccutto-826054.netlify.app/posts/hello-world (or a list of URLs if multiple have changed).

Alternatively, is it possible to set these URLs as a GitHub Action output so a different action can consume the URLs and do something with them?

There’s no built-in way to get this info and this is definitely not something a plugin can help with. You can send a GET request to:

https://api.netlify.com/api/v1/deploys/<deploy-id>/summary

which would contain the required info, but you might have to extract it to do something useful with it.