Skip to content
Open
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 internal/apiclient/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions internal/output/lavaflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,6 @@ func lavaflowFix(w io.Writer, on bool, run *apiclient.LavaflowRun) {
if cover := delivery.Coverage; cover != nil && pr == nil {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ P3: The commit title says the change adds the covering PR state, but it actually removes the Deployment line

The base already printed Covering pull request and State for a covering PR (base internal/output/lavaflow.go:511-512). The only user-visible change here is that the Deployment: <time>|unconfirmed line no longer appears for a merged covering PR. release-please turns the squash title fix(lavaflow): show the covering pull request state into the CHANGELOG entry, so the release notes will describe something that already existed and won't mention the removed line. Consider a title like fix(lavaflow): stop printing deployment for a covering pull request so the changelog matches the behavior.

Found by claude-opus-5-5

fixKV(w, on, "Covering pull request", "#%d %s", cover.Number, clean(cover.Url))
fixKV(w, on, "State", "%s", clean(string(cover.State)))
if cover.State == apiclient.LavaflowDeliveryCoverageStateMerged {
fixKV(w, on, "Deployment", "%s", formatLavaflowTimePtr(cover.DeployedAt, "unconfirmed"))
}
return
}
if state := lavaflowDeliveryStatus(delivery.State); state != "" && pr == nil {
Expand All @@ -538,8 +535,6 @@ func lavaflowFix(w io.Writer, on bool, run *apiclient.LavaflowRun) {
if run.Merge != nil {
lavaflowMergeLines(w, on, run.Merge, pr)
}
// The API doesn't say yet whether a merged fix deployed. Print it here
// once the pull request carries deployed_at.
}

// fixKV writes a "Label: value" line inside the Fix block.
Expand Down
16 changes: 16 additions & 0 deletions internal/output/lavaflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package output
import (
"bytes"
"testing"
"time"

"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -38,3 +39,18 @@ func TestLavaflowDeliveryStatus(t *testing.T) {
})
}
}

func TestLavaflowFixPrintsCoveringPullRequestState(t *testing.T) {
t.Parallel()

deployed := time.Date(2026, time.November, 19, 18, 15, 0, 0, time.UTC)
run := &apiclient.LavaflowRun{Delivery: &apiclient.LavaflowDelivery{
Coverage: &apiclient.LavaflowDeliveryCoverage{
Number: 24, Url: "https://github.com/example/project/pull/24",
State: apiclient.LavaflowDeliveryCoverageStateMerged, DeployedAt: &deployed,
},
}}
var out bytes.Buffer
lavaflowFix(&out, false, run)
require.Equal(t, "Fix:\n Covering pull request: #24 https://github.com/example/project/pull/24\n State: merged\n", out.String())
}
2 changes: 1 addition & 1 deletion openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31086,7 +31086,7 @@ components:
description: '`waiting_for_checks`: LavaFlow waits for the checks on the fix''s commit. `waiting_for_approval`: checks passed and GitHub still requires an approving review. LavaFlow keeps watching and merges or queues the fix once GitHub reports required reviews satisfied and checks still pass. A new or dismissed approval is noticed on the next read, normally within five minutes. This wait does not consume the CI timeout. `queued`: the fix is in the repository''s merge queue. `merged`: the pull request merged. `held`: something in `hold_reasons` needs a person. LavaFlow commented on the pull request once and never merges, pushes to, rebases or dequeues it again; review it and merge it yourself if you want it. A fix a person merges (its autonomy is `open_pr`, merging was unavailable when it opened, or its run may only open a pull request) is always `held` for `person_merges` once LavaFlow has started its CI, or found it may not. `stopped`: LavaFlow left the pull request open for you, for `reason`.'
LavaflowMergeReason:
type: string
description: 'Why the merge stopped, or what a waiting merge is paused for. `review_unresolved`: LavaFlow''s review did not pass the fix. `checks_failed`: a check failed. `checks_timed_out`: checks did not finish in time. `blocked_by_rules`: the repository''s rules hold the merge. `not_mergeable`: GitHub can''t merge the pull request, for example because it conflicts. `branch_behind`: the base branch requires the fix to be up to date with it, and LavaFlow doesn''t update fix branches. `removed_from_queue`: the fix isn''t in the merge queue, and LavaFlow can''t tell why, for example because its checks failed there or someone removed it. `reads_failed`: LavaFlow failed to read the pull request for about an hour while the fix may have been queued, so it took the fix out of the merge queue, when it could still reach it, and stopped, or failed to read the project''s settings or repository for about a day while merging was paused. `handed_off`: someone else changed or took over the pull request. `unreadable`: GitHub''s state could not be read. `permission_missing`: the Volcano GitHub App, or the project owner''s GitHub account, lacks a permission the merge needs. `repository_changed`: the project now deploys from another repository. `settings_changed`: the project''s settings no longer allow the merge. `request_rejected`: GitHub refused LavaFlow''s request to start the checks on the fix. `ci_start_commit_mismatch`: GitHub reports a different commit from the one LavaFlow made to start the checks. `branch_refused`: LavaFlow starts checks only on a LavaFlow branch of an open pull request it opened, never the default or production branch, so it didn''t start them on this one. `head_unverified`: GitHub doesn''t report the fix''s head as the signed commit LavaFlow pushed, so LavaFlow didn''t start its checks. `checks_not_started`: LavaFlow couldn''t give the fix a commit message that runs CI. `queue_carries_ci_skip`: the repository''s merge queue could carry an instruction to skip checks, from the fix''s commits or its pull request''s title or description, into the base branch. `merge_carries_ci_skip`: merging would carry an instruction to skip checks into the base branch, for example because the repository allows no squash merge. Each of these seven hands the fix to you for good. `manual_deploy`: the fix merged and waits for you to deploy it. `paused`: merging is paused, and the merge waits. LavaFlow takes a queued fix out of the merge queue, so it shows `waiting_for_checks`, and queues it again when merging resumes. `paused_too_long`: merging stayed paused for more than 7 days. `cancelled`: the project is being deleted, so LavaFlow stopped waiting on the merge. New reasons may appear.'
description: 'Why the merge stopped, or what a waiting merge is paused for. `review_unresolved`: LavaFlow''s review did not pass the fix. `checks_failed`: a check failed. `checks_timed_out`: checks did not finish in time. `blocked_by_rules`: the repository''s rules hold the merge. `not_mergeable`: GitHub can''t merge the pull request, for example because it conflicts. `branch_behind`: the base branch requires the fix to be up to date with it, and LavaFlow doesn''t update fix branches. `removed_from_queue`: the fix isn''t in the merge queue, and LavaFlow can''t tell why, for example because its checks failed there or someone removed it. `reads_failed`: LavaFlow failed to read the pull request for about an hour while the fix may have been queued, so it took the fix out of the merge queue, when it could still reach it, and stopped, or failed to read the project''s settings or repository for about a day while merging was paused. `handed_off`: someone else changed or took over the pull request. `unreadable`: GitHub''s state could not be read. `permission_missing`: the Volcano GitHub App, or the project owner''s GitHub account, lacks a permission the merge needs. `repository_changed`: the project now deploys from another repository. `settings_changed`: the project''s settings no longer allow the merge. `request_rejected`: GitHub refused LavaFlow''s request to start the checks on the fix. `ci_start_commit_mismatch`: GitHub reports a different commit from the one LavaFlow made to start the checks. `branch_refused`: LavaFlow starts checks only on a LavaFlow branch of an open pull request it opened, never the default or production branch, so it didn''t start them on this one. `head_unverified`: GitHub doesn''t report the fix''s head as the signed commit LavaFlow pushed, so LavaFlow didn''t start its checks. `checks_not_started`: LavaFlow couldn''t give the fix a commit message that runs CI. `queue_carries_ci_skip`: the repository''s merge queue could carry an instruction to skip checks, from the fix''s commits or its pull request''s title or description, into the base branch. `merge_carries_ci_skip`: merging would carry an instruction to skip checks into the base branch, for example because the repository allows no squash merge. Each of these seven hands the fix to you for good. `paused`: merging is paused, and the merge waits. LavaFlow takes a queued fix out of the merge queue, so it shows `waiting_for_checks`, and queues it again when merging resumes. `paused_too_long`: merging stayed paused for more than 7 days. `cancelled`: the project is being deleted, so LavaFlow stopped waiting on the merge. New reasons may appear.'
LavaflowHoldReason:
type: object
description: One reason LavaFlow holds the fix for a person.
Expand Down
Loading