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
8 changes: 6 additions & 2 deletions .github/workflows/content-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,15 @@ jobs:
return Array.from(existingContentAuthors);

- name: Request author review
if: steps.author-check.outputs.result != '[]'
uses: actions/github-script@v7
with:
script: |
const authors = JSON.parse('${{ steps.author-check.outputs.result }}');
const authors = JSON.parse('${{ steps.author-check.outputs.result }}' || '[]');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The previous step, https://github.com/cremich/promptz/blob/main/.github/workflows/content-validation.yml#L64 returns false if files have only been deleted (not changed or added), https://github.com/tj-actions/changed-files?tab=readme-ov-file#output_any_changed

So there is no JSON object to parse. This guards against that by always having an array to check against. Then count the numbers before posting to github


if (authors.length === 0) {
console.log('No authors to review');
return;
}

await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
Expand Down
16 changes: 0 additions & 16 deletions content/agents/infrastructure/motorway-terraform-agent/agent.json

This file was deleted.

15 changes: 0 additions & 15 deletions content/agents/infrastructure/motorway-terraform-agent/index.md

This file was deleted.

10 changes: 0 additions & 10 deletions content/agents/infrastructure/motorway-terraform-agent/prompt.md

This file was deleted.

Loading