Skip to content

Fix optional types in CheckSuite struct#784

Merged
XAMPPRocky merged 1 commit into
XAMPPRocky:mainfrom
maflcko:str-opt
Aug 1, 2025
Merged

Fix optional types in CheckSuite struct#784
XAMPPRocky merged 1 commit into
XAMPPRocky:mainfrom
maflcko:str-opt

Conversation

@maflcko

@maflcko maflcko commented Aug 1, 2025

Copy link
Copy Markdown
Collaborator

A few types must be optional, according to the docs and to avoid runtime errors.

Docs: https://docs.github.com/en/rest/checks/suites?apiVersion=2022-11-28#list-check-suites-for-a-git-reference (They are optional in the schema)

I used for testing:

    octocrab::instance()
        .checks("llvm", "llvm-project")
        .list_check_suites_for_git_ref(octocrab::params::repos::Commitish(
            "f749d0dee693c6082227862757cf3ce47568ab4b".to_string(),
        ))
        .per_page(2)
        .send()
        .await
        .unwrap();

Previously, it crashed. Now, it passes.

@XAMPPRocky

Copy link
Copy Markdown
Owner

Thank you for your PR!

@XAMPPRocky XAMPPRocky merged commit 2edc6ea into XAMPPRocky:main Aug 1, 2025
20 checks passed
@maflcko maflcko deleted the str-opt branch August 1, 2025 18:01
@github-actions github-actions Bot mentioned this pull request Aug 1, 2025
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