Skip to content

Commit 0a6cd9e

Browse files
committed
autofix
1 parent 6d64172 commit 0a6cd9e

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/validate-specs-with-ai.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,21 @@ jobs:
192192
"| \(.spec_id // "global") | \(.rule // "unknown") | \(.description // "No description") |"
193193
' .specs-validation/ai/result.json >> "$GITHUB_STEP_SUMMARY"
194194
195+
fix-specs-with-ai-approval:
196+
name: Fix Specs with AI Approval
197+
needs: validate-specs-with-ai
198+
if: always() && needs.validate-specs-with-ai.outputs.validation-status == 'INVALID'
199+
runs-on: ubuntu-latest
200+
environment:
201+
name: fix-specs-with-ai-approval
202+
steps:
203+
- name: Approval granted
204+
run: echo "Approval granted for fixing AI validation issues with AI"
205+
195206
fix-specs-with-ai:
196207
name: Fix Specs with AI
197-
needs: validate-specs-with-ai
198-
if: needs.validate-specs-with-ai.outputs.validation-status == 'INVALID'
208+
needs: [validate-specs-with-ai, fix-specs-with-ai-approval]
209+
if: always() && needs.validate-specs-with-ai.outputs.validation-status == 'INVALID' && needs.fix-specs-with-ai-approval.result == 'success'
199210
uses: ./.github/workflows/fix-specs-with-ai.yml
200211
secrets: inherit
201212
permissions:

openspec/test-invalid-spec/spec.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Test Invalid Spec
2+
3+
## Requirements
4+
5+
### Requirement: Missing Scenario
6+
This requirement has no scenarios, which violates OpenSpec format.
7+
8+
### Requirement: Invalid Scenario Format
9+
This requirement has a scenario but it's not formatted correctly.
10+
11+
- **Scenario**: This is wrong format (should use #### Scenario: header)
12+
- **GIVEN** something
13+
- **THEN** something happens

0 commit comments

Comments
 (0)