feat: improve qa output determinism and JSON modes
This commit is contained in:
parent
aa57d1e09f
commit
cf9e43f0ad
3 changed files with 5 additions and 8 deletions
|
|
@ -40,7 +40,7 @@ type HealthWorkflowRun struct {
|
|||
// RepoHealth represents the CI health of a single repo
|
||||
type RepoHealth struct {
|
||||
Name string `json:"name"`
|
||||
Status string // "passing", "failing", "pending", "no_ci", "disabled"
|
||||
Status string `json:"status"` // "passing", "failing", "pending", "no_ci", "disabled"
|
||||
Message string `json:"message"`
|
||||
URL string `json:"url"`
|
||||
FailingSince string
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ func runQAIssues() error {
|
|||
// Fetch issues from all repos
|
||||
var allIssues []Issue
|
||||
repoList := reg.List()
|
||||
|
||||
for _, repo := range repoList {
|
||||
issues, err := fetchQAIssues(reg.Org, repo.Name, issuesLimit)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ func runReview() error {
|
|||
if showMine {
|
||||
prs, err := fetchPRs(ctx, repoFullName, "author:@me")
|
||||
if err != nil {
|
||||
return log.E("qa.review", "failed to fetch your PRs", err)
|
||||
return err
|
||||
}
|
||||
sort.Slice(prs, func(i, j int) int {
|
||||
if prs[i].Number == prs[j].Number {
|
||||
|
|
@ -148,7 +148,7 @@ func runReview() error {
|
|||
if showRequested {
|
||||
prs, err := fetchPRs(ctx, repoFullName, "review-requested:@me")
|
||||
if err != nil {
|
||||
return log.E("qa.review", "failed to fetch review requests", err)
|
||||
return err
|
||||
}
|
||||
sort.Slice(prs, func(i, j int) int {
|
||||
if prs[i].Number == prs[j].Number {
|
||||
|
|
@ -185,8 +185,7 @@ func runReview() error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// showMyPRs shows the user's open PRs with status
|
||||
// printMyPRs shows the user's open PRs with status
|
||||
func printMyPRs(prs []PullRequest) error {
|
||||
if len(prs) == 0 {
|
||||
cli.Print("%s\n", dimStyle.Render(i18n.T("cmd.qa.review.no_prs")))
|
||||
|
|
@ -201,8 +200,7 @@ func printMyPRs(prs []PullRequest) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// showRequestedReviews shows PRs where user's review is requested
|
||||
// printRequestedPRs shows PRs where user's review is requested
|
||||
func printRequestedPRs(prs []PullRequest) error {
|
||||
if len(prs) == 0 {
|
||||
cli.Print("%s\n", dimStyle.Render(i18n.T("cmd.qa.review.no_reviews")))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue