Step 1: Create a personal access token on GitHub.
Step 2: Get all commits to a GitHub repository using REST API
1 2 3 4 5 6 7 8 9 10 11 |
## Declare some Variables GITHUB_PAT_TOKEN=' GITHUB_REPO_NAME=' GITHUB_USER_NAME=' ## Get all commits of a GitHub repository using API curl \ --silent \ --request GET \ --header "Authorization: token $GITHUB_PAT_TOKEN" \ https://api.github.com/repos/$GITHUB_USER_NAME/$GITHUB_REPO_NAME/commits |