feat/002_init-remote
Raw Download raw file

tissue start

Start working on an issue - sets status to in-progress and checks out appropriate branch.

Tissue Command

tissue start 42  # Sets status to in-progress, checks out branch

Manual Workflow (bash + git)

Basic start workflow

# Start working on an issue using yq
start_issue() {
    ISSUE_NUM="$1"
    cd ../issues

    PADDED_NUM=$(printf "%03d" "$ISSUE_NUM")
    FILE=$(ls ${PADDED_NUM}_*.md 2>/dev/null | head -1)

    if [ -z "$FILE" ]; then
        echo "Issue #${ISSUE_NUM} not found"
        return 1
    fi

    # Extract title for branch name using yq
    TITLE=$(yq --front-matter '.title // ""' "$FILE")
    SAFE_TITLE=$(echo "$TITLE" | tr '[:upper:]' '[:lower:]' | \
                 tr ' ' '-' | tr -cd '[:alnum:]-' | cut -c1-50)

    # Update status to in-progress and assign if needed
    CURRENT_USER=$(git config user.name)
    CURRENT_ASSIGNEE=$(yq --front-matter '.assignee // null' "$FILE")

    if [ "$CURRENT_ASSIGNEE" = "null" ]; then
        # Assign to current user if unassigned
        yq --front-matter '
            .status = "in-progress" |
            .assignee = "'"$CURRENT_USER"'" |
            .updated = now
        ' -i "$FILE"
    else
        # Just update status
        yq --front-matter '
            .status = "in-progress" |
            .updated = now
        ' -i "$FILE"
    fi

    # Commit status change in issues branch
    git add "$FILE"
    git commit -m "Start issue #${ISSUE_NUM}: ${TITLE}"
    git push

    # Return to main repository
    cd $(git rev-parse --show-toplevel)

    # Create and checkout feature branch
    BRANCH_NAME="issue-${ISSUE_NUM}-${SAFE_TITLE}"
    git checkout -b "$BRANCH_NAME" main

    echo "Started issue #${ISSUE_NUM}"
    echo "Created branch: ${BRANCH_NAME}"
    echo "Status: in-progress"
}

start_issue 42

What tissue does for you:

  1. Automatically updates issue status to in-progress
  2. Creates appropriately named feature branches
  3. Assigns issue to current user if unassigned
  4. Validates prerequisites before starting
  5. Handles branch naming conventions
  6. Adds audit trail comments
  7. Manages git operations seamlessly
  8. Supports different branching strategies
  9. Integrates with time tracking
  10. Links related issues together