-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix project status unmarshaling #8384
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a super minor nit as everything else seems sound. I'm going to build this locally and do some testing for live review ...
api/queries_issue.go
Outdated
Status Status `graphql:"status:fieldValueByName(name: \"Status\")"` | ||
} | ||
|
||
type Status struct { | ||
StatusFragment struct { | ||
OptionID string `json:"optionId"` | ||
Name string `json:"name"` | ||
} `graphql:"... on ProjectV2ItemFieldSingleSelectValue"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing blocking this review, but I can't help but feel like this use case should be documented as part of the shurcool repository. Just making a note for myself as I'm motivated to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's reflected in https://github.com/shurcooL/graphql#inline-fragments:
type (
DroidFragment struct {
PrimaryFunction graphql.String
}
HumanFragment struct {
Height graphql.Float
}
)
var q struct {
Hero struct {
Name graphql.String
DroidFragment `graphql:"... on Droid"`
HumanFragment `graphql:"... on Human"`
} `graphql:"hero(episode: \"JEDI\")"`
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I guess there's some extra craziness?
Co-authored-by: Andy Feller <andyfeller@github.com>
One problem found by @mattruggio is the difference between andyfeller@Andrews-MacBook-Pro:tinyfists/fork-testing ‹main›$ ~/Documents/workspace/cli/cli/main pr view 1 --json projectItems
{
"projectItems": [
{
"status": {
"optionId": "4cc61d42",
"name": "In review"
},
"title": "@andyfeller's untitled project"
}
]
} whereas andyfeller@Andrews-MacBook-Pro:tinyfists/fork-testing ‹main›$ ~/Documents/workspace/cli/cli/main pr list --json id,number,projectItems
[
{
"id": "PR_kwDOKym29s5gcooL",
"number": 2,
"projectItems": []
},
{
"id": "PR_kwDOKym29s5gcdEp",
"number": 1,
"projectItems": [
{
"status": {
"optionId": "",
"name": ""
},
"title": "@andyfeller's untitled project"
}
]
}
] I know you're already aware of this, @williammartin, but adding the comment for posterity from internal discussion. |
Separate the GQL and JSON decoded types that we use for queries.
The change in this PR does not look to cause any regressions around previous work. Since the initial change did cause a bug in another area I wanted to aggregate some of the on-going work to provide a quick sanity check: Initial change which introduced the new status fieldExample(s):
The initial change did not account for an additional execution path which introduced a bug against editing PRsExample(s):
Miscellaneous CallsExample(s):
This PR: editing a PR without argumentsExample(s):
Notes:
|
|
||
type projectV2Item struct { | ||
ID string `json:"id"` | ||
Project struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to change this to be ProjectV2ItemProject
now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to matter since it's private and we never construct it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make the loop below through query.Repository.Issue.ProjectItems.Nodes
slightly easier though? Or rather less code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm, I wouldn't do it for less code but maybe because then we'd know if one changed the other should too. I dunno, it seems tenuous. There's also a nice advantage to treating these things separately since if we decide we need more shurcool magic in one we can avoid it in the other.
I'd favour treating them separately and adding a comment later (not blocking this PR cause I don't have time right now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also a nice advantage to treating these things separately since if we decide we need more shurcool magic in one we can avoid it in the other.
This has been one of the struggles I've experienced using shurcool library, whether the query structure is what I pass back to code or having separate structures that don't couple logic to graphql.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make the argument that data transfer structures should be separate from the core domain types. This applies both on ingress (Rest, GraphQL) and egress (Rest, GraphQL, JSON Export!).
Rust makes this kind of shuffling between domain types super simple but it's kind of gross in Go. You really need something like https://github.com/josebalius/exhauststruct to lint for fields that aren't copied between types correctly.
|
||
type projectV2Item struct { | ||
ID string `json:"id"` | ||
Project struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to change this to be ProjectV2ItemProject
now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to matter since it's private and we never construct it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing the code changes and doing manual local end-to-end testing, I think these changes are good to go 👍
andyfeller@Andrews-MacBook-Pro:tinyfists/fork-testing ‹andyfeller/main›$ ~/Documents/workspace/cli/cli/main pr list --json id,number,projectItems
[
{
"id": "PR_kwDOKym29s5gcooL",
"number": 2,
"projectItems": []
},
{
"id": "PR_kwDOKym29s5gcdEp",
"number": 1,
"projectItems": [
{
"status": {
"optionId": "4cc61d42",
"name": "In review"
},
"title": "@andyfeller's untitled project"
}
]
}
]
andyfeller@Andrews-MacBook-Pro:tinyfists/fork-testing ‹andyfeller/main›$ ~/Documents/workspace/cli/cli/main pr view 1 --json projectItems
{
"projectItems": [
{
"status": {
"optionId": "4cc61d42",
"name": "In review"
},
"title": "@andyfeller's untitled project"
}
]
}
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [aquaproj/aqua-registry](https://togithub.com/aquaproj/aqua-registry) | minor | `v4.88.0` -> `v4.92.2` | | [charmbracelet/gum](https://togithub.com/charmbracelet/gum) | minor | `v0.11.0` -> `v0.12.0` | | [cli/cli](https://togithub.com/cli/cli) | patch | `v2.39.1` -> `v2.39.2` | | [mikefarah/yq](https://togithub.com/mikefarah/yq) | minor | `v4.35.2` -> `v4.40.3` | | [simulot/immich-go](https://togithub.com/simulot/immich-go) | patch | `0.8.3` -> `0.8.7` | | [twpayne/chezmoi](https://togithub.com/twpayne/chezmoi) | minor | `v2.41.0` -> `v2.42.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>aquaproj/aqua-registry (aquaproj/aqua-registry)</summary> ### [`v4.92.2`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.92.2) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.92.1...v4.92.2) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.92.2) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.92.2) | aquaproj/aqua-registry@v4.92.1...v4.92.2 #### Fixes [#​17677](https://togithub.com/aquaproj/aqua-registry/issues/17677) MordechaiHadad/bob: Follow up changes of bob v2.7.0 [#​17678](https://togithub.com/aquaproj/aqua-registry/issues/17678) particledecay/kconf: Fix old versions [#​17679](https://togithub.com/aquaproj/aqua-registry/issues/17679) blst-security/cherrybomb: Follow up changes of cherrybomb v1.0.1 Related issue: [blst-security/cherrybomb#153 ### [`v4.92.1`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.92.1) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.92.0...v4.92.1) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.92.1) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.92.1) | aquaproj/aqua-registry@v4.92.0...v4.92.1 #### Fixes [#​17667](https://togithub.com/aquaproj/aqua-registry/issues/17667) git-town/git-town: Follow up changes of git-town v10.0.3 [#​17653](https://togithub.com/aquaproj/aqua-registry/issues/17653) hktalent/scan4all: Transfer the repository to GhostTroops/scan4all The GitHub Repository of the package "hktalent/scan4all" was transferred from [hktalent/scan4all](https://togithub.com/hktalent/scan4all) to [GhostTroops/scan4all](https://togithub.com/GhostTroops/scan4all) [#​17622](https://togithub.com/aquaproj/aqua-registry/issues/17622) FiloSottile/age: Enable windows_arm_emulation ### [`v4.92.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.92.0) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.91.0...v4.92.0) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.92.0) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.92.0) | aquaproj/aqua-registry@v4.91.0...v4.92.0 #### 🎉 New Packages [#​17534](https://togithub.com/aquaproj/aqua-registry/issues/17534) [bensadeh/tailspin](https://togithub.com/bensadeh/tailspin): A log file highlighter [@​hituzi-no-sippo](https://togithub.com/hituzi-no-sippo) :warning: The package `crates.io/tailspin` was merged to `bensadeh/tailspin`. [#​17565](https://togithub.com/aquaproj/aqua-registry/issues/17565) [suzuki-shunsuke/nllint](https://togithub.com/suzuki-shunsuke/nllint): Linter to check newlines at the end of files ### [`v4.91.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.91.0) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.90.0...v4.91.0) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.91.0) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.91.0) | aquaproj/aqua-registry@v4.90.0...v4.91.0 #### 🎉 New Packages [#​17529](https://togithub.com/aquaproj/aqua-registry/issues/17529) [bazelbuild/bazelisk](https://togithub.com/bazelbuild/bazelisk): A user-friendly launcher for Bazel [@​monaka](https://togithub.com/monaka) #### Others [#​17528](https://togithub.com/aquaproj/aqua-registry/issues/17528) chore(cmdx): fix cmdx remove to be able to delete Docker container [@​hituzi-no-sippo](https://togithub.com/hituzi-no-sippo) ### [`v4.90.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.90.0) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.89.0...v4.90.0) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.90.0) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.90.0) | aquaproj/aqua-registry@v4.89.0...v4.90.0 #### 🎉 New Packages [#​17521](https://togithub.com/aquaproj/aqua-registry/issues/17521) [fujiwara/grpcp](https://togithub.com/fujiwara/grpcp): gRPC stream file transfer server/client [@​ponkio-o](https://togithub.com/ponkio-o) #### Fixes [#​17526](https://togithub.com/aquaproj/aqua-registry/issues/17526) Melkeydev/go-blueprint: Follow up changes of go-blueprint v0.3.1 Asset names were changed. [Melkeydev/go-blueprint#117 #### Others [#​17525](https://togithub.com/aquaproj/aqua-registry/issues/17525) style(scripts): convert indent from spaces to tabs [@​hituzi-no-sippo](https://togithub.com/hituzi-no-sippo) ### [`v4.89.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.89.0) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.88.0...v4.89.0) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.89.0) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.89.0) | aquaproj/aqua-registry@v4.88.0...v4.89.0 #### 🎉 New Packages [#​17466](https://togithub.com/aquaproj/aqua-registry/issues/17466) [self-actuated/actuated-cli](https://togithub.com/self-actuated/actuated-cli): CLI for actuated [@​ponkio-o](https://togithub.com/ponkio-o) </details> <details> <summary>charmbracelet/gum (charmbracelet/gum)</summary> ### [`v0.12.0`](https://togithub.com/charmbracelet/gum/releases/tag/v0.12.0) [Compare Source](https://togithub.com/charmbracelet/gum/compare/v0.11.0...v0.12.0) ### Gum Log 🪵 Version 0.12.0 of gum features a brand new `log` command. Gum `log` logs messages to the terminal at using different levels and styling using the [`charmbracelet/log`](https://togithub.com/charmbracelet/log) library. To get started, simply run: gum log ```bash ### Log some debug information. gum log --structured --level debug "Creating file..." name file.txt ### DEBUG Unable to create file. name=temp.txt ### Log some error. gum log --structured --level error "Unable to create file." name file.txt ### ERROR Unable to create file. name=temp.txt ``` See [`charmbracelet/log`](https://togithub.com/charmbracelet/log) for more usage. <img src="https://vhs.charm.sh/vhs-6jupuFM0s2fXiUrBE0I1vU.gif" width="600" alt="Running gum log with debug and error levels" /> #### What's Changed - Pretty Table Print by [@​maaslalani](https://togithub.com/maaslalani) in [charmbracelet/gum#436 - Log command by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [charmbracelet/gum#449 - Avoid reading from stdin if `--value` is being used by [@​piero-vic](https://togithub.com/piero-vic) in [charmbracelet/gum#448 - Made filter work with lists as choose by [@​MikaelFangel](https://togithub.com/MikaelFangel) in [charmbracelet/gum#424 #### New Contributors - [@​cglong](https://togithub.com/cglong) made their first contribution in [charmbracelet/gum#401 - [@​docwhat](https://togithub.com/docwhat) made their first contribution in [charmbracelet/gum#433 - [@​piero-vic](https://togithub.com/piero-vic) made their first contribution in [charmbracelet/gum#448 **Full Changelog**: charmbracelet/gum@v0.11.0...v0.12.0 *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@​charm), or on [Discord](https://charm.sh/chat). </details> <details> <summary>cli/cli (cli/cli)</summary> ### [`v2.39.2`](https://togithub.com/cli/cli/releases/tag/v2.39.2): GitHub CLI 2.39.2 [Compare Source](https://togithub.com/cli/cli/compare/v2.39.1...v2.39.2) #### What's Changed - build(deps): bump github.com/creack/pty from 1.1.20 to 1.1.21 by [@​dependabot](https://togithub.com/dependabot) in [cli/cli#8345 - `gh repo sync` should be able to sync a local branch with an upstream remote by [@​benebsiny](https://togithub.com/benebsiny) in [cli/cli#8229 - Update to latest go-gh by [@​samcoe](https://togithub.com/samcoe) in [cli/cli#8359 - Fix project status unmarshaling by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8384 **Full Changelog**: cli/cli@v2.39.1...v2.39.2 </details> <details> <summary>mikefarah/yq (mikefarah/yq)</summary> ### [`v4.40.3`](https://togithub.com/mikefarah/yq/releases/tag/v4.40.3): - Fixes JSON empty array bug [Compare Source](https://togithub.com/mikefarah/yq/compare/v4.40.2...v4.40.3) - Fixed JSON output issue with empty arrays [#​1880](https://togithub.com/mikefarah/yq/issues/1880) ### [`v4.40.2`](https://togithub.com/mikefarah/yq/releases/tag/v4.40.2): - Official [Compare Source](https://togithub.com/mikefarah/yq/compare/v4.40.1...v4.40.2) Thank you for all your support! I've fixed some of the issues that were kindly raised :) Happy to make the release official! - Do not panic when StdIn is closed ([#​1867](https://togithub.com/mikefarah/yq/issues/1867)) Thanks [@​aleskandro](https://togithub.com/aleskandro)! - Fixed issue when update against self [#​1869](https://togithub.com/mikefarah/yq/issues/1869) - Fixed multi doc anchor bug [#​1861](https://togithub.com/mikefarah/yq/issues/1861) - Fixes doc line separator issue when reading expression file [#​1860](https://togithub.com/mikefarah/yq/issues/1860) - Bumped dependencies ### [`v4.40.1`](https://togithub.com/mikefarah/yq/releases/tag/v4.40.1): - Engine refactor [Compare Source](https://togithub.com/mikefarah/yq/compare/v4.35.2...v4.40.1) I've done some overdue work on refactoring the core engine - pulling out the dependency on go-yaml. There are a couple of slight output changes (whitespace / document separators) in some niche scenarios - I think they are improvements, Bit nervous on releasing this, but all the tests are passing and I've added more tests! Love some early feedback :) - Added tonumber support - Added kind operator - Lua output fixes ([#​1811](https://togithub.com/mikefarah/yq/issues/1811)) - Thanks [@​Zash](https://togithub.com/Zash)! - Add support for Lua input ([#​1810](https://togithub.com/mikefarah/yq/issues/1810)) - Thanks [@​Zash](https://togithub.com/Zash)! - Bumped dependencies </details> <details> <summary>simulot/immich-go (simulot/immich-go)</summary> ### [`v0.8.7`](https://togithub.com/simulot/immich-go/releases/tag/0.8.7) [Compare Source](https://togithub.com/simulot/immich-go/compare/0.8.6...0.8.7) #### Changelog - [`875d965`](https://togithub.com/simulot/immich-go/commit/875d965) improvment: log can be written to log files - [`2546712`](https://togithub.com/simulot/immich-go/commit/2546712) more information on the log - [`7cd5d6e`](https://togithub.com/simulot/immich-go/commit/7cd5d6e) remove .MP from accepted files ### [`v0.8.6`](https://togithub.com/simulot/immich-go/releases/tag/0.8.6) [Compare Source](https://togithub.com/simulot/immich-go/compare/0.8.5...0.8.6) #### Release 0.8.6 ##### fix for [#​68](https://togithub.com/simulot/immich-go/issues/68): A lot of images skipped from Google Photos Takeout The Google takeout archive is full of traps. The difficulty is to associate all images with a JSON. Now more files are now imported. There still few missing files, but they are now listed. The program now reports how files are handled, or discarded. Upload report: 53998 scanned files 53993 handled files 26937 metadata files 535 uploaded files on the server 49 upgraded files on the server 1540 duplicated files in the input 8382 files already on the server 77 discarded files because in folder failed videos 1 discarded files because of options 16470 discarded files because server has a better image 1 files type not supported 1 errors 5 files without metadata file 7 files can't be handled File: Takeout/Google Photos/Photos from 2019/1556189729458-8d2e2d13-bca5-467e-a242-9e4cb238e(1).jpg File unhandled, missing JSON File: Takeout/Google Photos/Photos from 2022/original_1d4caa6f-16c6-4c3d-901b-9387de10e528_P(1).jpg File unhandled, missing JSON File: Takeout/Google Photos/Photos from 2022/original_af12c386-e334-4c57-88be-fdfadea71f16_P(1).jpg File unhandled, missing JSON File: Takeout/Google Photos/Photos from 2022/original_ec8d7b93-cbec-49c8-8707-38841db5e37d_P(1).jpg File unhandled, missing JSON File: Takeout/Google Photos/Photos from 2023/original_d3671642-c937-49c0-917a-8ef9cbb449c5_P(1).jpg File unhandled, missing JSON File: Takeout/Google Photos/user-generated-memory-titles.json Error , json: cannot unmarshal array into Go struct field GoogleMetaData.title of type string File: Takeout/archive_browser.html File type not supported Done. The plenty of rules for associating image to JSON are somewhat contradictory. I have to rethink the system for applying\ rules from the most common to the strangest ones. Still lot of work to deliver. #### Changelog - [`fde9232`](https://togithub.com/simulot/immich-go/commit/fde9232) [#​68](https://togithub.com/simulot/immich-go/issues/68): MP files - [`1e7e316`](https://togithub.com/simulot/immich-go/commit/1e7e316) [#​68](https://togithub.com/simulot/immich-go/issues/68): better error report - [`ef9958a`](https://togithub.com/simulot/immich-go/commit/ef9958a) [#​68](https://togithub.com/simulot/immich-go/issues/68): handling edge cases - [`9a09501`](https://togithub.com/simulot/immich-go/commit/9a09501) Merge branch 'Fix-for-[#​78](https://togithub.com/simulot/immich-go/issues/78)-mp4-files-do-not-get-imported' into [#​68](https://togithub.com/simulot/immich-go/issues/68)-Lot-of-images-is-missing - [`50c5bdf`](https://togithub.com/simulot/immich-go/commit/50c5bdf) WIP [#​68](https://togithub.com/simulot/immich-go/issues/68) - [`68d4d40`](https://togithub.com/simulot/immich-go/commit/68d4d40) edit release.md - [`6f26ece`](https://togithub.com/simulot/immich-go/commit/6f26ece) wip: better upload report ### [`v0.8.5`](https://togithub.com/simulot/immich-go/releases/tag/0.8.5) [Compare Source](https://togithub.com/simulot/immich-go/compare/0.8.4...0.8.5) #### Changelog - [`b8827c8`](https://togithub.com/simulot/immich-go/commit/b8827c8) fix for [#​78](https://togithub.com/simulot/immich-go/issues/78): mp4-files do not get imported ### [`v0.8.4`](https://togithub.com/simulot/immich-go/releases/tag/0.8.4) [Compare Source](https://togithub.com/simulot/immich-go/compare/0.8.3...0.8.4) #### Changelog - [`edc40a3`](https://togithub.com/simulot/immich-go/commit/edc40a3) doc: edit release.md - [`071b52d`](https://togithub.com/simulot/immich-go/commit/071b52d) fix [#​67](https://togithub.com/simulot/immich-go/issues/67): Live photos files are stacked and not recognized as live photos - [`fd62fa8`](https://togithub.com/simulot/immich-go/commit/fd62fa8) implement include / exclude options - [`f36888b`](https://togithub.com/simulot/immich-go/commit/f36888b) wip [#​67](https://togithub.com/simulot/immich-go/issues/67) - [`b93ceab`](https://togithub.com/simulot/immich-go/commit/b93ceab) wip [#​67](https://togithub.com/simulot/immich-go/issues/67): implement Live photos for folders - [`d959c75`](https://togithub.com/simulot/immich-go/commit/d959c75) wip [#​67](https://togithub.com/simulot/immich-go/issues/67): implement live photos for google takeouts - [`c214a49`](https://togithub.com/simulot/immich-go/commit/c214a49) wip: rename package assets in browser </details> <details> <summary>twpayne/chezmoi (twpayne/chezmoi)</summary> ### [`v2.42.0`](https://togithub.com/twpayne/chezmoi/releases/tag/v2.42.0) [Compare Source](https://togithub.com/twpayne/chezmoi/compare/v2.41.0...v2.42.0) #### Changelog ##### Features - [`694977b`](https://togithub.com/twpayne/chezmoi/commit/694977b90) feat: Preserve numeric types when reading from .chezmoidata JSON and JSONC files - [`1f11386`](https://togithub.com/twpayne/chezmoi/commit/1f1138688) feat: Preserve integer values in fromJson and fromJsonc template funcs - [`711a39a`](https://togithub.com/twpayne/chezmoi/commit/711a39a73) feat: Add read-source-state hook ##### Documentation updates - [`47609a3`](https://togithub.com/twpayne/chezmoi/commit/47609a3d7) docs: Add admonitions linking remove and forget - [`8784a67`](https://togithub.com/twpayne/chezmoi/commit/8784a6713) docs: Add links to blog posts </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/scottames/dots). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
****
Description
This PR fixes #8358
In our previous attempt to fix this, we tried some tricks in an attempt to unmarshal a fragment specified with a
graphql
struct tag into a single field with ajson
struct tag. As it turns out,shurcool
, our graphql library does not respectjson
tags at all. In its custom JSON decoder, it expects that fragments are unmarshalled into structs (which is pretty reasonable) so it was failing to discover the field we wanted the data to be unmarshaled into, erroring like so:This PR returns the top level
api
Project
structs to their old form, with onlyjson
struct tags, so that our own graphql client can decode GQL responses directly. We then take the shurcoolgraphql
struct tags and throw them onto private structs inside the functions that use the shurcool client. We then transform those responses into the top levelProject
types.We also add a bunch of tests here for good measure.