feat: Add optional group-level GitLab issue sync#2800
Closed
ktoulgaridis wants to merge 2 commits intosteveyegge:mainfrom
Closed
feat: Add optional group-level GitLab issue sync#2800ktoulgaridis wants to merge 2 commits intosteveyegge:mainfrom
ktoulgaridis wants to merge 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
|
Closing duplicate — polecat auto-pushed this branch. Keeping #2801 (feat/gitlab-group-sync) as the canonical PR. |
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
gitlab.group_idandgitlab.default_project_idconfig keys for group-level GitLab issue syncinggroup_idis set,FetchIssues/FetchIssuesSinceuse/groups/:id/issuesAPI endpoint to aggregate issues across all projects in the groupgroup_idis not setConfig
Files changed
internal/gitlab/types.go— AddedGroupIDfield toClientstructinternal/gitlab/client.go—WithGroupID()builder,issuesBasePath()helper, updated fetch methodsinternal/gitlab/tracker.go— Config loading for new keys, group-aware client initializationcmd/bd/gitlab.go— CLI config struct, env var mapping, validation, status displayinternal/gitlab/client_test.go— Tests for group endpoint routing, path encoding, builder preservationcmd/bd/gitlab_test.go— Tests for config validation, env vars, client creation with groupTest plan