Best practice to get the content of changed files from one specific commit

Hi,
I want to write CI script which performs

  • get the list of changed files
  • get the whole content of the files from the list one by one
  • run external APIs
    Could you help?