-
Notifications
You must be signed in to change notification settings - Fork 597
travis: fix DCO validation for merges #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
travis: fix DCO validation for merges #170
Conversation
.tools/validate.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of splitting at consume-time, it seems cleaner to make CommitEntry.Parent a CommitEntry.Parents array and parse at commit-lookup time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meh. that would be another separated shell-out, and would then also have to be done for abbreviated parent as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Thu, Sep 10, 2015 at 06:26:27AM -0700, Vincent Batts wrote:
@@ -16,6 +16,12 @@ import (
var DefaultRules = []ValidateRule{
func(c CommitEntry) (vr ValidateResult) {
vr.CommitEntry = c
if len(strings.Split(c.Parent, " ")) > 1 {meh. that would be another separated shell-out…
Why? Can't you just have:
… "parents": ["%P"], "abbreviated_parents": ["%p"], …,
in prettyLogFormat, and then:
c.Parents = strings.Split(c.Parents, " ")
c.AbbreviatedParents = strings.Split(c.AbbreviatedParents, " ")
after your Unmarshal?
merged PRs do not have DCO, so do not check for them Signed-off-by: Vincent Batts <[email protected]>
Accomplishing the same access to the commit entry, with more readable code. Reported-by: Lai Jiangshan <[email protected]> Signed-off-by: Vincent Batts <[email protected]>
546d18a to
5a654b9
Compare
|
@laijs per https://github.com/opencontainers/specs/pull/167/files#r39153774 see the cleanup commit. |
|
LGTM |
|
@mrunalp review? |
|
@vbatts Looking |
|
LGTM |
travis: fix DCO validation for merges
merged PRs do not have DCO, so do not check for them
#169
Signed-off-by: Vincent Batts [email protected]