Repository navigation
feat(ghdash): per-view section lists for gh-dash profiles - #1596
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
vigos.ghdash.profilesnamed one section list per profile and the wrapper wroteit to both
prSectionsandissuesSections. PR and issue queues are notfiltered alike —
review-requested:@me,draft:false,reviewed-by:@meeitherdo not apply to issues or mean something else — so a profile written for pull
requests landed a permanently empty section under Issues, and the only escape
was writing the profile down to the intersection of what both views understand.
The quieter half:
templateTextset both keys unconditionally, so a consumerwho tuned
programs.gh-dash.settings.issuesSectionskept it for baregh-dashand lost it in every
gh-dash-repolaunch,defaultincluded — which isthe launch path a
vigos.seshlayout'sprswindow actually uses.Type of Change
feat-- New featureModifiers
!) -- This change breaks backward compatibilityChanges Made
profilestakes either shape. A profile is still one entry — onedashboard — but may now be
{ prSections; issuesSections; }instead of abare list.
issuesSections = null(the default) mirrorsprSections;[ ]leaves the issues view empty rather than wrong. A bare list coerces totoday's meaning, so nothing written against [FEATURE] vigos.ghdash: per-project scope and section profiles #1586 changes.
coercedTo sectionList …, butnixpkgs asserts
coercedType.getSubModules == null, so the source type isshape-only (
listOf anything) and the entries are type-checked byprSectionsafter coercion — a malformed section still fails at eval(verified:
profiles.bad = [ { title = "X"; typo = true; } ]errors withThe option `vigos.ghdash.profiles.bad.prSections."[definition 1-entry 1]".typo` does not exist).templateTexttakes the pair and stops folding one list into both; issuefilters are scope-free and get the
__GH_DASH_SCOPE__placeholder exactly asPR ones do.
defaultstops overwriting the consumer's issues view. The module onlymkDefaultsprograms.gh-dash.settings.issuesSections, so anything else isthe consumer's own dashboard and passes through verbatim — those sections
carry the scope their author chose; one that wants to follow the launch repo
writes the placeholder itself (documented on the option).
Scope note: the same "respect the consumer's value" rule is deliberately not
applied to
prSections, per the issue — the generated sections are PR-shapedand scoping them to the launch repo is the wrapper's whole purpose.
Changelog Entry
Testing
just test)uv run pytest tests/test_flake_checks.py— 25 passed (includesnix flake checkand theci-hm-unstableeval).prek run --all-filesgreen,no file modified.
Three tests, TDD (RED commit
7a9aaa16, GREEN12a64b9a):test_ghdash_profiles_render_templates— extended with bare-list parity:defaultand a list-shaped profile must renderprSections == issuesSections.test_ghdash_profile_splits_pr_and_issue_sections— a split profile keeps thetwo lists apart and scopes the issues list;
issuesSections = [ ]stays empty.test_ghdash_default_profile_keeps_consumer_issue_sections— a consumer-setissuesSectionssurvives intodefault.ymlverbatim while the generated PRsections still carry the placeholder. This needed
_home_module_evalto growan
extraargument for module attributes outsidevigos.<module>.Manual Testing Details
Backward compatibility checked byte-for-byte, not just by shape: rendered
default.yml,shared.yml(a bare-list profile with alimit) andprograms.gh-dash.settingsfrom agit worktreeatorigin/devand from thisbranch, with the same
repoFilters—diffis empty.Checklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
Option documentation lives in the module's
description/example(there is nodocs/page forvigos.ghdash), both updated. The scaffold's changelog mirror(
assets/workspace/.devcontainer/CHANGELOG.md) is thesync-manifesthook'soutput, not a hand edit.
Refs: #1595