Skip to content

Commit 9135cdf

Browse files
Copilotmrjf
andauthored
fix: correct push_wiki files JSON decoding in agentic-wiki-writer (#272)
* Initial plan * fix: correct push_wiki files JSON decoding in agentic-wiki-writer Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com> Co-authored-by: Russell Horton <mrjf@github.com>
1 parent da1686f commit 9135cdf

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

workflows/agentic-wiki-writer.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,10 @@ safe-outputs:
6767
token: ${{ secrets.GITHUB_TOKEN }}
6868
- name: Write wiki pages
6969
run: |
70-
FILES=$(jq -r '.items[] | select(.type == "push_wiki") | .files' "$GH_AW_AGENT_OUTPUT")
71-
echo "$FILES" | jq -r 'to_entries[] | @base64' | while read entry; do
72-
FILENAME=$(echo "$entry" | base64 -d | jq -r '.key')
73-
CONTENT=$(echo "$entry" | base64 -d | jq -r '.value')
74-
echo "$CONTENT" > "$FILENAME"
70+
jq -r '.items[] | select(.type == "push_wiki") | .files | fromjson | to_entries[] | @base64' "$GH_AW_AGENT_OUTPUT" | while IFS= read -r entry; do
71+
FILENAME=$(printf '%s' "$entry" | base64 -d | jq -r '.key')
72+
CONTENT=$(printf '%s' "$entry" | base64 -d | jq -r '.value')
73+
printf '%s' "$CONTENT" > "$FILENAME"
7574
done
7675
- name: Commit and push
7776
run: |

0 commit comments

Comments
 (0)