Skip to content

fix: fix code snippets in interop tutorials #1575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025
Merged

Conversation

tremarkley
Copy link
Contributor

@tremarkley tremarkley commented Apr 14, 2025

This PR merged without the code snippet hashes being properly updated: #1569, this PR fixes the incorrect snippets.

@tremarkley tremarkley requested a review from a team as a code owner April 14, 2025 21:43
@tremarkley
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for docs-optimism ready!

Name Link
🔨 Latest commit 8bd8906
🔍 Latest deploy log https://app.netlify.com/sites/docs-optimism/deploys/67fe81d0bf3b2c00077f645b
😎 Deploy Preview https://deploy-preview-1575--docs-optimism.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

coderabbitai bot commented Apr 14, 2025

📝 Walkthrough
## Walkthrough

This set of changes updates code snippet references within three tutorial documentation files related to cross-chain operations and token transfers. In the "bridge-crosschain-eth" tutorial, the referenced line ranges and hashes for TypeScript code snippets are adjusted to reflect updates in the source file, without modifying the tutorial text or code logic. The "message-passing" tutorial updates its TypeScript example to use a wallet-based interop API for fetching and checking the status of cross-domain messages, replacing a previous direct function call approach. In the "transfer-superchainERC20" tutorial, the embedded code snippet references are updated to point to new line ranges and hashes, indicating updates to the underlying example code, but with no changes to the tutorial’s textual content or logic.

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant WalletA
    participant WalletB

    User->>WalletA: Submit transaction (manual message relay)
    WalletA->>WalletA: interop.getCrossDomainMessages(receipt.logs)
    WalletA-->>User: Return cross-domain messages
    User->>WalletB: Query message status
    WalletB->>WalletB: interop.getCrossDomainMessageStatus(message)
    WalletB-->>User: Return message status

Possibly related PRs

Suggested reviewers

  • krofax

</details>

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 61afb528c7f35f0133ce87b0eadbed8b92511202 and 8bd89063419c5235d6cfc3e41058ddfdd1791557.

</details>

<details>
<summary>📒 Files selected for processing (5)</summary>

* `pages/interop/tutorials/bridge-crosschain-eth.mdx` (2 hunks)
* `pages/interop/tutorials/message-passing.mdx` (5 hunks)
* `pages/interop/tutorials/relay-messages-cast.mdx` (2 hunks)
* `pages/interop/tutorials/transfer-superchainERC20.mdx` (1 hunks)
* `public/tutorials/GreetingSender.sol` (1 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (2)</summary>

* pages/interop/tutorials/bridge-crosschain-eth.mdx
* public/tutorials/GreetingSender.sol

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (2)</summary>

* pages/interop/tutorials/transfer-superchainERC20.mdx
* pages/interop/tutorials/message-passing.mdx

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>📓 Path-based instructions (1)</summary>

<details>
<summary>`**/*.mdx`: "ALWAYS review Markdown content THOROUGHLY with the following criteria:
- First, check the frontmatter section at the top of the file:
  1. For regular pages, ensure AL...</summary>

> `**/*.mdx`: "ALWAYS review Markdown content THOROUGHLY with the following criteria:
> - First, check the frontmatter section at the top of the file:
>   1. For regular pages, ensure ALL these fields are present and not empty:
>     ```yaml
>     ---
>     title: [non-empty]
>     lang: [non-empty]
>     description: [non-empty]
>     topic: [non-empty]
>     personas: [non-empty array]
>     categories: [non-empty array]
>     content_type: [valid type]
>     ---
>     ```
>   2. For landing pages (index.mdx or files with <Cards>), only these fields are required:
>     ```yaml
>     ---
>     title: [non-empty]
>     lang: [non-empty]
>     description: [non-empty]
>     topic: [non-empty]
>     ---
>     ```
>   3. If any required fields are missing or empty, comment:
>     'This file appears to be missing required metadata. Please check keywords.config.yaml for valid options and add the required fields manually. You can validate your changes by running:
>     ```bash
>     pnpm validate-metadata
>     ```'
> - Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
> - Avoid gender-specific language and use the imperative form.
> - Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
> - Ensure proper nouns are capitalized in sentences.
> - Apply the Oxford comma.
> - Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
> - Use correct spelling and grammar at all times (IMPORTANT).
> - For H1, H2, and H3 headers:
>   1. Use sentence case, capitalizing only the first word.
>   2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
>   3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
> - Flag any headers that seem to inconsistently apply these rules for manual review.
> - When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
> "
> 

- `pages/interop/tutorials/relay-messages-cast.mdx`

</details>

</details><details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>pages/interop/tutorials/relay-messages-cast.mdx</summary>

[grammar] ~170-~170: Did you mean “admins”?
Context: ...elay message transaction. There are two admin RPC methods that can be used to constru...

(ARE_CD_NN)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (3)</summary>

* GitHub Check: Redirect rules - docs-optimism
* GitHub Check: Header rules - docs-optimism
* GitHub Check: Pages changed - docs-optimism

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>pages/interop/tutorials/relay-messages-cast.mdx (2)</summary>

`128-128`: **Improved clarity for block hash substitution.**

The updated instruction now clearly tells the user to replace the placeholder with the actual `blockHash` from the previous output, reducing ambiguity and potential user error.

---

`170-170`: **Corrected sentence structure for admin RPC methods.**

Removing the trailing "and." results in a grammatically correct and clearer sentence.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary>

[grammar] ~170-~170: Did you mean “admins”?
Context: ...elay message transaction. There are two admin RPC methods that can be used to constru...

(ARE_CD_NN)

</details>

</details>

</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAM3gADy54hIUlewx4bm4SXGR4LAKaCnxuMLx8Cng0L0RoyAB3NGQHAWZ1Gno5MNgPbERKMP9mZwBrSPlm6zsMRwFBgEYAVgB2JZQsXF7IXN7/RzBS8XbEZgB6WnwGZH9ufER1StkNGG3ubAo7gf5YntRbFDIAgKCj+MRpDyITLZXL5TbbIqUUrlAhVGpA2DURqUDwYfChXilSheeTYbi0ahRAroHj+CTwfD9aaQAAUs2Y8z4ywAbABOACULwAyjkGPB4gwaiSADQ9DwkZxeeCDAFsCikegNdSwRmhMkU8QYIhyiEZLI5UKYxC9ZBMUGiCKyWWYehbf52NC0Wj+RADDFYpAODzdFIFY1bDwFO1g0JQ82wsL4HYYBz+OWTNNoBgMD6U9AYehMFNIGgYTTmSwAYRYbDLLUcIxcbm2+AwJIUrHY/Hh7sBkFiJWYJrQeB1FFluGGYwmsoaOo2DC82CU9DQkCVGFGicg9JIDRNAOpAHEqNwEDRnYn8L5YpVICMMGgiGHPD4/IFgog8vn6EocgWyDFaQXncDta1CdEkzxGh/VCN1kEPZBuGcUJ8F+NcvyzLc0NfXx/CCEJkAfJ8om6E80DPdQSFnbVIDxdAvXUBlH18P8yCUDAgOQJUvyiW8+Hg6YQL2DxnFxJNYg+CM+FoJAc19ZjEFlOllQaJT+D4WISDoAQsLA9gkJKekVw2E0tn8T1hI8JhOzLexKCkQz4EbeB2ymTANn4kZxFbGo6PxUSBF1A8bAAciIzASPAn8rw3Y1ESIKgfKwJK9h6DzWkwst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gvMFhkNlEOJrzO5pQT7AKaMErG6mXIIM4uQtUUOMqSpLJmovwHgO8JoGCqIPIZeJLK5LeqCICbJkWM9mhmLNEC6BoPUE0IDsqnxB2soewLfPol+EocLg0EmJ6O0FgDYFYJWMggtrQMgE+h2QUK+hFtDNmCgvmiWHVrILWogEQBGdaFkfQM+rQJ2aOcFhOb6FOV+LSZULDBxOIPEGUT+jdq6PwqEgweCEGVuWQkgpftsLCfIBVkMFLO5sxC8HwpUfzhUSIsLkmOIqILAJkPrAsrjgVGonrNoQ7vcVsQBYYZEg8TEqYfErLl8dYb8dzgCeQMCfkidONMmIwuhBUBiVYstOwKtGgOtNifIDtIoHtGoAdKNMdAYARctOoK+pCogK+nlOvLQK+phPMpVKxdVIwHXAIAwD/F/JPnjCsCsGgDQgICsHXM3M3D/CQD3tbtyA3MpbyCsDQnJT/NyEpdyEdIYARTQs3AwLyNyN3tpCpUZSsAID/OJSPrQH3vMB3tyFJZZQZSQDQnXGgC/GZSJRAJAJZQIEsPMAsPpWgD/EsLQLEI/D/M3N3uPrELQA3NyIpWgAsC3msOXpngIHXCFQRSpWgM3HFbQAsIlQ3AwDQmgBVT/LyAwNyM3LyIFbQLZUsLEAwLEA3HVc3LELyA3B1aVaJY3v3lJVpK3NlXlblT/NZSQCsGXk5Y/NZfgsVX5fMFEGNBNa3s3ksI3AwCsLEKlbED3qpfgjpc5Qwqug3AIB1UsAsBPi5eNWFQ9ZlZQm1ePi1UdalV1X1QwM3P5QsPFQ3F6BldVS/MsKsCFaFVAOxbgJxQOTxfhqpHQK+rVPoEAA=== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=ethereum-optimism/docs&utm_content=1575):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@tremarkley tremarkley force-pushed the harry/fix_code_snippets branch 4 times, most recently from 23a3a0d to 6a9907f Compare April 14, 2025 22:14
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
pages/interop/tutorials/relay-messages-cast.mdx (1)

170-170: Grammar Note: Consider Consistency in Terminology

Static analysis flagged a potential improvement: verify if the term "admin RPC methods" should instead use the plural "admins" (for example, "admins RPC methods") for clarity and consistency with team conventions. Adjust if needed.

🧰 Tools
🪛 LanguageTool

[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...

(ARE_CD_NN)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23a3a0d and 6a9907f.

📒 Files selected for processing (5)
  • pages/interop/tutorials/bridge-crosschain-eth.mdx (2 hunks)
  • pages/interop/tutorials/message-passing.mdx (5 hunks)
  • pages/interop/tutorials/relay-messages-cast.mdx (1 hunks)
  • pages/interop/tutorials/transfer-superchainERC20.mdx (1 hunks)
  • public/tutorials/GreetingSender.sol (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • public/tutorials/GreetingSender.sol
🚧 Files skipped from review as they are similar to previous changes (3)
  • pages/interop/tutorials/transfer-superchainERC20.mdx
  • pages/interop/tutorials/message-passing.mdx
  • pages/interop/tutorials/bridge-crosschain-eth.mdx
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.mdx`: "ALWAYS review Markdown content THOROUGHLY with the following criteria: - First, check the frontmatter section at the top of the file: 1. For regular pages, ensure AL...

**/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • First, check the frontmatter section at the top of the file:
    1. For regular pages, ensure ALL these fields are present and not empty:
    ---
    title: [non-empty]
    lang: [non-empty]
    description: [non-empty]
    topic: [non-empty]
    personas: [non-empty array]
    categories: [non-empty array]
    content_type: [valid type]
    ---
    1. For landing pages (index.mdx or files with ), only these fields are required:
    ---
    title: [non-empty]
    lang: [non-empty]
    description: [non-empty]
    topic: [non-empty]
    ---
    1. If any required fields are missing or empty, comment:
      'This file appears to be missing required metadata. Please check keywords.config.yaml for valid options and add the required fields manually. You can validate your changes by running:
    pnpm validate-metadata
    ```'
  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
  • pages/interop/tutorials/relay-messages-cast.mdx
🪛 LanguageTool
pages/interop/tutorials/relay-messages-cast.mdx

[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...

(ARE_CD_NN)

🔇 Additional comments (2)
pages/interop/tutorials/relay-messages-cast.mdx (2)

1-21: Frontmatter Verification

The frontmatter includes all the required metadata fields (title, description, lang, content_type, topic, personas, categories, and is_imported_content), ensuring that the documentation page meets the project’s metadata standards.


170-170: Typographical Correction

The extraneous trailing "and" has been successfully removed from the sentence listing the RPC methods. This correction improves grammatical accuracy and clarifies the instructions without affecting the technical content.

🧰 Tools
🪛 LanguageTool

[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...

(ARE_CD_NN)

@tremarkley tremarkley force-pushed the harry/fix_code_snippets branch from 6a9907f to 61afb52 Compare April 14, 2025 22:16
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
pages/interop/tutorials/relay-messages-cast.mdx (1)

170-170: Clarification on access list requirement.
The added explanation emphasizes that an access list is required with the relay message transaction and details the two available admin RPC methods (admin_getAccessListByMsgHash and admin_getAccessListForIdentifier). For improved clarity, consider replacing the abbreviation "tx" with "transaction", and double-check that the phrasing "admin RPC methods" is intentional—as the static analysis hint suggests a potential grammar revision, though the current terminology accurately reflects the method names.

🧰 Tools
🪛 LanguageTool

[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...

(ARE_CD_NN)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a9907f and 61afb52.

📒 Files selected for processing (5)
  • pages/interop/tutorials/bridge-crosschain-eth.mdx (2 hunks)
  • pages/interop/tutorials/message-passing.mdx (5 hunks)
  • pages/interop/tutorials/relay-messages-cast.mdx (2 hunks)
  • pages/interop/tutorials/transfer-superchainERC20.mdx (1 hunks)
  • public/tutorials/GreetingSender.sol (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • public/tutorials/GreetingSender.sol
  • pages/interop/tutorials/bridge-crosschain-eth.mdx
🚧 Files skipped from review as they are similar to previous changes (2)
  • pages/interop/tutorials/transfer-superchainERC20.mdx
  • pages/interop/tutorials/message-passing.mdx
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.mdx`: "ALWAYS review Markdown content THOROUGHLY with the following criteria: - First, check the frontmatter section at the top of the file: 1. For regular pages, ensure AL...

**/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • First, check the frontmatter section at the top of the file:
    1. For regular pages, ensure ALL these fields are present and not empty:
    ---
    title: [non-empty]
    lang: [non-empty]
    description: [non-empty]
    topic: [non-empty]
    personas: [non-empty array]
    categories: [non-empty array]
    content_type: [valid type]
    ---
    1. For landing pages (index.mdx or files with ), only these fields are required:
    ---
    title: [non-empty]
    lang: [non-empty]
    description: [non-empty]
    topic: [non-empty]
    ---
    1. If any required fields are missing or empty, comment:
      'This file appears to be missing required metadata. Please check keywords.config.yaml for valid options and add the required fields manually. You can validate your changes by running:
    pnpm validate-metadata
    ```'
  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
  • pages/interop/tutorials/relay-messages-cast.mdx
🪛 LanguageTool
pages/interop/tutorials/relay-messages-cast.mdx

[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...

(ARE_CD_NN)

🔇 Additional comments (2)
pages/interop/tutorials/relay-messages-cast.mdx (2)

1-21: Frontmatter metadata and structure are correct.
The frontmatter includes all the required fields (title, description, lang, content_type, topic, personas, categories, and is_imported_content) as specified in the guidelines. Everything is populated with non-empty, valid values.


128-128: Clarification on block hash placeholder usage.
This update clearly instructs users to replace 0xREPLACE_WITH_CORRECT_BLOCKHASH with the actual blockHash obtained from the previous log output. This clarification enhances accuracy and reduces potential misinterpretations.

@tremarkley tremarkley force-pushed the harry/fix_code_snippets branch from 61afb52 to 8bd8906 Compare April 15, 2025 15:57
@krofax
Copy link
Collaborator

krofax commented Apr 15, 2025

This PR merged without the code snippet hashes being properly updated: #1569, this PR fixes the incorrect snippets.

LGTM @tremarkley

@tremarkley tremarkley merged commit e51a1d8 into main Apr 15, 2025
8 checks passed
@tremarkley tremarkley deleted the harry/fix_code_snippets branch April 15, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants