14 lines
639 B
Python
14 lines
639 B
Python
import requests
|
|
|
|
gitlab_pat = 'glpat-mJPdjrPiHCTj2NqNZN_m'
|
|
headers = {'PRIVATE-TOKEN': gitlab_pat}
|
|
|
|
r = requests.get('https://gitlab.ekeepa.co/api/v4/projects/10/repository/commits?path=src/services/v2/site/rooms/[id]/service.GET.ts', headers=headers)
|
|
print("Commits for [id]/service.GET.ts:")
|
|
for c in r.json():
|
|
print(c['id'][:8], c['committed_date'], c['author_name'], c['title'])
|
|
|
|
r2 = requests.get('https://gitlab.ekeepa.co/api/v4/projects/10/repository/commits?per_page=10', headers=headers)
|
|
print("\nLatest 10 commits on project 10:")
|
|
for c in r2.json():
|
|
print(c['id'][:8], c['committed_date'], c['author_name'], c['title'])
|