mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-21 09:31:19 +02:00
Compare commits
3 Commits
de1114b4e8
...
2f138f7a03
Author | SHA1 | Date | |
---|---|---|---|
|
2f138f7a03 | ||
|
39f145ae72 | ||
|
8ee96039aa |
@@ -187,10 +187,10 @@ func AggregateJobStatus(jobs []*ActionRunJob) Status {
|
||||
return StatusCancelled
|
||||
case hasRunning:
|
||||
return StatusRunning
|
||||
case hasFailure:
|
||||
return StatusFailure
|
||||
case hasWaiting:
|
||||
return StatusWaiting
|
||||
case hasFailure:
|
||||
return StatusFailure
|
||||
case hasBlocked:
|
||||
return StatusBlocked
|
||||
default:
|
||||
|
@@ -64,7 +64,7 @@ func TestAggregateJobStatus(t *testing.T) {
|
||||
{[]Status{StatusFailure, StatusSuccess}, StatusFailure},
|
||||
{[]Status{StatusFailure, StatusSkipped}, StatusFailure},
|
||||
{[]Status{StatusFailure, StatusCancelled}, StatusCancelled},
|
||||
{[]Status{StatusFailure, StatusWaiting}, StatusFailure},
|
||||
{[]Status{StatusFailure, StatusWaiting}, StatusWaiting},
|
||||
{[]Status{StatusFailure, StatusRunning}, StatusRunning},
|
||||
{[]Status{StatusFailure, StatusBlocked}, StatusFailure},
|
||||
|
||||
|
@@ -413,7 +413,7 @@ func (pr *PullRequest) getReviewedByLines(ctx context.Context, writer io.Writer)
|
||||
return committer.Commit()
|
||||
}
|
||||
|
||||
// GetGitRefName returns git ref for hidden pull request branch
|
||||
// GetGitHeadRefName returns git ref for hidden pull request branch
|
||||
func (pr *PullRequest) GetGitHeadRefName() string {
|
||||
return fmt.Sprintf("%s%d/head", git.PullPrefix, pr.Index)
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ func (p *PullRequest) IsForkPullRequest() bool {
|
||||
return p.Head.RepoFullName() != p.Base.RepoFullName()
|
||||
}
|
||||
|
||||
// GetGitRefName returns pull request relative path to head
|
||||
// GetGitHeadRefName returns pull request relative path to head
|
||||
func (p PullRequest) GetGitHeadRefName() string {
|
||||
return fmt.Sprintf("%s%d/head", git.PullPrefix, p.Number)
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@
|
||||
{{if eq .PullRequest.Flow 0}}
|
||||
<div>git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}<origin-url data-url="{{.PullRequest.HeadRepo.Link}}"></origin-url>{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div>
|
||||
{{else}}
|
||||
<div>git fetch -u origin {{.PullRequest.GetGitRefName}}:{{$localBranch}}</div>
|
||||
<div>git fetch -u origin {{.PullRequest.GetGitHeadRefName}}:{{$localBranch}}</div>
|
||||
{{end}}
|
||||
<div>git checkout {{$localBranch}}</div>
|
||||
</div>
|
||||
|
@@ -141,7 +141,7 @@ td .commit-summary {
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
gap: 0.25em;
|
||||
gap: 0.5em;
|
||||
}
|
||||
|
||||
@media (max-width: 767.98px) {
|
||||
|
Reference in New Issue
Block a user