Skip to content

feat: expose written metadata as write action outputs#3

Open
y-nk wants to merge 5 commits into
mainfrom
feat/write-outputs
Open

feat: expose written metadata as write action outputs#3
y-nk wants to merge 5 commits into
mainfrom
feat/write-outputs

Conversation

@y-nk

@y-nk y-nk commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add data and changed outputs to the write action. data is the stringified value actually persisted (after the shallow merge when merge: "true"), and changed reports whether the PR body was updated.
  • This mirrors how read already exposes result/has-metadata, and is the most reliable way for callers to learn the effective stored value of a merge write without reading the body back.
  • Document the new outputs in the README (Outputs table + updated example).
  • Extend the write self-test workflow to assert both outputs on the replace and merge steps, including that merge.data deep-equals what a subsequent read returns.

Test plan

  • tests-write workflow passes on this PR (asserts seed/merge outputs and the merge→read round-trip).
  • tests-read workflow still passes.

Add `data` (post-merge stringified value) and `changed` (whether the PR
body was updated) outputs to the write action, mirroring how read exposes
its result. Document them in the README and assert them in the write
self-test workflow.
@y-nk y-nk enabled auto-merge (squash) June 22, 2026 09:45
@y-nk y-nk requested a review from ThisIsManta June 22, 2026 09:46
y-nk added 2 commits June 22, 2026 16:50
tests-read and tests-write each do a whole-body read-modify-write on the
same PR description. Running on separate pull_request triggers made them
race and clobber each other's seeded markers. Convert both to reusable
workflow_call workflows and add a tests orchestrator that chains them with
`needs` so they run sequentially.
pulls.update is not immediately consistent, so a pulls.get a couple of
seconds later can hit a stale replica and miss the just-seeded marker.
Sleep 10s before each read-back (and before the merge step, which also
re-reads the body) so the self-tests stop flaking on API propagation lag.
Comment thread write/action.yml Outdated
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.

2 participants