Compare commits

..

No commits in common. "7b60d47c3c7ed2bee40a47e2fd87b7613cdd6b68" and "93e907de4173a64263b024293ac867f8111d4c40" have entirely different histories.

3 changed files with 9 additions and 52 deletions

View File

@ -5,7 +5,6 @@
package external package external
import ( import (
"bytes"
"fmt" "fmt"
"io" "io"
"os" "os"
@ -134,13 +133,11 @@ func (p *Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.
if !p.IsInputFile { if !p.IsInputFile {
cmd.Stdin = input cmd.Stdin = input
} }
var stderr bytes.Buffer
cmd.Stdout = output cmd.Stdout = output
cmd.Stderr = &stderr
process.SetSysProcAttribute(cmd) process.SetSysProcAttribute(cmd)
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {
return fmt.Errorf("%s render run command %s %v failed: %w\nStderr: %s", p.Name(), commands[0], args, err, stderr.String()) return fmt.Errorf("%s render run command %s %v failed: %w", p.Name(), commands[0], args, err)
} }
return nil return nil
} }

View File

@ -18,16 +18,14 @@
{{end}} {{end}}
{{range $.LatestCommitStatuses}} {{range $.LatestCommitStatuses}}
<div class="ui attached segment pr-status"> <div class="ui attached segment">
{{template "repo/commit_status" .}} <span>{{template "repo/commit_status" .}}</span>
<div class="status-context"> <span class="ui">{{.Context}} <span class="text grey">{{.Description}}</span></span>
<span>{{.Context}} <span class="text grey">{{.Description}}</span></span> <div class="ui right">
<div class="ui status-details"> {{if $.is_context_required}}
{{if $.is_context_required}} {{if (call $.is_context_required .Context)}}<div class="ui label">{{$.locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
{{if (call $.is_context_required .Context)}}<div class="ui label">{{$.locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}} {{end}}
{{end}} <span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
<span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
</div>
</div> </div>
</div> </div>
{{end}} {{end}}

View File

@ -3494,41 +3494,3 @@ td.blob-excerpt {
max-width: 165px; max-width: 165px;
} }
} }
.pr-status {
padding: 0 !important; // To clear fomantic's padding on .ui.segment elements
display: flex;
align-items: center;
.commit-status {
margin: 1em;
flex-shrink: 0;
}
.status-context {
display: flex;
justify-content: space-between;
width: 100%;
> span {
padding: 1em 0;
}
}
.status-details {
display: flex;
padding-right: .5em;
align-items: center;
justify-content: flex-end;
@media @mediaSm {
flex-direction: column;
align-items: flex-end;
justify-content: center;
}
> span {
padding-right: .5em; // To match the alignment with the "required" label
}
}
}