mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
More improvements to CircleCI configuration (#2777)
* Moved configuration to `.circleci/config.yml` as the documentation for V2 suggests. * Created a dedicated Docker Compose configuration (in `.circleci/docker-compose.yml`) to remove volumes configuration as this is not supported with CircleCI's Docker executer. * Fix the Docker image build and tarball packing jobs to work and use correct version.
This commit is contained in:
35
bin/get_changes.py
Normal file
35
bin/get_changes.py
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/env python
|
||||
import sys
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
def get_change_log(previous_sha):
|
||||
args = ['git', '--no-pager', 'log', '--merges', '--grep', 'Merge pull request', '--pretty=format:"%h|%s|%b|%p"', 'master...{}'.format(previous_sha)]
|
||||
log = subprocess.check_output(args)
|
||||
changes = []
|
||||
|
||||
for line in log.split('\n'):
|
||||
try:
|
||||
sha, subject, body, parents = line[1:-1].split('|')
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
try:
|
||||
pull_request = re.match("Merge pull request #(\d+)", subject).groups()[0]
|
||||
pull_request = " #{}".format(pull_request)
|
||||
except Exception as ex:
|
||||
pull_request = ""
|
||||
|
||||
author = subprocess.check_output(['git', 'log', '-1', '--pretty=format:"%an"', parents.split(' ')[-1]])[1:-1]
|
||||
|
||||
changes.append("{}{}: {} ({})".format(sha, pull_request, body.strip(), author))
|
||||
|
||||
return changes
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
previous_sha = sys.argv[1]
|
||||
changes = get_change_log(previous_sha)
|
||||
|
||||
for change in changes:
|
||||
print change
|
||||
Reference in New Issue
Block a user