From 1746fc7d27e690934acff4f0851e0e3b2ef274ef Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Thu, 9 Oct 2025 17:41:10 +0200 Subject: [PATCH 1/2] Website: update Rust reference --- website/docs/developers/documentation-guidelines.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From a565e48e629e684b558048498e9c207ac4383624 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Thu, 9 Oct 2025 17:47:55 +0200 Subject: [PATCH 2/2] CI/docs: update comments when the links in the docs are valid --- .github/scripts/verify-code-references.sh | 16 ++++++++++++++++ .github/workflows/docs.yaml | 10 +++++----- 2 files changed, 21 insertions(+), 5 deletions(-) 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