I want to create a function that automatically notifies me when there is a schema change in the repository of the service that is the data source of the data infrastructure. I made it by pulling Pull Request information with github api, so a memo at that time. Authentication uses a personal access token ↓
import requests
#Get only closed PR
URL = 'https://api.github.com/repos/owner/repo_name/pulls?&state=closed'
headers = {'Authorization': 'token xxxxx'} #Obtained access token
r = requests.get(URL.format(repo), headers=headers)
return r.json()
Recommended Posts