Skip to content

Add support for pattern for strings#312

Merged
wolfadex merged 1 commit into
mainfrom
pattern
Jun 6, 2026
Merged

Add support for pattern for strings#312
wolfadex merged 1 commit into
mainfrom
pattern

Conversation

@miniBill

@miniBill miniBill commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/GithubV3RestApi/Json.elm branch/cli/generated/GithubV3RestApi/Json.elm
253a254
> import Regex
25931a25933,25949
>     let
>         regex =
>             Maybe.withDefault Regex.never (Regex.fromString "^[0-9a-fA-F]+$")
>     in
>     Json.Decode.andThen
>         (\andThenUnpack ->
>             if Regex.contains regex andThenUnpack then
>                 Json.Decode.succeed andThenUnpack
> 
>             else
>                 Json.Decode.fail
>                     ("Unexpected value: expected a string matching \"^[0-9a-fA-F]+$\" got "
>                         ++ Json.Encode.encode
>                             0
>                             (Json.Encode.string andThenUnpack)
>                     )
>         )
29476a29495,29513
>                 (let
>                     regex =
>                         Maybe.withDefault
>                             Regex.never
>                             (Regex.fromString "^pkg")
>                  in
>                  Json.Decode.andThen
>                     (\andThenUnpack ->
>                         if Regex.contains regex andThenUnpack then
>                             Json.Decode.succeed andThenUnpack
> 
>                         else
>                             Json.Decode.fail
>                                 ("Unexpected value: expected a string matching \"^pkg\" got "
>                                     ++ Json.Encode.encode
>                                         0
>                                         (Json.Encode.string andThenUnpack)
>                                 )
>                     )
29478a29516
>             )
48416c48454,48477
<             (Json.Decode.field "ref" Json.Decode.string)
---
>             (Json.Decode.field
>                 "ref"
>                 (let
>                     regex =
>                         Maybe.withDefault
>                             Regex.never
>                             (Regex.fromString "^refs/")
>                  in
>                  Json.Decode.andThen
>                     (\andThenUnpack ->
>                         if Regex.contains regex andThenUnpack then
>                             Json.Decode.succeed andThenUnpack
> 
>                         else
>                             Json.Decode.fail
>                                 ("Unexpected value: expected a string matching \"^refs/\" got "
>                                     ++ Json.Encode.encode
>                                         0
>                                         (Json.Encode.string andThenUnpack)
>                                 )
>                     )
>                     Json.Decode.string
>                 )
>             )

@wolfadex wolfadex merged commit 3ed72a0 into main Jun 6, 2026
1 of 2 checks passed
@wolfadex wolfadex deleted the pattern branch June 6, 2026 12:13
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