Path: blob/master/GitHub/GitHub_Get_commits_from_repository.ipynb
2973 views
GitHub - Get commits from repository
Tags: #github #repos #commits #stats #naas_drivers #plotly #linechart #operations #analytics #dataframe #html
Author: Florent Ravenel
Last update: 2023-04-12 (Created: 2023-01-09)
Description: This notebook provides a tutorial on how to retrieve a list of commits for a specific repository on GitHub using the GitHub API. It covers how to set up a personal access token for accessing the API, how to get commits using naas_drivers.github. The output returned is a dataframe.
Input
Import libraries
Setup GitHub
How to find your personal access token on Github?
First we need to create a personal access token to get the details of our organization from here: https://github.com/settings/tokens
You will be asked to select scopes for the token. Which scopes you choose will determine what information and actions you will be able to perform against the API.
You should be careful with the ones prefixed with write:, delete: and admin: as these might be quite destructive.
You can find description of each scope in docs here (https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps).