feat: Add optional group-level GitLab issue sync#2801
Merged
steveyegge merged 2 commits intosteveyegge:mainfrom Mar 27, 2026
Merged
feat: Add optional group-level GitLab issue sync#2801steveyegge merged 2 commits intosteveyegge:mainfrom
steveyegge merged 2 commits intosteveyegge:mainfrom
Conversation
When gitlab.group_id is configured, FetchIssues and FetchIssuesSince use the /groups/:id/issues API endpoint to aggregate issues across all projects in the group. Issue creation still uses the project endpoint (via gitlab.project_id or gitlab.default_project_id). New config keys: - gitlab.group_id / GITLAB_GROUP_ID - gitlab.default_project_id / GITLAB_DEFAULT_PROJECT_ID Backward compatible: existing project-level sync is unchanged when group_id is not set.
Add optional filters for labels, project, milestone, and assignee to the GitLab issue sync. Filters work on both project and group endpoints. Filters can be set via config (gitlab.filter_labels, etc.), environment variables (GITLAB_FILTER_LABELS, etc.), or CLI flags (--label, --project, --milestone, --assignee). CLI flags override config defaults. Labels, milestone, and assignee are passed as GitLab API query params. Project filtering within a group is done client-side since the GitLab group issues API doesn't support it natively.
Contributor
Author
|
@steveyegge this one unblocks full gitlab projects support |
6 tasks
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.
Summary
Adds optional group-level issue sync and filtering for
bd gitlab sync.Group-level sync
When
gitlab.group_idis configured, issues are fetched from all projects in the group instead of a single project.gitlab.group_id,gitlab.default_project_idgroup_idtakes precedence overproject_idfor fetchingdefault_project_id(or falls back toproject_id)Filtering
All filters work on both pull and push, are optional and composable.
--label <name>/gitlab.filter_labels— filter by labels (AND logic)--project <name>/gitlab.filter_project— filter to specific project within group--milestone <name>/gitlab.filter_milestone— filter by milestone--assignee <username>/gitlab.filter_assignee— filter by assigneeUse case
Organizations using GitLab groups with multiple repos need to sync only issues relevant to a specific repo or team. For example, syncing only issues labeled "backend" or belonging to a specific project within the group.
Files changed
internal/gitlab/client.go— FetchIssues/FetchIssuesSince support group endpoint + filter paramsinternal/gitlab/tracker.go— config loading for group and filter keysinternal/gitlab/types.go— GroupID field, filter typescmd/bd/gitlab.go— status shows group config, sync accepts filter flagsTest plan
bd gitlab syncwith onlyproject_idset (existing behavior unchanged)bd gitlab syncwithgroup_idset (group-level fetch)bd gitlab syncwith both set (group_idtakes precedence)bd gitlab sync --label backend(label filtering)bd gitlab sync --project myproject(project filtering within group)bd gitlab sync --milestone "Sprint 1"(milestone filtering)bd gitlab sync --assignee username(assignee filtering)--label backend --milestone "Sprint 1"bd gitlab statusshows group and filter config when set