Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/opencode-release-project-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ on:
# repository by the runtime expression below.
default: ''
release_id:
description: Positive GitHub release ID. Exactly one of release_id/release_tag is required.
type: number
description: Positive decimal GitHub release ID. Exactly one of release_id/release_tag is required.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SecondSkoll, “decimal” could be read as allowing fractional values, while the validation accepts only positive integers. Please describe this as a base-10 integer, consistently with the validation comment and configuration reference.

Suggested change
description: Positive decimal GitHub release ID. Exactly one of release_id/release_tag is required.
description: Positive base-10 integer GitHub release ID. Exactly one of release_id/release_tag is required.

# Workflow-job outputs, including IDs returned by `gh api`, are
# strings. Accept that transport representation so dispatch wrappers
# can forward a discovered ID; resolve_invocation.py validates it as a
# positive integer before the release is fetched.
type: string
required: false
default: 0
default: ''
release_tag:
description: Conservative release tag selector. Exactly one of release_id/release_tag is required.
type: string
Expand Down Expand Up @@ -68,10 +72,14 @@ on:
# workflow input default. Callers must explicitly pass their target.
required: true
release_id:
description: Positive GitHub release ID. Exactly one of release_id/release_tag is required.
type: number
description: Positive decimal GitHub release ID. Exactly one of release_id/release_tag is required.
# Workflow-job outputs, including IDs returned by `gh api`, are
# strings. Accept that transport representation so dispatch wrappers
# can forward a discovered ID; resolve_invocation.py validates it as a
# positive integer before the release is fetched.
type: string
required: false
default: 0
default: ''
release_tag:
description: Conservative release tag selector. Exactly one of release_id/release_tag is required.
type: string
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Fields not applicable to the selected workflow are rejected.
| `pull_number` | number | PR review | `0` | Optional positive PR number when no pull-request event provides the target, such as a wrapper invoked with `workflow_call`. |
| `issue_number` | number | Issue feedback | `0` | Optional positive issue number when no issue event provides the target. |
| `target_repository` | string | Release project review | `${{ github.repository }}` | Strict canonical `owner/repo` of the release to review. Rejects URLs, `owner/repo@ref`/`owner/repo:ref` syntax, paths, and expressions. |
| `release_id` | number | Release project review | `0` | Positive GitHub release ID. Exactly one of `release_id`/`release_tag` is required. |
| `release_id` | string | Release project review | Empty | Positive decimal GitHub release ID. The reusable workflow accepts a string because workflow-job outputs are strings; it validates the value as a positive integer. Exactly one of `release_id`/`release_tag` is required. |
| `release_tag` | string | Release project review | Empty | Conservative tag selector (`[A-Za-z0-9._-]{1,128}`, no `..`). Resolved through the GitHub REST API; never used as a Git ref. Exactly one of `release_id`/`release_tag` is required. |
| `release_target_token` | secret | Release project review | Optional | Target-scoped GitHub token (`contents: read`, `issues: write` on the target only) for cross-repository reviews. Falls back to `github.token` for same-repo runs. |

Expand Down
6 changes: 6 additions & 0 deletions tests/test_run_agentic_release_project_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,12 @@ def test_release_workflow_yaml_parses_and_uses_pinned_actions(self) -> None:
target_input = triggers["workflow_call"]["inputs"]["target_repository"]
self.assertTrue(target_input["required"])
self.assertNotIn("default", target_input)
# Job outputs are strings, so reusable wrappers that discover a
# release through the API can forward the output without GitHub's
# number-input schema rejecting it during workflow evaluation.
release_id_input = triggers["workflow_call"]["inputs"]["release_id"]
self.assertEqual(release_id_input["type"], "string")
self.assertEqual(release_id_input["default"], "")
# validate_only exits before resolve-only fetch and both checkouts.
self.assertIn("steps.resolve.outputs.validate_only != 'true'", text)
self.assertIn("steps.resolve.outputs.validate_only == 'true'", text)
Expand Down
Loading