Skip to content

feat(data-machine-business): GitHub files fetch handler - #4087

Merged
chubes4 merged 4 commits into
mainfrom
feat/data-machine-github
Nov 28, 2026
Merged

chubes4 merged 4 commits into
mainfrom
feat/data-machine-github

Conversation

@chubes4

@chubes4 chubes4 commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Closes #4079.

Changes

  • New github fetch handler in data-machine-business, files data source. It is registered as the github provider module, next to Slack and Discord, and is made of:
    • GitHubClient, built on core's HTTP client
    • an optional token auth provider (github). Public repos work without a token.
    • GitHubFetch and its settings: repo, branch, file_path, file_pattern, max_file_size
  • No download for unchanged files. The tree's blob SHA is checked before downloading, so unchanged files are skipped.
  • Removal tracking. Changes are tracked through TrackedItems and each item carries github_change = added, modified or removed. The first run emits no removals.
  • Missing path fails loudly. A file_path that is missing from the tree fails the step, instead of reporting success with 0 items.

Placement

This was first a standalone data-machine-github plugin, because it revives the handler from the archived data-machine-code. GitHub is a third-party integration like the others in business, so it moved here. There is no new plugin, workflow, release series or boundary entry.

Tests

  • tests/github-files-smoke.php: behavior with stubbed core database classes. It runs as plain PHP in the new Unit (standalone PHP) job, because inside WordPress it would redeclare core functions.
  • tests/github-handler-contract-smoke.php: runs in WordPress. It loads the real core and checks the core APIs the handler depends on.
  • provider-bootstrap-smoke now expects the github module.

The first consumer is chubes4/docsync#60.

Built with AI assistance (chubes-bot).

The stub-based files test redeclares WordPress functions, so it runs as
plain PHP in its own job. A new contract smoke test runs in WordPress
and checks the core APIs the handler depends on.
…usiness

GitHub is a third-party integration like Slack, Discord and Google
Sheets, so it ships as a data-machine-business provider module instead of
its own plugin. Same code under DataMachineBusiness\, registered as the
'github' provider; the standalone plugin, workflow and boundary entry are
removed.
@chubes4 chubes4 changed the title feat(data-machine-github): add repository file fetch handler feat(data-machine-business): GitHub files fetch handler Nov 28, 2026
@chubes4
chubes4 merged commit 2385d2e into main Nov 28, 2026
7 checks passed
@chubes4
chubes4 deleted the feat/data-machine-github branch November 28, 2026 16:01
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.

Revive the GitHub fetch handler as plugins/data-machine-github (files source first)

1 participant