fix(sync): Add in-progress label and preserve non-dex labels#120
Merged
dcramer merged 5 commits intodcramer:mainfrom Feb 17, 2026
Merged
fix(sync): Add in-progress label and preserve non-dex labels#120dcramer merged 5 commits intodcramer:mainfrom
dcramer merged 5 commits intodcramer:mainfrom
Conversation
Two fixes for GitHub label management: 1. Add dex:in-progress label for started tasks. Previously both "not started" and "in progress" tasks got dex:pending, making them indistinguishable on GitHub. Now buildLabels() checks task.started_at to produce three states: pending, in-progress, completed — matching Shortcut's three-state workflow support. 2. Preserve non-dex labels during sync updates. The GitHub API replaces all labels when updating, so manually-added labels (bug, team:frontend, etc.) were silently destroyed on every sync. Now CachedIssue stores allLabels, and updateIssue() merges non-dex labels back into the update payload. Fixes dcramer#119 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@adnankurt16 is attempting to deploy a commit to the David Cramer's projects Team on Vercel. A member of the Team first needs to authorize it. |
When skipUnchanged is false and no cache exists, fetchIssueState() only retrieved the issue state but not labels. This left nonDexLabels empty, causing non-dex labels to be wiped on update. Replace fetchIssueState() with fetchIssueStateAndLabels() that also extracts non-dex labels from the API response, ensuring they are preserved in all code paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When skipUnchanged is false and a cached issue exists, the code skipped both the skipUnchanged block and the !cached branch, leaving nonDexLabels empty. Add an else branch to extract non-dex labels from cache. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Subtasks with started_at rendered as 🔄 in GitHub issue summary lines, matching the ✅ indicator already used for completed subtasks. Pending subtasks show no indicator. Parsing regex updated to also match 🔄 emoji so in-progress subtasks are correctly parsed from issue body during import and sync. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three fixes to protect non-dex labels from being silently destroyed: 1. getIssueChangeResult() catch: return hasChanges: false instead of true. When the GET fails, skip the update rather than proceeding with empty nonDexLabels that would overwrite user-applied labels. 2. fetchIssueStateAndLabels(): remove swallowing try/catch. This path (skipUnchanged=false) guarantees an update will proceed, so if we can't fetch labels, the error must propagate rather than silently wiping them. 3. updateIssue() nonDexLabels parameter: remove default value (= []) to make it required. Future callers that forget to pass labels get a compile error instead of silent data loss. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Fixes #119
Two fixes for GitHub label management during sync:
1. Add
dex:in-progresslabel for started tasksbuildLabels()only generated two status labels (dex:pending/dex:completed), so started tasks were indistinguishable from not-started ones on GitHub. Now checksisInProgress(task)to produce three states, matching Shortcut's three-state workflow support (PR #105).dex:pendingdex:in-progressdex:completed2. Preserve non-dex labels during sync updates
GitHub's
issues.update()API replaces ALL labels, so manually-added labels (bug,team:frontend, etc.) were silently destroyed on every sync. Now:CachedIssuestoresallLabels(all labels) alongsidelabels(dex-only, for change detection)getIssueChangeResult()extracts non-dex labels from API responseupdateIssue()merges non-dex labels back into the update payloadTest plan
dex:in-progresslabeldex:pendinglabel (notdex:in-progress)syncAll(cached path)syncTask(non-cached path)fetchAllDexIssuesstores both filtered and all labels