Skip to content

Full GitLab parity for ticket comments#123

Merged
ansxuman merged 1 commit into
mainfrom
feat/gitlab-ticket-parity
Jun 21, 2026
Merged

Full GitLab parity for ticket comments#123
ansxuman merged 1 commit into
mainfrom
feat/gitlab-ticket-parity

Conversation

@ansxuman

@ansxuman ansxuman commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Brings GitLab ticket comments to full 2-way sync, matching GitHub (was post-only).

Via glab api issue notes:

  • Fetch real issue comments (skips system notes; original author + timestamp)
  • Edit and Delete comments on the issue
  • Posts/fetches dedupe on note_<id>

Local cards and the coworker AI chat are unchanged.

Note: GitLab paths follow the documented REST API but should get a real-GitLab smoke test before release.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed GitLab ticket comment synchronization to properly fetch and display comments
    • Added support for editing and deleting GitLab ticket comments
    • Unified comment management behavior between GitHub and GitLab providers

Fetch, edit, and delete GitLab issue comments via `glab api` issue notes
(was post-only). Brings GitLab to the same 2-way sync as GitHub:
- fetch: GET projects/<id>/issues/<iid>/notes (skips system notes)
- edit:  PUT  .../notes/<id>
- delete: DELETE .../notes/<id>
external_id stored as note_<id> so posts/fetches dedupe.
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3eb94c1e-f7b9-4c9c-9dfa-0e54ada91549

📥 Commits

Reviewing files that changed from the base of the PR and between df418ee and 535b230.

⛔ Files ignored due to path filters (1)
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • src-tauri/src/modes/workspace/tickets.rs

📝 Walkthrough

Walkthrough

workspace_card_fetch_ticket_comments now builds provider-specific CLI commands for GitLab and routes the output to a new upsert_gitlab_comments function. A gitlab_project_id helper and upsert_gitlab_comments handle JSON parsing, system-note filtering, keyed upsert, and stale-row pruning. run_comment_api is refactored to dispatch edits and deletes to GitLab issue-note endpoints. Post normalization converts printed note URLs to note_<id> keys.

Changes

GitLab ticket-comment 2-way sync

Layer / File(s) Summary
GitLab upsert helpers
src-tauri/src/modes/workspace/tickets.rs
Adds gitlab_project_id and upsert_gitlab_comments: parse notes JSON, skip system notes, upsert rows keyed as note_<id>, and prune stale external-comment rows. Module comment updated.
Fetch routing
src-tauri/src/modes/workspace/tickets.rs
Extends workspace_card_fetch_ticket_comments to build GitLab glab api CLI arguments and route stdout to upsert_gitlab_comments when source is gitlab.
Edit/delete + post normalization
src-tauri/src/modes/workspace/tickets.rs
Refactors run_comment_api to dispatch GitHub edits/deletes to issue-comment endpoints and GitLab to issue-note endpoints (PUT/DELETE). Normalizes posted note URLs to note_<id> keys in workspace_card_post_ticket_comment.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 Hop, hop! GitLab notes now sync with care,
glab api called through the Tauri air.
System notes skipped, real ones stored by key,
note_<id> rows upserted, stale ones set free.
PUT to edit, DELETE to erase—
Two providers sync at a bunny's pace! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing required template sections including Type of Change, Testing, and Checklist, though it does explain what the PR changes. Complete the pull request description by filling in the Type of Change checkbox, describing testing performed, and checking off applicable items in the Checklist section.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: bringing GitLab ticket comments to feature parity with GitHub through full 2-way sync support.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/gitlab-ticket-parity

Comment @coderabbitai help to get the list of available commands and usage tips.

@ansxuman ansxuman self-assigned this Jun 21, 2026
@ansxuman ansxuman merged commit d4e6cad into main Jun 21, 2026
11 checks 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.

1 participant