Skip to content

Add a repository scope setting for organization repositories - #6

Merged
robzolkos merged 3 commits into
robzolkos:mainfrom
tmn73:repository-scope
Aug 14, 2026
Merged

Add a repository scope setting for organization repositories#6
robzolkos merged 3 commits into
robzolkos:mainfrom
tmn73:repository-scope

Conversation

@tmn73

@tmn73 tmn73 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Sorry for the PR spam, this should be the last one 😄.
I just really like this plugin and I want to be able to use it for everything, so I keep hitting small things that stop me from doing that.

The repository list is built from ownerAffiliations:OWNER, so it only contains repositories I personally own. All my actual work is in an org, so searching frontend in that section finds nothing, even though the sections above already show me notifications, review requests and pull requests from those same repos.

So: a Repository scope setting, Owned or Owned and organizations. Defaults to Owned, so nothing changes for an existing install.

An enum and not a boolean because it says what the list contains rather than toggling something, and it leaves room for another value later if you ever want one.

The heading becomes REPOSITORIES instead of OWNED REPOSITORIES on the wider scope. It reads the scope back from the helper payload and not from the setting, so it can't say REPOSITORIES while the list is still the owned-only one from the previous refresh.

One thing worth knowing before you take it: the Actions scan picks the 15 most recently updated repos out of this list. On the wider scope those 15 tend to become org repos, since that's where the activity is, so personal repos quietly drop out of the two Actions sections. It's the right trade for someone turning the setting on imo, but it is a real side effect and it's not visible anywhere in the UI. Happy to leave it, or to keep the scan on owned repos only if you'd rather.

Same idea for cost: on All repositories the scan is 6 paginated calls per repo, so the wider scope raises the ceiling by however many org repos you can see. Default scan mode is still Recent repositories so it stays at 15 either way, but someone in a big org who turns both up will hit the rate limit faster than before. I updated that setting's description, it said "every owned repository".

On my account: 108 repos on Owned, 118 on Owned and organizations, and the org repo I actually work in finally shows up in the search.

tests/helper-test.sh, tests/panel-source-test.sh and tests/service-source-test.sh all pass, plus omarchy plugin validate .. New cases check that each scope reaches the query with the right affiliation, that the payload reports back what it fetched, and on the QML side that the setting maps correctly, that the flag is actually passed, and that the heading follows the fetched scope. I checked those last two fail if you break them.

tmn73 and others added 3 commits August 14, 2026 06:58
The repository list is built from ownerAffiliations:OWNER, so it only
ever contains repositories you personally own. Anyone whose day-to-day
work lives in an organization cannot find those repositories through the
panel's search, filters, or sort, even though the sections above already
surface notifications, review requests and pull requests from them.

The scope is an enum rather than a boolean because it describes what the
list contains rather than toggling a behaviour, and it leaves room for a
narrower or wider value later. It defaults to owned, so an existing
install is unchanged.

The heading reads REPOSITORIES instead of OWNED REPOSITORIES when the
wider scope is in effect. It follows the scope reported by the payload
rather than the setting, so it cannot claim to list organization
repositories before the refresh that fetches them has landed.
Rename the payload echo to fetchedRepositoryScope and the derived getter
to repositoryMode, mirroring actionScanBehavior and actionMode. The
property and the setting key shared a name with different vocabularies,
so a reader could reasonably take the heading for setting-driven and
'simplify' it back into the bug the design avoids.

Match the setting against its known options instead of testing for the
substring 'organization'. A later option such as 'Organizations only'
would have matched and silently widened the scope, giving back exactly
the room the enum was chosen to leave.

Cover the QML half in the source suites: the setting mapping, the helper
argument, and the scope-aware heading. Both regressions were verified to
fail their new assertion.

Drop the stale 'owned' wording from the Actions scan description, the
plugin description, the repository dashboard section, and the empty
state, which would otherwise have contradicted the heading above it.
@robzolkos

Copy link
Copy Markdown
Owner

Thanks @tmn73 for another thoughtful contribution. The repository-scope design is a useful improvement, and the PR did an excellent job calling out the Actions-scan tradeoffs and preserving the narrow default. I added clearer configuration and API-cost documentation, exact fail-closed Actions-mode handling, and scope-sensitive coverage. CI is green, so I’m merging this now.

@robzolkos
robzolkos merged commit c6e6633 into robzolkos:main Aug 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants