Conversation
|
/rosetta review this PR please |
Rosetta Triage ReviewSummary: This PR fixes a bug in the Findings:
Suggestions:
Automated triage by Rosetta agent |
|
/rosetta please update PR description |
Rosetta — PR Description UpdatedI've updated the PR description based on the diff analysis. Here's what was added: Summary: Fixes prompt validation failures when triggered outside a PR context (manual dispatch, push events). Problem documented:
Changes documented:
Automated triage by Rosetta agent |
Rosetta Triage ReviewSummary: This PR fixes the Findings:
Suggestions (optional):
Automated triage by Rosetta agent |
Summary
Fixes prompt validation workflow failures when triggered outside of a pull request context (e.g.,
workflow_dispatchor push events).Problem
The
validate-promptsworkflow assumedgithub.event.pull_request.base.refwas always set, causing failures when:workflow_dispatch(manual trigger) wherebase.refis emptygit diffexits non-zero when no matching instruction files are found, breaking subsequent stepsGenerate PR commentandPost PR commentsteps attempted to post to a PR that does not exist in non-PR runsChanges
base.refis not available (non-PR context), falls back toHEAD^instead of crashing on an emptyBASE_BRANCHgit diffnow uses2>/dev/null || trueto prevent step failure when no.mdfiles matchGenerate PR commentandPost PR commentare now gated withgithub.event_name == 'pull_request'so they are skipped gracefully on non-PR triggersBASE_BRANCHenv var renamed toBASE_REF; the resolved ref is propagated via step output (base_ref) so later steps handle both branch-name refs (origin/<branch>) and theHEAD^fallback correctlyTesting
git fetch+ diff againstorigin/<base>as beforeFixes #1183