Commit graph

5 commits

Author SHA1 Message Date
matt wilkie
4e0a654556
fix(gitlab): wire issue link dependencies into sync pull (GH#2645) (#3202)
Amp-Thread-ID: https://ampcode.com/threads/T-019d7dc3-1873-7398-bb9b-82dfacf7bbc1

Co-authored-by: Amp <amp@ampcode.com>
2026-04-11 21:21:49 -07:00
beads/crew/emma
29531d2b68 feat: GitLab sync — dedup fixes, type filtering, epic→milestone mapping, work item hierarchy (#2889)
- Fix pull dedup: check wisps table and match work_items URLs
- Add type-based filtering to GitLab sync CLI
- Default-exclude molecule/message/event types from push
- Fix source_system update that breaks external_ref persistence
- Map all beads statuses to GitLab scoped labels for board columns
- Handle status::review and status::done labels on pull
- Map epic beads to GitLab milestones instead of issues
- Create task beads as GitLab Task work items with parent hierarchy
- Walk parent chain to find epic milestone, use API ID not IID

Co-authored-by: ktoulgaridis <ktoulg@gmail.com>

Executed-By: beads/crew/emma
2026-04-02 20:58:25 -07:00
beads/crew/lizzy
fade5297ae chore: unexport 12 dead symbols in internal/gitlab
Unexport package-internal symbols with no external callers:
- IsValidState, IssueLinksToDependencies, FilterNonScopedLabels, PriorityFromLabels
- StatusFromLabelsAndState, TypeFromLabels, StateCache, ParseLabelPrefix
- TypeMapping, GetPriorityFromLabel, GetStatusFromLabel, GetTypeFromLabel

Kept exported: Milestone, IssueLinks, SyncStats (used in exported struct fields),
IssueConversion (exported function return type), PriorityMapping, StatusMapping
(referenced in external tests), Label/Project/Namespace/IssueLink (types with
substring complexity in field names).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 17:53:51 -08:00
Ramos
745002eeac fix(gitlab): P2 - fix error handling and type safety
- Fix swallowed json.Marshal error during retry (client.go line 114)
  Now logs the error and continues to next retry attempt instead of
  silently ignoring with _.

- Add GetIssue() helper to IssueConversion for type-safe access
  Returns *types.Issue from interface{} field, nil if wrong type.
  Avoids import cycle by keeping interface{} but providing safe accessor.

- Eliminate duplicate mapping definitions between types.go and mapping.go
  Export PriorityMapping, StatusMapping, TypeMapping from types.go as
  single source of truth. DefaultMappingConfig now uses these exports.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-01-31 00:01:47 -08:00
Ramos
e8dd9b412d Implement GitLab to beads mapping (Issue #6)
Add bidirectional mapping between GitLab issues and beads issues:
- MappingConfig for configurable field mappings (priority, status, type, relations)
- GitLabIssueToBeads for import/pull operations
- BeadsIssueToGitLabFields for export/push operations
- IssueLinksToDependencies for dependency conversion
- Support for scoped labels (priority::*, status::*, type::*)
- FilterNonScopedLabels to preserve custom labels

All 11 mapping tests passing (30 total in gitlab package).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-01-31 00:01:43 -08:00