GitHub sync
Read or synchronize bounded GitHub issues, threads, and pull requests through the GitHub connector, with scoped authority and readback.
You’re reading version sha-eecf0dfcdeaf. Go to the current version
Overview
Define one bounded synchronization between local Runx state and a GitHub repository. The skill makes direction, resource set, filters, content identity, scope, cursor, and authority posture explicit before the selected GitHub instance is allowed to read or mutate GitHub.
The default github runner performs the requested pull or push. plan
is the explicit no-effect runner; pull and push remain explicit execution
lanes for compatible callers. Pulls are bounded reads. A push carries one to
eight typed mutations that one GitHub operation applies, and returns each
item's outcome. It closes only on an independent GitHub readback of every
applied item. An item whose outcome is unknown holds the push for
reconciliation and is never silently retried. No GitHub token enters this
package.
In the manual
Runners
commentgithubplanplan_and_append_cursorpullpush
Declared by its execution profile. Read the profile
SKILL.md
GitHub
Define one bounded synchronization between local Runx state and a GitHub repository. The skill makes direction, resource set, filters, content identity, scope, cursor, and authority posture explicit before the selected GitHub instance is allowed to read or mutate GitHub.
The default github runner performs the requested pull or push. plan
is the explicit no-effect runner; pull and push remain explicit execution
lanes for compatible callers. Pulls are bounded reads. A push carries one to
eight typed mutations that one GitHub operation applies, and returns each
item's outcome. It closes only on an independent GitHub readback of every
applied item. An item whose outcome is unknown holds the push for
reconciliation and is never silently retried. No GitHub token enters this
package.
When to use it
Use github when an operator needs a reproducible pull or push contract for
issues, pull requests, or threads, especially when cursor state must survive
across runs. Use plan only when the requested outcome is a plan. Use pull
for an explicitly selected read lane. Use push for already-decided issue,
pull-request, or comment changes of one kind. Batches are bounded and
best-effort, not atomic: a refused item does not stop the rest, the result
identifies each item, and the operator reconciles before retrying. Use github-issue-triage to decide what an issue means
and github-issue-to-pr to govern an implementation lane.
Do not use a plan as evidence that remote state was read or changed. Only the
native runx.provider.operation.v1 result from pull or push is provider
evidence. Do not silently turn a denied push into a pull.
How it works
- Validate the exact
owner/namerepository, direction, resource kind, bounded filters, maximum result count, and requested scope. - A
pullplan requires read scope and records the exact resources a provider may fetch. - A
pushplan requires write scope and one to eight typed mutations that one GitHub operation applies:issues.create,issues.update,pullrequests.update,comments.create, orcomments.update. It rejects unknown fields, oversized content, and mixed kinds, then returnsready_for_execution; planning itself does not grant provider authority. - Optional
plan_and_append_cursorcalls the store'sevents.appendandprojection.readto append the bounded plan and read the projection back. That proves local cursor persistence, not GitHub synchronization; this package does not own a second cursor database or storage adapter. - The default runner selects the same bounded read or write path from the
validated direction.
pullcalls the planned read (issues.list,issues.read,pullrequests.list,pullrequests.read, orcomments.list) withrepo.read.pushcalls the planned write once underrepo.write: the runtime sends each item, records each outcome, and reads every applied item back before the push closes. Both run under the GitHub instance selected here: the signed-inghsession or a stored token.
Inputs and result
repois exactlyowner/name.directionispullorpush.resourcescontains the issue, PR, thread, orbatchselector and a limit no greater than 100. A push has one to eightmutationsentries withref,op, and an exact typedpayload. Issue and PR changes useop: update; a new issue usesref: issuesandop: create; new thread comments useop: comment. Bodies are capped at 65,536 characters. Pulls return GitHub's records whole.scopeis the requested read or write scope.
The runx.github_sync.v1 plan records exact direction, provider operation,
scope, filters, blockers, authority posture, cursor state when used, and the
explicit absence of remote effects. Execution additionally emits the native
provider-operation packet; it does not rewrite the planning packet to imply a
remote effect.
Stop conditions
- Refuse malformed repositories, unknown resource kinds, unbounded selectors, limits above the contract, more than eight mutations, unknown mutation fields, or content beyond the declared bounds.
- Refuse push when write scope is missing; do not degrade silently.
- Do not treat local cursor persistence as remote provider readback.
- Refuse a push that mixes new issues, issue, pull-request, and comment changes; send each kind as its own push.
- Refuse when no GitHub instance is selected, or the selected one lacks the scope. Never treat an available instance as evidence of the intended repository.
- Do not claim comments, labels, issues, or PRs were read or changed until the native provider operation proves the expected access, operation, and readback.
Example
A caller wants to pull the next 50 open issues after cursor 2. Planning can
persist that cursor locally; pull then performs issues.list through the
selected instance and returns the provider result. To close issue 241, a push
carries ref: issues/241, op: update, and
payload: {state: closed, state_reason: completed}. Runx applies only that
issue update through issues.update under repo.write, and reads issue 241
back.
Published execution profile
The execution profile published with sha-eecf0dfcdeaf, shown as its exact bytes.
| Runners |
|
|---|---|
| Profile digest | sha256:283a1a1b6d0eabcd1f9a455944a7f7d9e72a14700d2af92d28171a5681a234ef |
skill: github
version: "0.5.12"
catalog:
kind: skill
audience: public
visibility: public
role: canonical
provider: github
execution: execute
completion: provider_readback
approval: none
category: ops
harness:
files:
- fixtures/bin/gh
- fixtures/support/composed.graph
cases: []
input_definitions:
repository:
type: string
required: true
description: Target GitHub repository as owner/name.
schema:
pattern: '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$'
examples: [runxhq/runx]
direction:
type: string
required: true
description: Synchronization direction.
schema:
enum: [pull, push]
scope:
type: string
required: true
description: Requested repository access.
schema:
enum: [read, write]
resources:
type: object
required: true
description: Bounded issue, pull-request, or thread selector with up to eight typed mutations.
schema:
required: [kind]
additionalProperties: false
properties:
kind:
type: string
enum: [issues, prs, threads, batch]
filters: {}
refs: {}
mutations: {}
allOf:
- if:
properties: { kind: { const: issues } }
required: [kind]
then:
properties:
filters:
type: object
additionalProperties: false
properties:
state: { type: string, enum: [open, closed, all] }
labels:
type: array
maxItems: 100
uniqueItems: true
items: { type: string, minLength: 1, maxLength: 100, pattern: '^[^\u0000]+$' }
since: { type: string, minLength: 1, maxLength: 64 }
limit: { type: integer, minimum: 1, maximum: 100, default: 30 }
cursor: { type: string, pattern: '^[1-9][0-9]{0,4}$', description: GitHub page number a listing continues from. }
refs:
type: array
maxItems: 100
uniqueItems: true
items: { type: string, pattern: '^issues/[1-9][0-9]*$' }
mutations:
type: array
maxItems: 8
items:
oneOf:
- type: object
required: [ref, op, payload]
additionalProperties: false
properties:
ref: { type: string, pattern: '^issues/[1-9][0-9]*$' }
op: { const: update }
payload:
type: object
minProperties: 1
additionalProperties: false
properties:
title: { type: string, minLength: 1, maxLength: 256, pattern: '^[^\u0000]+$' }
body: { type: string, maxLength: 65536, pattern: '^[^\u0000]*$' }
state: { type: string, enum: [open, closed] }
state_reason: { type: string, enum: [completed, not_planned, reopened] }
labels:
type: array
maxItems: 100
uniqueItems: true
items: { type: string, minLength: 1, maxLength: 100, pattern: '^[^\u0000]+$' }
assignees:
type: array
maxItems: 20
uniqueItems: true
items: { type: string, minLength: 1, maxLength: 100, pattern: '^[^\u0000]+$' }
milestone:
type: [integer, 'null']
minimum: 1
- type: object
required: [ref, op, payload]
additionalProperties: false
properties:
ref: { const: issues }
op: { const: create }
payload:
type: object
required: [title]
additionalProperties: false
properties:
title: { type: string, minLength: 1, maxLength: 256, pattern: '^[^\u0000]+$' }
body: { type: string, maxLength: 65536, pattern: '^[^\u0000]*$' }
labels:
type: array
maxItems: 100
uniqueItems: true
items: { type: string, minLength: 1, maxLength: 100, pattern: '^[^\u0000]+$' }
assignees:
type: array
maxItems: 10
uniqueItems: true
items: { type: string, minLength: 1, maxLength: 100, pattern: '^[^\u0000]+$' }
milestone: { type: integer, minimum: 1 }
- if:
properties: { kind: { const: prs } }
required: [kind]
then:
properties:
filters:
type: object
additionalProperties: false
properties:
state: { type: string, enum: [open, closed, all] }
base: { type: string, minLength: 1, maxLength: 255, pattern: '^[A-Za-z0-9._/-]+$' }
head: { type: string, minLength: 1, maxLength: 255, pattern: '^[A-Za-z0-9._:/-]+$' }
sort: { type: string, enum: [created, updated, popularity, long-running] }
direction: { type: string, enum: [asc, desc] }
limit: { type: integer, minimum: 1, maximum: 100, default: 30 }
cursor: { type: string, pattern: '^[1-9][0-9]{0,4}$', description: GitHub page number a listing continues from. }
refs:
type: array
maxItems: 100
uniqueItems: true
items: { type: string, pattern: '^pulls/[1-9][0-9]*$' }
mutations:
type: array
maxItems: 8
items:
type: object
required: [ref, op, payload]
additionalProperties: false
properties:
ref: { type: string, pattern: '^pulls/[1-9][0-9]*$' }
op: { const: update }
payload:
type: object
minProperties: 1
additionalProperties: false
properties:
title: { type: string, minLength: 1, maxLength: 256, pattern: '^[^\u0000]+$' }
body: { type: string, maxLength: 65536, pattern: '^[^\u0000]*$' }
state: { type: string, enum: [open, closed] }
base: { type: string, minLength: 1, maxLength: 255, pattern: '^[A-Za-z0-9._/-]+$' }
maintainer_can_modify: { type: boolean }
- if:
properties: { kind: { const: threads } }
required: [kind]
then:
properties:
filters:
type: object
additionalProperties: false
properties:
thread_ref: { type: string, pattern: '^(issues|pulls)/[1-9][0-9]*/comments$' }
limit: { type: integer, minimum: 1, maximum: 100, default: 30 }
refs:
type: array
maxItems: 100
uniqueItems: true
items: { type: string, pattern: '^(issues|pulls)/[1-9][0-9]*/comments$' }
mutations:
type: array
maxItems: 8
items:
oneOf:
- type: object
required: [ref, op, payload]
additionalProperties: false
properties:
ref: { type: string, pattern: '^(issues|pulls)/[1-9][0-9]*/comments$' }
op: { const: comment }
payload:
type: object
required: [body]
additionalProperties: false
properties:
body: { type: string, minLength: 1, maxLength: 65536, pattern: '^[^\u0000]+$' }
- if:
properties: { kind: { const: batch } }
required: [kind]
then:
properties:
mutations:
type: array
minItems: 1
maxItems: 8
items:
oneOf:
- type: object
required: [ref, op, payload]
additionalProperties: false
properties:
ref: { type: string, pattern: '^issues/[1-9][0-9]*$' }
op: { const: update }
payload:
type: object
minProperties: 1
additionalProperties: false
properties:
title: { type: string, minLength: 1, maxLength: 256, pattern: '^[^\u0000]+$' }
body: { type: string, maxLength: 65536, pattern: '^[^\u0000]*$' }
state: { type: string, enum: [open, closed] }
state_reason: { type: string, enum: [completed, not_planned, reopened] }
labels:
type: array
maxItems: 100
uniqueItems: true
items: { type: string, minLength: 1, maxLength: 100, pattern: '^[^\u0000]+$' }
assignees:
type: array
maxItems: 20
uniqueItems: true
items: { type: string, minLength: 1, maxLength: 100, pattern: '^[^\u0000]+$' }
milestone:
type: [integer, 'null']
minimum: 1
- type: object
required: [ref, op, payload]
additionalProperties: false
properties:
ref: { const: issues }
op: { const: create }
payload:
type: object
required: [title]
additionalProperties: false
properties:
title: { type: string, minLength: 1, maxLength: 256, pattern: '^[^\u0000]+$' }
body: { type: string, maxLength: 65536, pattern: '^[^\u0000]*$' }
labels:
type: array
maxItems: 100
uniqueItems: true
items: { type: string, minLength: 1, maxLength: 100, pattern: '^[^\u0000]+$' }
assignees:
type: array
maxItems: 10
uniqueItems: true
items: { type: string, minLength: 1, maxLength: 100, pattern: '^[^\u0000]+$' }
milestone: { type: integer, minimum: 1 }
- type: object
required: [ref, op, payload]
additionalProperties: false
properties:
ref: { type: string, pattern: '^pulls/[1-9][0-9]*$' }
op: { const: update }
payload:
type: object
minProperties: 1
additionalProperties: false
properties:
title: { type: string, minLength: 1, maxLength: 256, pattern: '^[^\u0000]+$' }
body: { type: string, maxLength: 65536, pattern: '^[^\u0000]*$' }
state: { type: string, enum: [open, closed] }
base: { type: string, minLength: 1, maxLength: 255, pattern: '^[A-Za-z0-9._/-]+$' }
maintainer_can_modify: { type: boolean }
- type: object
required: [ref, op, payload]
additionalProperties: false
properties:
ref: { type: string, pattern: '^(issues|pulls)/[1-9][0-9]*/comments$' }
op: { const: comment }
payload:
type: object
required: [body]
additionalProperties: false
properties:
body: { type: string, minLength: 1, maxLength: 65536, pattern: '^[^\u0000]+$' }
- type: object
required: [ref, op, payload]
additionalProperties: false
properties:
ref: { type: string, pattern: '^issues/comments/[1-9][0-9]*$' }
op: { const: update }
payload:
type: object
required: [body]
additionalProperties: false
properties:
body: { type: string, minLength: 1, maxLength: 65536, pattern: '^[^\u0000]+$' }
connectors:
store:
operations: [events.append, projection.read]
github:
operations: [issues.read, issues.list, pullrequests.read, pullrequests.list, comments.list, issues.create, issues.update, pullrequests.update, comments.create, comments.update]
runners:
github:
default: true
inputs:
repo: { definition: repository }
direction: { definition: direction }
resources: { definition: resources }
scope: { definition: scope }
idempotency_key:
type: string
required: false
description: Stable retry key required for push and ignored for pull.
examples:
- repo: runxhq/runx
direction: pull
resources: { kind: issues, filters: { state: open, labels: [triage], limit: 25 } }
scope: read
result_from: [pull, push, plan]
steps:
- id: plan
inputs:
repo: $input.repo
direction: $input.direction
resources: $input.resources
scope: $input.scope
tool: { module: github.mjs }
outputs:
sync_plan: object
artifacts:
named_emits:
sync_plan: sync_plan
packets:
sync_plan: runx.github_sync.v1
- id: pull
when:
value: $steps.plan.sync_plan.decision
equals: ready
operation: github
operation_name: $steps.plan.sync_plan.provider_operation
input: $steps.plan.sync_plan.provider_input
- id: push
when:
value: $steps.plan.sync_plan.decision
equals: ready_for_execution
skill: .
runner: push
inputs:
repo: $input.repo
resources: $input.resources
idempotency_key: $input.idempotency_key
plan:
inputs:
repo: { definition: repository }
direction: { definition: direction }
resources: { definition: resources }
scope: { definition: scope }
examples:
- repo: runxhq/runx
direction: pull
resources: { kind: issues, filters: { state: open, labels: [triage], limit: 25 } }
scope: read
steps:
- id: plan
tool: { module: github.mjs }
inputs:
repo: $input.repo
direction: $input.direction
resources: $input.resources
scope: $input.scope
outputs:
sync_plan: object
artifacts:
named_emits:
sync_plan: sync_plan
packets:
sync_plan: runx.github_sync.v1
pull:
inputs:
repo: { definition: repository }
resources: { definition: resources }
examples:
- repo: runxhq/runx
resources: { kind: issues, filters: { state: open, limit: 25 } }
result_from: [pull]
steps:
- id: plan
inputs:
repo: $input.repo
direction: pull
resources: $input.resources
scope: read
tool: { module: github.mjs }
outputs:
sync_plan: object
artifacts:
named_emits:
sync_plan: sync_plan
packets:
sync_plan: runx.github_sync.v1
- id: pull
when:
value: $steps.plan.sync_plan.decision
equals: ready
operation: github
operation_name: $steps.plan.sync_plan.provider_operation
input: $steps.plan.sync_plan.provider_input
push:
inputs:
repo: { definition: repository }
resources: { definition: resources }
idempotency_key:
type: string
required: true
description: Stable retry key for this exact mutation.
examples:
- repo: runxhq/runx
resources:
kind: issues
mutations:
- { ref: issues/241, op: update, payload: { labels: [triage] } }
idempotency_key: runxhq/runx:issues/241:labels:triage
result_from: [apply]
steps:
- id: plan
inputs:
repo: $input.repo
direction: push
resources: $input.resources
scope: write
tool: { module: github.mjs }
outputs:
sync_plan: object
artifacts:
named_emits:
sync_plan: sync_plan
packets:
sync_plan: runx.github_sync.v1
- id: apply
when:
value: $steps.plan.sync_plan.decision
equals: ready_for_execution
operation: github
idempotency_key: $input.idempotency_key
operation_name: $steps.plan.sync_plan.provider_operation
input: $steps.plan.sync_plan.provider_input
plan_and_append_cursor:
inputs:
data_source_ref:
type: string
required: true
description: Logical data source for cursor events.
resource:
type: string
required: true
description: Declared cursor event resource.
aggregate_id:
type: string
required: true
description: Cursor stream key.
expected_version:
type: number
required: true
description: Current cursor stream version.
idempotency_key:
type: string
required: true
description: Stable retry key.
repo: { definition: repository }
direction: { definition: direction }
resources: { definition: resources }
scope: { definition: scope }
examples:
- data_source_ref: tenant://github/sqlite-cursors
resource: github_sync_events
aggregate_id: runxhq/runx:triage-open
expected_version: 0
idempotency_key: runxhq/runx:triage-open:pull:v2
repo: runxhq/runx
direction: pull
resources: { kind: issues, filters: { state: open, labels: [triage], limit: 25 } }
scope: read
result_from: [readback]
steps:
- id: read-cursor
operation: store/projection.read
input:
data_source_ref: $input.data_source_ref
resource: $input.resource
aggregate_id: $input.aggregate_id
- id: plan
inputs:
repo: $input.repo
direction: $input.direction
resources: $input.resources
scope: $input.scope
tool: { module: github.mjs }
outputs:
sync_plan: object
artifacts:
named_emits:
sync_plan: sync_plan
packets:
sync_plan: runx.github_sync.v1
- id: append-cursor-event
operation: store/events.append
idempotency_key: $input.idempotency_key
input:
data_source_ref: $input.data_source_ref
resource: $input.resource
aggregate_id: $input.aggregate_id
expected_version: $input.expected_version
event: $steps.plan.sync_plan
- id: readback
operation: store/projection.read
input:
data_source_ref: $input.data_source_ref
resource: $input.resource
aggregate_id: $input.aggregate_id
comment:
inputs:
repository:
type: string
required: true
description: Exact GitHub repository slug as owner/name.
schema: { pattern: '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$', maxLength: 201 }
pr_number:
type: string
required: true
description: Positive decimal pull-request number.
schema: { pattern: '^[1-9][0-9]*$', maxLength: 20 }
body:
type: string
required: true
description: Exact review note body bound into approval and provider readback.
schema: { minLength: 1, maxLength: 65536 }
idempotency_key:
type: string
required: true
description: Stable retry key for this exact repository, pull request, and body.
schema: { minLength: 8, maxLength: 256, pattern: '^[A-Za-z0-9._:-]+$' }
examples:
- repository: runxhq/runx
pr_number: "42"
body: The reviewed path is sound; please add the missing harness case.
idempotency_key: runxhq-runx-pr-42-connect-note-v1
result_from: [post-comment]
steps:
- id: post-comment
operation: github/comments.create
idempotency_key: $input.idempotency_key
input:
repository: $input.repository
comments:
- number: $input.pr_number
body: $input.body
Published package and test evidence.
This exact version passed its recorded harness run: 20 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | sha-eecf0dfcdeaf |
| Recorded result | 20 checks passed · 0 failed |
| Result source | Reported by the publisher (runx_registry_publish) |
| Suite | runx-harness |
| Test recorded | |
| Test record | Open the recorded run |
Inspect receipt references
sha256:47800174048f3ead5b7d8d7854d47e8a0b1ad73cd33b4ce49c685767c12b370asha256:ed919cbfdc843f77caa6dff8e88f279e87e847b128ff02fafca60d8f5310c171sha256:ba1ef20ec21cb11a31fab96ba27f2d93b4021eedc03f686cc371cbbc8e3c4937sha256:420731bf265988027aaac79f211127ff81cb11a8d709f9d1bd7e9dcef089c507sha256:16160650ae34b9fdf6b7f674f68c0dadcd770954f3abc7f79b7f65daba863c70sha256:7b35b71947b68f4f2c2ac497f4bbf4282780555cfd81c80d6bd957d2ad002bfasha256:412e7034fa79d116def6575c53a4eedf853b9fc6030234427a7e16a00bcf7001sha256:c8525d6f8c8dd5352c06589c787e5d1e90a1bc1b301a7feb324081ab513c8073sha256:82eaea33b6a5022614ab25bcfdd721b7ddf586422f5e236c6fa9c6ba5ba78711sha256:f13c8e779b3fece2caf4e09286084ed874e7cf82902d8ff2aded2d116209cb0fsha256:2628c4fe52eaaa3c0afff6f9ff1d674ce7128dbc1a2a122cff4c09d2b76a4028sha256:ad9aace59681e8c5207fd23c36e2edca05670180fad5be40f0161c9369c40188sha256:aa358be08012062906e18975e97c26ddcd796fd3c69570a05915bff3ed1de331sha256:decf04ec5f2f3944b639506617135784ec16b82584a42724f8aaf3d39b2da577sha256:48ea449e0cbba7e23b20e0cf4cddfdd0db0624912418aa1d5d9786d14008c580sha256:b1bf2f708ac0c1dec373508b064574e1bbed25e4076fd552f0d7b74fde9fb2a9sha256:a3909761edeb0eb4afe5c7eba1ba76676755cbcb34eeafd69faa9114a821d05dsha256:f86681406a29329061e54b9b23e43aa57ed444b4f20cc573e9845d3bb1e87634sha256:b63aaa4afef5ca1786f9d28f1ef4a1e562eaf5717b5bde817560cc63a3f468b5sha256:1d84f77c3712e19511edae00e13715681a313dec9065a35758288fde7d9cad16Package identity
| Published revision | sha-eecf0dfcdeaf |
|---|---|
| Content digest | sha256:eecf0dfcdeafbfb46626b6e34c697fccada465b69b5464374fb5b4c7e99dfbb0 |
| SKILL.md digest | sha256:90bb41315945c2fc661ffa3fbd811f2ff03d1481bf1ac07570221563cefc4f67 |
| Execution profile digest | sha256:283a1a1b6d0eabcd1f9a455944a7f7d9e72a14700d2af92d28171a5681a234ef |
| Publisher identity | Verified publisher · runx |
| Trust tier | Verified publisherRunx has verified this publisher. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
0.6.3Content digest sha256:f929e5f7fd0ef75b60a3c094c0031166edc97362969b9406de2db62fb8361ff8sha-ea4b1382668cContent digest sha256:ea4b1382668c736557a5b48c3208060fdaafc38bc8b9b38ca613489394d0b63dsha-f0e2ca967ae7Content digest sha256:f0e2ca967ae7e580b19efe1c65e752442be67654a5f71fd454d50d4eb4a8fbb5sha-eecf0dfcdeafViewingContent digest sha256:eecf0dfcdeafbfb46626b6e34c697fccada465b69b5464374fb5b4c7e99dfbb0