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
4 changes: 2 additions & 2 deletions docs/examples/configuration-sources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ for pull-request documentation review, issue feedback, and release project
review. Copy the contents of one directory into the root of a consumer
repository; in particular, retain its `.github/` path. All wrappers call their
reusable workflows at commit
`72177b0f334301559f866f19baca2e0204104121`.
`67039ac7f3157d0986952a5cb2c087827f5a9e1f`.

| Directory | `configuration_source` | Additional files to copy | Use case |
| --- | --- | --- | --- |
Expand Down Expand Up @@ -52,7 +52,7 @@ workflow `uses:` SHA. The `release-project-review-self.yml` and
`external-release-project-review.yml` workflow pins must point to a reviewed
release commit containing
`.github/workflows/opencode-release-project-review.yml`. The release-review
wrappers are pinned to `72177b0f334301559f866f19baca2e0204104121`, which
wrappers are pinned to `67039ac7f3157d0986952a5cb2c087827f5a9e1f`, which
contains that workflow and accepts an explicitly supplied `target_repository`.
When updating the pin, use a reviewed commit that retains that reusable-call
schema.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
review:
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
pull-requests: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
needs.find-scheduled-release.outputs.release_id != ''
)
needs: [find-scheduled-release, find-dispatch-release]
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
issues: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
feedback:
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
issues: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
release-review:
# The pin below must point to a reviewed release commit that contains both
# the reusable workflow and the supplied release-project-review profile.
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
issues: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ permissions:

jobs:
review:
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
pull-requests: write
with:
configuration_source: default
configuration_ref: 72177b0f334301559f866f19baca2e0204104121
configuration_ref: 67039ac7f3157d0986952a5cb2c087827f5a9e1f
configuration_profile: documentation-review
focus: documentation
max_comments: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ jobs:
needs.find-scheduled-release.outputs.release_id != ''
)
needs: [find-scheduled-release, find-dispatch-release]
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
issues: write
with:
target_repository: ${{ inputs.target_repository || 'OWNER/REPOSITORY' }}
release_id: ${{ inputs.release_id || needs.find-dispatch-release.outputs.release_id || needs.find-scheduled-release.outputs.release_id }}
configuration_source: default
configuration_ref: 72177b0f334301559f866f19baca2e0204104121
configuration_ref: 67039ac7f3157d0986952a5cb2c087827f5a9e1f
configuration_profile: release-project-review
validate_only: true
secrets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ permissions:

jobs:
feedback:
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
issues: write
with:
configuration_source: default
configuration_ref: 72177b0f334301559f866f19baca2e0204104121
configuration_ref: 67039ac7f3157d0986952a5cb2c087827f5a9e1f
configuration_profile: issue-feedback
focus: general
max_issues: 20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
release-review:
# The pin below must point to a reviewed release commit that contains both
# the reusable workflow and the supplied release-project-review profile.
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
issues: write
Expand All @@ -21,7 +21,7 @@ jobs:
release_id: ${{ github.event.release.id }}
configuration_source: default
# configuration_ref must be the same reviewed commit SHA as `uses:` above.
configuration_ref: 72177b0f334301559f866f19baca2e0204104121
configuration_ref: 67039ac7f3157d0986952a5cb2c087827f5a9e1f
configuration_profile: release-project-review
validate_only: true
secrets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
review:
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
pull-requests: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
needs.find-scheduled-release.outputs.release_id != ''
)
needs: [find-scheduled-release, find-dispatch-release]
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
issues: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
feedback:
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
issues: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
release-review:
# The pin below must point to a reviewed release commit containing the
# reusable workflow.
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121
uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f
permissions:
contents: read
issues: write
Expand Down
6 changes: 4 additions & 2 deletions scripts/run_agentic_release_project_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,13 @@ def run_release_preflight(
check=False,
)
output = (completed.stdout + completed.stderr).strip()
output = output[:MAX_PREFLIGHT_OUTPUT_BYTES]
# Test runners usually report the actionable failure summary last.
# Preserve that tail rather than the beginning of verbose output.
output = output[-MAX_PREFLIGHT_OUTPUT_BYTES:]
status = "passed" if completed.returncode == 0 else f"failed (exit {completed.returncode})"
except subprocess.TimeoutExpired as error:
output = ((error.stdout or "") + (error.stderr or "")).strip()
output = output[:MAX_PREFLIGHT_OUTPUT_BYTES]
output = output[-MAX_PREFLIGHT_OUTPUT_BYTES:]
status = f"timed out after {PREFLIGHT_TIMEOUT_SECONDS}s"
artifact_lines: list[str] = []
for relative_path in PREFLIGHT_OUTPUT_ARTIFACTS.get(command, ()):
Expand Down
12 changes: 12 additions & 0 deletions tests/test_run_agentic_release_project_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,18 @@ def test_preflight_runs_approved_command_without_a_shell(self) -> None:
self.assertEqual(run.call_args.kwargs["cwd"], Path(tmp))
self.assertNotIn("shell", run.call_args.kwargs)

def test_preflight_output_is_limited_to_its_tail(self) -> None:
output = "head-marker\n" + ("middle\n" * RUNNER.MAX_PREFLIGHT_OUTPUT_BYTES) + "tail-marker"
with tempfile.TemporaryDirectory() as tmp:
with mock.patch.object(
RUNNER.subprocess,
"run",
return_value=FakeProc(output, returncode=1),
):
result = RUNNER.run_release_preflight(["python3 -m pytest"], Path(tmp))
self.assertIn("tail-marker", result)
self.assertNotIn("head-marker", result)

def test_preflight_rejects_unapproved_command(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
with self.assertRaises(RUNNER.ReleaseReviewError):
Expand Down
Loading