diff --git a/.github/scripts/verify-code-references.sh b/.github/scripts/verify-code-references.sh index 223ead52e..92fcbe3be 100755 --- a/.github/scripts/verify-code-references.sh +++ b/.github/scripts/verify-code-references.sh @@ -182,6 +182,22 @@ echo "" if [[ $EXIT_CODE -eq 0 ]]; then echo -e "${GREEN}✓ All code references are valid!${NC}" + + # If in PR comment mode, write success message to file + if [[ -n "${COMMENT_FILE}" ]]; then + cat > "${COMMENT_FILE}" <> $GITHUB_OUTPUT + echo "has_comment=true" >> $GITHUB_OUTPUT echo "Comment file created, will post to PR" cat /tmp/pr-comment.md else - echo "has_errors=false" >> $GITHUB_OUTPUT - echo "No errors found, no comment needed" + echo "has_comment=false" >> $GITHUB_OUTPUT + echo "No comment file created" fi - - name: Comment PR on verification failure - if: github.event_name == 'pull_request' && steps.verify-pr.outputs.has_errors == 'true' + - name: Comment PR with verification results + if: github.event_name == 'pull_request' && steps.verify-pr.outputs.has_comment == 'true' uses: thollander/actions-comment-pull-request@v3 with: file-path: /tmp/pr-comment.md diff --git a/website/docs/developers/documentation-guidelines.md b/website/docs/developers/documentation-guidelines.md index 6f0a10825..e6d74a625 100644 --- a/website/docs/developers/documentation-guidelines.md +++ b/website/docs/developers/documentation-guidelines.md @@ -35,10 +35,10 @@ https://github.com/o1-labs/mina-rust/blob/develop/path/to/file.rs#LStartLine-LEn Here's a real example from the zkApps documentation: - + -```rust reference title="ledger/src/scan_state/transaction_logic.rs" -https://github.com/o1-labs/mina-rust/blob/develop/ledger/src/scan_state/transaction_logic.rs#L3588-L3592 +```rust reference title="ledger/src/scan_state/transaction_logic/valid.rs" +https://github.com/o1-labs/mina-rust/blob/develop/ledger/src/scan_state/transaction_logic/valid.rs#L80-L83 ``` ### Components explained