You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(gh): synchronize issue status when work starts - #2617
move a linked Project item to In Progress before the issue-start handoff
preserve the handoff with a visible warning when the issue has no linked Project, with explicit --no-project, --project, --project-owner, and --allow-cross-repo controls
fail closed when an available Project transition or exact readback fails
avoid Project field mutations when the requested values are already current
document and test the lifecycle transition, fallback behavior, and shell completions
targeted GitHub command, Project metadata, and completion tests passed
git diff --check and ShellCheck passed
Docs Impact
Updated the command reference, GitHub workflow guide, GitHub-command README, and completions for the verified lifecycle transition and explicit Project-independent handoff behavior.
Review follow-up
Addresses the review feedback on no-linked-Project compatibility, shared warning handling, and no-op Project mutations. This PR is intentionally left open for review.
Confirmed regression — issue start now hard-fails for repos without a linked Project (cli/bash/commands/basectl/subcommands/gh.sh, base_gh_set_issue_in_progress ~line 911, called from gh_issue.sh ~line 491): the new Project-status sync hardcodes the repo-derived Project title/owner with no --allow-cross-repo/--no-project escape hatch, and aborts the whole command (no branch/worktree output) if the Project call fails. Verified: basectl gh issue start <n> -R upstream/base (a supported, tested repo-flag pattern per the existing bats test "basectl gh issue start honors an explicit upstream repository") will hit project_issue_fields_command.py's ProjectError/ProjectUsageError ("Project '...' is not linked to repository '...' ... pass --allow-cross-repo intentionally") for any repo whose Project isn't named/linked exactly as expected, or that has no Project board at all - and issue start now exits non-zero before ever printing the branch/worktree handoff that AGENTS.md's pre-edit workflow gate depends on. Previously issue start had no Project dependency at all. Note: the PR's own new test mock always exits 0 regardless of repo, so this real enforcement path isn't actually exercised by the added test coverage.
Duplicated warn-loop logic (gh.sh): base_gh_apply_project_issue_fields (lines ~900-904) and the new base_gh_set_issue_in_progress block contain the identical "split stderr into lines, warn each one" loop verbatim. A shared helper (e.g. base_gh_log_warn_lines "$output") would replace both with no behavior change.
Unconditional mutation on every call (~line 924): the Status=In Progress GraphQL mutation runs on every issue start invocation with no prior-state check, including when re-running on an issue that's already In Progress (e.g. after recreating a worktree) - a redundant write every time instead of a no-op when the field is already correct.
Finding 1 is the one I'd fix before merge - it changes issue start from Project-independent to Project-required, which is a real behavior change not covered by the new tests.
issue start now preserves the worktree handoff when the issue has no linked Project, with the warning surfaced and Project status: not updated; --no-project is available for an intentional Project-independent start. --project, --project-owner, and --allow-cross-repo cover explicit alternate-Project cases. Other Project/API failures remain fail-closed.
Shared warning-line handling is now used by both Project update paths.
Project field updates now read current values and skip mutations when the requested values are already current.
Added regression coverage, docs, and completion updates.
Validation: full gate passed with 1,825 Python and 1,058 shell tests; targeted GitHub command, Project metadata, and completion tests also passed. Hosted checks are rerunning on the new head.
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
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
In Progressbefore the issue-start handoff--no-project,--project,--project-owner, and--allow-cross-repocontrolsIssue
Closes #2616
Validation
git diff --checkand ShellCheck passedDocs Impact
Updated the command reference, GitHub workflow guide, GitHub-command README, and completions for the verified lifecycle transition and explicit Project-independent handoff behavior.
Review follow-up
Addresses the review feedback on no-linked-Project compatibility, shared warning handling, and no-op Project mutations. This PR is intentionally left open for review.