Compare commits

..

3 Commits

Author SHA1 Message Date
silverwind
2f138f7a03 Increase gap on latest commit (#35104)
Some checks failed
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
2025-07-17 20:53:03 +00:00
NorthRealm
39f145ae72 Fix job status aggregation logic (#35000)
For a run (assume 2 jobs) that has a failed job and a waiting job, the
run status should be waiting, **as the run is not done yet.**

Related #34823
2025-07-17 21:12:02 +03:00
Lunny Xiao
8ee96039aa Fix some missed GitHeadRefName when renaming (#35102) 2025-07-17 14:01:11 +00:00
6 changed files with 7 additions and 7 deletions

View File

@@ -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:

View File

@@ -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},

View File

@@ -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)
}

View File

@@ -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)
}

View File

@@ -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>

View File

@@ -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) {