Repository navigation
✨ Workflow models: ingest issue templates, triage, owners and branch rules into drafts - #17708
Conversation
Ingest now reads the repository's process conventions next to its pipelines and adds an inferred, cited intake half to the draft lifecycle: - issue templates (forms and front-matter Markdown) become one requested-<slug> state per label set in an Intake column, with an issue-opened-with-template:<slug> event bound to the template's label; - a repository triage label (needs-triage, triage/accepted|declined, from templates, settings.yml, labels.yml, labeler.yml or CONTRIBUTING.md) becomes a triage state and gate; - PR template checklist items become manual checks; CODEOWNERS and Prow OWNERS/OWNERS_ALIASES become approver/reviewer member roles owning the review gate; - branch rules (API protection or rulesets via .hive/branch-rules.json, or probot settings.yml) become required CI checks, a required-checks guard, review min approvals, a codeowner-review gate and bookkeeping. Trees without any of these inputs produce the byte-identical model as before; a regression test asserts this over the corpus. Schema gains Gate.MinApprovals, RoleMembers, Check.Kind (all omitempty). Refs #17620 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Client.FetchBranchRules reads GET /repos/{o}/{r}/branches/{b}/protection
and falls back to /rules/branches/{b} on 404/403; workflowRepoFiles
carries the result at ingest.BranchRulesPath so the dashboard seam is
unchanged. A failure to read rules is logged, not fatal.
Refs #17620
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Per-repo intake stats (intake states, triage, member roles, inferred gates, manual/CI checks, branch rules, template findings) and a repository count per element in summary.json and summary.md, so the RFC phase 5 heuristics can be measured across the corpus. Refs #17620 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Heuristics table, citation format, what cncf/techdocs now proposes and the limitations; changelog fragment. Refs #17620 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
A MAINTAINERS / MAINTAINERS.md file (root, .github/, docs/) now turns the hive-default permission-based maintainer role into a members role listing the @handle and github.com/handle spellings it names, and releases the review gate by maintainer when no approver role exists. kind/*, priority/*, type/*, area/*, severity/* and size/* labels declared in labels.yml, settings.yml, labeler.yml, templates or backticked in CONTRIBUTING.md are carried as plain label rows so the triage vocabulary is visible in the editor. Adds the maintainers-labels fixture and direct tests for Client.FetchBranchRules (protection, rulesets fallback, nothing reported, errors). Refs #17620 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
5c8efc2
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
The OWNERS file contains untrusted users, which makes it INVALID. The following users are mentioned in OWNERS file(s) but are untrusted for the following reasons. One way to make the user trusted is to add them as members of the hivecommons org. You can then trigger verification by writing
|
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Mutation testing⏱️ The 900s mutation budget ran out, so 1 package(s) were not fully mutated and the results below do not cover them:
❌ gremlins did not produce a report for 1 package(s), so no verdict can be derived from this run (see the job log):
4 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
RFC phase 5 of the workflow-models RFC (#17620): repository ingest now proposes the intake half of a workflow next to its pipelines, from the repository's own process conventions. Everything is
confidence: inferred, cites its source (path:lineorapi:<endpoint>), uses no LLM, and passesworkflowmodel.Compile. Trees without these inputs produce the byte-identical model as before (TestLifecyclePipelineOnlyUnchanged, existing goldens).What each source produces
.github/ISSUE_TEMPLATE/*.{yml,yaml,md},.github/ISSUE_TEMPLATE.mdrequested-<slug>state per distinct label set in an Intake column,issue-opened-with-template:<slug>events (labels has <bind label>), transitions open→requested→triage/actionable/closed, label rows per template label.github/ISSUE_TEMPLATE/config.ymlworkflow.hivecommons.dev/blank-issues: disabledannotation whenblank_issues_enabled: falsesettings.yml,labels.yml,labeler.yml,CONTRIBUTING.md(needs-triage,triage/accepted,triage/declined, …)triagestate in a Triage column,triage-requested/-accepted/-declinedevents,triage-decisiongate released byapprover(elsemaintainer) with reply/label <accepted>, label→state rows;good first issue/help wantedas plain rowskind/*,priority/*,type/*,area/*,severity/*,size/*labelsPULL_REQUEST_TEMPLATE.md,.github/PULL_REQUEST_TEMPLATE/*.md)pr-template-<slug>manual checks per checklist itemCODEOWNERS(root,.github/,docs/)approverrole of kindmembersOWNERS,OWNERS_ALIASES(Prow)approverandreviewerroles; review gate reply/approveMAINTAINERS,MAINTAINERS.mdmaintainerrole becomes kindmemberswith the@handle/github.com/handlespellings namedapproverrolereviewgate (pr.review is approved) on the hive-default merge-admission edgesGET …/branches/{b}/protection→ fallbackGET …/rules/branches/{b}; or probotsettings.ymlbranches[].protectioncheck-<slug>required CI checks,required-checksguard,review.minApprovals,codeowner-reviewgate, bookkeeping effects (enforce-admins,require-linear-history,require-signed-commits,dismiss-stale-reviews)The forge half arrives as a synthetic
.hive/branch-rules.jsonfile (ingest.BranchRulesPath) thatcmd/hive'sworkflowRepoFilesfills via the newClient.FetchBranchRuleswhen ingesting byrepo;LifecycleOptions.BranchRulesoverrides it.workflow-surveycounts intake/triage/role/gate proposals per repository.Files
pkg/workflowmodel/ingest/{intake,templates,labels,owners,branchrules}.go— new;lifecycle.go,tree.go— wire the intake half andIsIntakePathpkg/workflowmodel/lifecycle.go— intake/triage columnspkg/github/branch_rules.go—FetchBranchRules(protection → rulesets fallback)cmd/hive/workflow_ingest.go,cmd/workflow-survey/main.godocs/design/workflow-models.md— phase 5 section (heuristics table, citations, techdocs reading, limitations)testdata/{k8s-owners,md-template,techdocs,maintainers-labels,empty}Tests / coverage (local, targeted)
workflowmodel93.3%,ingest97.1%,github88.0%,workflow-survey96.6%;check-api-reference-citations.shclean; changelog fragment atchangelog.d/added-workflowmodel-ingest-intake.md.Known gaps
OWNERSis read; CODEOWNERS owners are allapprover.status: new) is not recognised.codeowner-reviewis informational (the engine does not see touched files).enforce_adminswhenadministration:readis missing.Refs #17620