-
Notifications
You must be signed in to change notification settings - Fork 3
feat(roadmap-planner): W1 — member allowlist + GitLab instance-wide sweep #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,6 +88,17 @@ type TeamAnalytics struct { | |
| // daniel: daniel | ||
| // jtcheng: chengjingtao | ||
| GitLabUsernamePrefills map[string]string `mapstructure:"gitlab_username_prefills" yaml:"gitlab_username_prefills"` | ||
| // MemberDenylist is the operator-curated list of Jira member ids | ||
| // (slugified email — the same key shape used in the prefill maps) | ||
| // that should be excluded from the team-analytics rollups and from | ||
| // every contributions API response, regardless of whether they have | ||
| // an entry in the prefill maps. | ||
| // | ||
| // This is the W1 escape hatch for people who appear in Jira (so the | ||
| // auto-discovery picks them up) but should not count toward the | ||
| // dashboard — bots that aren't on the bot allowlist, people who | ||
| // left the team, contractors loaned out to another pillar, etc. | ||
| MemberDenylist []string `mapstructure:"member_denylist" yaml:"member_denylist"` | ||
| // Statuses is the W4 (2026-05-19) configurable status → lane map | ||
| // used by the sprint card. Status names match Jira's `status.name` | ||
| // case-folded; an unknown status falls back to `in_progress` and | ||
|
|
@@ -207,6 +218,12 @@ type GitLab struct { | |
| BackfillDays int `mapstructure:"backfill_days"` | ||
| HydrateDiff bool `mapstructure:"hydrate_diff"` | ||
| IncludeArchived bool `mapstructure:"include_archived"` | ||
| // MemberInstanceSweep turns on the W1 Pass B: after the group-scoped | ||
| // fetch finishes, sweep `/merge_requests?scope=all&author_username=<u>` | ||
| // for every allowlisted member whose GitLab username we know. Off | ||
| // by default so existing installs upgrade with no behaviour change; | ||
| // flip on once `team_analytics.gitlab_username_prefills` is curated. | ||
| MemberInstanceSweep bool `mapstructure:"member_instance_sweep"` | ||
| } | ||
|
|
||
| // Logger represents logger configuration settings | ||
|
|
@@ -418,6 +435,7 @@ func Load() (*Config, error) { | |
| viper.SetDefault("gitlab.backfill_days", 0) | ||
| viper.SetDefault("gitlab.hydrate_diff", true) | ||
| viper.SetDefault("gitlab.include_archived", false) | ||
| viper.SetDefault("gitlab.member_instance_sweep", false) | ||
|
|
||
| // GitHub defaults | ||
| viper.SetDefault("github.enabled", false) | ||
|
|
@@ -490,6 +508,18 @@ func Load() (*Config, error) { | |
| TeamAnalytics TeamAnalytics `yaml:"team_analytics"` | ||
| } | ||
| if uerr := yaml.Unmarshal(raw, &preserve); uerr == nil && len(preserve.TeamAnalytics.Pillars) > 0 { | ||
| // Preserve the YAML-side pillar names (case-sensitive), | ||
| // but merge back the viper-loaded denylist + prefills | ||
| // so they aren't lost when the YAML file omits them. | ||
| if len(preserve.TeamAnalytics.MemberDenylist) == 0 { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion ( |
||
| preserve.TeamAnalytics.MemberDenylist = config.TeamAnalytics.MemberDenylist | ||
| } | ||
| if len(preserve.TeamAnalytics.GitHubLoginPrefills) == 0 { | ||
| preserve.TeamAnalytics.GitHubLoginPrefills = config.TeamAnalytics.GitHubLoginPrefills | ||
| } | ||
| if len(preserve.TeamAnalytics.GitLabUsernamePrefills) == 0 { | ||
| preserve.TeamAnalytics.GitLabUsernamePrefills = config.TeamAnalytics.GitLabUsernamePrefills | ||
| } | ||
| config.TeamAnalytics = preserve.TeamAnalytics | ||
| } | ||
| } | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug (
bug/missing-feature): The GitLab syncer receivesAllowedMemberIDsfrom the allowlist, but the GitHub syncer path instartGitHubSynchas no equivalent allowlist filter. GitHub PRs authored by non-allowlisted members will still be inserted intopull_requestsand rolled up — inconsistent dashboard counts when both sources are active.