Browse Source

Adiciona script de checar os commits entre 3.1.x e master

pull/2647/head
Cesar Carvalho 6 years ago
parent
commit
80450e7adb
  1. 27
      scripts/check_commits.py

27
scripts/check_commits.py

@ -0,0 +1,27 @@
import requests
branch_master = requests.get('https://api.github.com/repos/interlegis/sapl/commits?per_page=100&sha=master')
branch_master = branch_master.json()
commits_master = [e['commit']['message'] for e in branch_master]
branch_3_1_x = requests.get('https://api.github.com/repos/interlegis/sapl/commits?per_page=70&sha=3.1.x')
branch_3_1_x = branch_3_1_x.json()
commits_3_1_x = [(e['commit']['message'], {'sha':e['sha'], 'data':e['commit']['author']['date']}) for e in branch_3_1_x]
print("\nCommits que estão em 3.1.x, mas não em master:\n")
# retira os \r para evitar bugs
commits_master = [commit.replace('\r', '') for commit in commits_master]
for c, s in commits_3_1_x:
# retira os \r para evitar bugs
c = c.replace('\r', '')
if c not in commits_master:
print('---------------------------------------------------------------------')
print('Data: ' + s['data'][:10])
print(s['sha'][:7] + '-> ' + c)
print('---------------------------------------------------------------------')
Loading…
Cancel
Save