Skip to content
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
1 change: 1 addition & 0 deletions changelog.d/added-18448-advisory-report-every-repo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- New owner setting **Advisory report in every repo** (Settings, Governor Config, Advisory; `governor.advisory.per_repo`, default off, `HIVE_ADVISORY_PER_REPO` sets the default when the key is absent). Off keeps one Hive Advisory Report in the primary repo covering all repos. On, each monitored repo also gets exactly one report, found by title plus the `hive/advisory` label or a hive marker so a restart never files a second; a report a person closed is left closed and no longer posted to; repos with Issues disabled or no write access are skipped with one warning. Turning it off stops updating those reports without closing them ([#18448](https://github.com/hivecommons/hive/issues/18448)).
8 changes: 8 additions & 0 deletions dashboard/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -11854,6 +11854,10 @@
},
"linear_issue": {
"type": "string"
},
"per_repo": {
"type": "boolean",
"description": "Advisory report in every repo (governor.advisory.per_repo, default false)"
}
}
}
Expand Down Expand Up @@ -11905,6 +11909,10 @@
"linear_issue": {
"type": "string",
"description": "Required when target is linear"
},
"per_repo": {
"type": "boolean",
"description": "Off: one Hive Advisory Report in the primary repo covers all repos. On: each monitored repo also gets its own report."
}
}
}
Expand Down
11 changes: 9 additions & 2 deletions src/cmd/hive/advisory_primary_only_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,16 @@ func TestAdvisoryWrites_NeverIssuedInsideALoop(t *testing.T) {
// seams exactly once each, and reads advisoryEnsureDepsForCycle.ensure only
// where it assigns it. The #18568 regression wired a second copy of each into
// a per-repo loop helper, which raised all of these counts to two.
//
// The opt-in per-repo report (#18448, governor.advisory.per_repo) adds exactly
// one more PostAdvisoryDigest wiring and one EnsureSecondaryAdvisoryIssue
// wiring, both handed to the secondary helpers, whose repo list is pinned to
// advisoryPerRepoSecondaryRepos (empty unless the owner opted in) by
// TestAdvisorySecondaryHelpers_OnlyFedThePerRepoGatedList.
var advisoryWriterWiring = map[string]int{
"EnsureAdvisoryIssue": 1,
"PostAdvisoryDigest": 1,
"EnsureSecondaryAdvisoryIssue": 1,
"PostAdvisoryDigest": 2,
"advisoryEnsureDepsForCycle.ensure": 1,
}

Expand Down Expand Up @@ -209,7 +216,7 @@ func TestAdvisoryWriters_WiredOnceForThePrimaryOnly(t *testing.T) {
return true
}
switch sel.Sel.Name {
case "EnsureAdvisoryIssue", "PostAdvisoryDigest":
case "EnsureAdvisoryIssue", "EnsureSecondaryAdvisoryIssue", "PostAdvisoryDigest":
if !called[sel] {
got[sel.Sel.Name]++
}
Expand Down
Loading
Loading