Skip to content
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

fix: improve user feedback #1875

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/pipelineascode/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ func (p *PacRun) checkAccessOrErrror(ctx context.Context, repo *v1alpha1.Reposit
p.eventEmitter.EmitMessage(repo, zap.InfoLevel, "RepositoryPermissionDenied", msg)
status := provider.StatusOpts{
Status: queuedStatus,
Title: "Pending approval",
Title: "Pending approval, needs /ok-to-test",
Conclusion: pendingConclusion,
Text: msg,
DetailsURL: p.event.URL,
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/github/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func (v *Provider) createStatusCommit(ctx context.Context, runevent *info.Event,
runevent.Organization, runevent.Repository, runevent.SHA, ghstatus); err != nil {
return err
}
if (status.Status == "completed" || (status.Status == "queued" && status.Title == "Pending approval")) && status.Text != "" && runevent.EventType == triggertype.PullRequest.String() {
if (status.Status == "completed" || (status.Status == "queued" && status.Title == "Pending approval, needs /ok-to-test")) && status.Text != "" && runevent.EventType == triggertype.PullRequest.String() {
_, _, err = v.Client.Issues.CreateComment(ctx, runevent.Organization, runevent.Repository,
runevent.PullRequestNumber,
&github.IssueComment{
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/github/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func TestGetExistingPendingApprovalCheckRunID(t *testing.T) {
"id": %v,
"external_id": "%s",
"output": {
"title": "Pending approval",
"title": "Pending approval, needs /ok-to-test",
"summary": "My CI is waiting for approval"
}
}
Expand Down Expand Up @@ -414,7 +414,7 @@ func TestGithubProviderCreateStatus(t *testing.T) {
"status": "queued",
"conclusion": "pending",
"output": {
"title": "Pending approval",
"title": "Pending approval, needs /ok-to-test",
"summary": "My CI is waiting for approval"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/pkg/gitea/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func WaitForStatus(t *testing.T, topts *TestOpts, ref, forcontext string, onlyla
}
for _, cstatus := range statuses {
if topts.CheckForStatus == "Skipped" {
if strings.HasSuffix(cstatus.Description, "Pending approval") {
if strings.HasSuffix(cstatus.Description, "Pending approval, needs /ok-to-test") {
numstatus++
break
}
Expand Down
Loading