Skip to content

Prefrontal-cortex sync - track commits to PushState #5

@jordanpartridge

Description

@jordanpartridge

Overview

Sync commit events with prefrontal-cortex for tracking push history.

Events to Track

  • Commit created
  • Commit amended
  • Commit reverted
  • Push to remote

API Integration

// After successful commit
$client->post('/api/push/sync', [
    'repo' => $this->getRepo(),
    'sha' => $newSha,
    'message' => $message,
    'author' => $author,
    'files_changed' => $filesChanged,
    'insertions' => $insertions,
    'deletions' => $deletions,
    'branch' => $branch,
]);

Commands

commit sync                     # Sync recent commits
commit sync --push             # Push to cloud after commit

State Machine (PushState)

Leverages Laravel Verbs state machine:

  • CommitCreated
  • CommitAmended
  • PushCompleted

Auto-sync Option

commit config --auto-sync      # Sync after every commit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions