mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix fun Travis DCO check YAML parsing issues (especially with commit messages that start with any kind of whitespace, like this one intentionally does)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
This commit is contained in:
parent
43b7667dcc
commit
c8d1596902
1 changed files with 6 additions and 1 deletions
|
@ -5,7 +5,7 @@ import yaml
|
||||||
|
|
||||||
from env import commit_range
|
from env import commit_range
|
||||||
|
|
||||||
commit_format = '-%n hash: "%h"%n author: %aN <%aE>%n message: |%n%w(0,2,2)%B'
|
commit_format = '-%n hash: "%h"%n author: %aN <%aE>%n message: |%n%w(0,2,2).%B'
|
||||||
|
|
||||||
gitlog = subprocess.check_output([
|
gitlog = subprocess.check_output([
|
||||||
'git', 'log', '--reverse',
|
'git', 'log', '--reverse',
|
||||||
|
@ -24,6 +24,11 @@ p = re.compile(r'^{0} ([^<]+) <([^<>@]+@[^<>]+)> \(github: (\S+)\)$'.format(re.e
|
||||||
failed_commits = 0
|
failed_commits = 0
|
||||||
|
|
||||||
for commit in commits:
|
for commit in commits:
|
||||||
|
commit['message'] = commit['message'][1:]
|
||||||
|
# trim off our '.' that exists just to prevent fun YAML parsing issues
|
||||||
|
# see https://github.com/dotcloud/docker/pull/3836#issuecomment-33723094
|
||||||
|
# and https://travis-ci.org/dotcloud/docker/builds/17926783
|
||||||
|
|
||||||
commit['stat'] = subprocess.check_output([
|
commit['stat'] = subprocess.check_output([
|
||||||
'git', 'log', '--format=format:', '--max-count=1',
|
'git', 'log', '--format=format:', '--max-count=1',
|
||||||
'--name-status', commit['hash'], '--',
|
'--name-status', commit['hash'], '--',
|
||||||
|
|
Loading…
Add table
Reference in a new issue