Syndication slice 3: Hashnode adapter + operator-config docs - #3
Merged
Merged
Conversation
Adds Hashnode as a second syndication target behind the existing
SyndicationTarget interface — a new adapter, not a redesign. It publishes
with the `publishPost` GraphQL mutation and updates with `updatePost`
against gql.hashnode.com, sends the canonical as `originalArticleURL`, and
formats tags as Hashnode's `{name, slug}` objects. GraphQL replies 200 even
on failure, so the adapter treats a non-2xx *or* an `errors` payload as an
error (with a clear "requires Hashnode Pro" message surfaced through).
Credentials stay server-side env (HASHNODE_TOKEN, HASHNODE_PUBLICATION_ID);
a target missing either shows as "Not configured" and is never called. No
core change, no new capability — it reuses the slice-1/2 Syndicator, table,
capability, admin page and MCP tool.
README gains a Syndication section (both surfaces, the wildcard-immune
capability, and the per-target env table incl. the Hashnode Pro caveat), and
the stale "declares no capability" line is corrected.
Tests: the adapter's create/update request shape, tag objects, the
GraphQL-200-with-errors path, non-2xx, and the not-configured refusal.
Co-Authored-By: Claude Opus 4.8 <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.
Third syndication slice: a Hashnode target, so a published post can be cross-posted to Dev.to and Hashnode from the same admin page and the same MCP tool.
What's here
HashnodeTarget— a new adapter behind the existingSyndicationTargetinterface (a new implementation, not a redesign):publishPostGraphQL mutation to create,updatePostto update (by the stored external id — re-posting updates, never duplicates).originalArticleURL; tags sent as Hashnode's required{name, slug}objects (slug lowercase-hyphenated, at most five).errorspayload — surfacing e.g. "requires Hashnode Pro" verbatim.HASHNODE_TOKEN,HASHNODE_PUBLICATION_ID); missing either → "Not configured", never called.Syndicator,blog_syndication, thenimbuscms.blog:syndicatecapability, the admin page, and the MCP tool.Tests
HashnodeTargetTestcovers the create/update request shape, the tag-object formatting, the GraphQL-200-with-errorspath, a non-2xx, and the not-configured refusal. Local: phpstan level 6 clean, cs-fixer clean, phpunit green (the two MySQL repository tests run against the DB in CI).Next
Slice 4 — Hacker News / Reddit prefilled share links (human clicks, no auto-post), plus the Reddit auto-submit conversation to have there.
🤖 Generated with Claude Code