{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":654464680,"defaultBranch":"main","name":"cli","ownerLogin":"matthewhughes-uw","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2023-06-16T07:29:27.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/128392218?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1689679388.0","currentOid":""},"activityList":{"items":[{"before":"3722ed518f5fcbb5a54e0b1d8524a6ef72483f67","after":null,"ref":"refs/heads/fix-panic-on-empty-pagination","pushedAt":"2023-07-18T11:23:08.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"matthewhughes-uw","name":"Matt Hughes","path":"/matthewhughes-uw","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/128392218?s=80&v=4"}},{"before":"93e14bad40b6a2107138c160b20fc2ff7f0864e8","after":"3722ed518f5fcbb5a54e0b1d8524a6ef72483f67","ref":"refs/heads/fix-panic-on-empty-pagination","pushedAt":"2023-07-18T07:52:58.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"matthewhughes-uw","name":"Matt Hughes","path":"/matthewhughes-uw","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/128392218?s=80&v=4"},"commit":{"message":"Fix panic when paginating on empty GQL response\n\nFixes a panic in `opslevel graphql` when you attempt to paginate over a\nresponse with `\"endCursor\": null`. This can be triggered with the\nfollowing script (assuming there's no team with alias\n`\"does-not-exist\"`):\n\n #!/bin/bash\n\n QUERY='query($endCursor: String) {\n account {\n services(ownerAlias: \"does-not-exist\", after: $endCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n name\n }\n }\n }\n }'\n\n opslevel graphql --paginate --query \"$QUERY\"\n\nSample panic from running that script before this change:\n\n $ OPSLEVEL_API_TOKEN= ./script\n panic: runtime error: index out of range [1] with length 0\n\n goroutine 1 [running]:\n github.com/opslevel/cli/cmd.glob..func21(0x17c9400?, {0xf6e323?, 0x3?, 0x3?})\n /home/user/src/opslevel-cli/src/cmd/graphql.go:145 +0xb0c\n github.com/spf13/cobra.(*Command).execute(0x17c9400, {0xc0002a2720, 0x3, 0x3})\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847\n github.com/spf13/cobra.(*Command).ExecuteC(0x17bf300)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd\n github.com/spf13/cobra.(*Command).Execute(...)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\n github.com/opslevel/cli/cmd.Execute({0xf6d94e?, 0x0?}, {0xdf7f00?, 0xc0000061a0?})\n /home/user/src/opslevel-cli/src/cmd/root.go:29 +0x4a\n main.main()\n /home/user/src/opslevel-cli/src/main.go:13 +0x35","shortMessageHtmlLink":"Fix panic when paginating on empty GQL response"}},{"before":"53e9520d2a9e2031cc1658c94d6b0b6bfe89c4a6","after":"93e14bad40b6a2107138c160b20fc2ff7f0864e8","ref":"refs/heads/fix-panic-on-empty-pagination","pushedAt":"2023-06-16T07:40:29.582Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"matthewhughes-uw","name":"Matt Hughes","path":"/matthewhughes-uw","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/128392218?s=80&v=4"},"commit":{"message":"Fix panic when paginating on empty GQL response\n\nFixes a panic in `opslevel graphql` when you attempt to paginate over a\nresponse with `\"endCursor\": null`. This can be triggered with the\nfollowing script (assuming there's no team with alias\n`\"does-not-exist\"`):\n\n #!/bin/bash\n\n QUERY='query($endCursor: String) {\n account {\n services(ownerAlias: \"does-not-exist\", after: $endCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n name\n }\n }\n }\n }'\n\n opslevel graphql --paginate --query \"$QUERY\"\n\nSample panic from running that script before this change:\n\n $ OPSLEVEL_API_TOKEN= ./script\n panic: runtime error: index out of range [1] with length 0\n\n goroutine 1 [running]:\n github.com/opslevel/cli/cmd.glob..func21(0x17c9400?, {0xf6e323?, 0x3?, 0x3?})\n /home/user/src/opslevel-cli/src/cmd/graphql.go:145 +0xb0c\n github.com/spf13/cobra.(*Command).execute(0x17c9400, {0xc0002a2720, 0x3, 0x3})\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847\n github.com/spf13/cobra.(*Command).ExecuteC(0x17bf300)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd\n github.com/spf13/cobra.(*Command).Execute(...)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\n github.com/opslevel/cli/cmd.Execute({0xf6d94e?, 0x0?}, {0xdf7f00?, 0xc0000061a0?})\n /home/user/src/opslevel-cli/src/cmd/root.go:29 +0x4a\n main.main()\n /home/user/src/opslevel-cli/src/main.go:13 +0x35","shortMessageHtmlLink":"Fix panic when paginating on empty GQL response"}},{"before":"3b2f27ad9e7636246a0d464169de0c0437c9d6e1","after":"53e9520d2a9e2031cc1658c94d6b0b6bfe89c4a6","ref":"refs/heads/fix-panic-on-empty-pagination","pushedAt":"2023-06-16T07:38:49.582Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"matthewhughes-uw","name":"Matt Hughes","path":"/matthewhughes-uw","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/128392218?s=80&v=4"},"commit":{"message":"Fix panic when paginating on empty GQL response\n\nFixes a panic in `opslevel graphql` when you attempt to paginate over a\nresponse with `\"endCursor\": null`. This can be triggered with the\nfollowing script (assuming there's no team with alias\n`\"does-not-exist\"`):\n\n #!/bin/bash\n\n QUERY='query($endCursor: String) {\n account {\n services(ownerAlias: \"does-not-exist\", after: $endCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n name\n }\n }\n }\n }'\n\n opslevel graphql --paginate --query \"$QUERY\"\n\nSample panic from running that script before this change:\n\n $ OPSLEVEL_API_TOKEN= ./script\n panic: runtime error: index out of range [1] with length 0\n\n goroutine 1 [running]:\n github.com/opslevel/cli/cmd.glob..func21(0x17c9400?, {0xf6e323?, 0x3?, 0x3?})\n /home/user/src/opslevel-cli/src/cmd/graphql.go:145 +0xb0c\n github.com/spf13/cobra.(*Command).execute(0x17c9400, {0xc0002a2720, 0x3, 0x3})\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847\n github.com/spf13/cobra.(*Command).ExecuteC(0x17bf300)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd\n github.com/spf13/cobra.(*Command).Execute(...)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\n github.com/opslevel/cli/cmd.Execute({0xf6d94e?, 0x0?}, {0xdf7f00?, 0xc0000061a0?})\n /home/user/src/opslevel-cli/src/cmd/root.go:29 +0x4a\n main.main()\n /home/user/src/opslevel-cli/src/main.go:13 +0x35","shortMessageHtmlLink":"Fix panic when paginating on empty GQL response"}},{"before":"7075c97ba4387c650df25077cbd6cf25ae0ac8fd","after":"3b2f27ad9e7636246a0d464169de0c0437c9d6e1","ref":"refs/heads/fix-panic-on-empty-pagination","pushedAt":"2023-06-16T07:38:05.376Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"matthewhughes-uw","name":"Matt Hughes","path":"/matthewhughes-uw","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/128392218?s=80&v=4"},"commit":{"message":"Fix panic when paginating on empty GQL response\n\nFixes a panic in `opslevel graphql` when you attempt to paginate over a\nresponse with `\"endCursor\": null`. This can be triggered with the\nfollowing script (assuming there's no team with alias\n`\"does-not-exist\"`):\n\n #!/bin/bash\n\n QUERY='query($endCursor: String) {\n account {\n services(ownerAlias: \"does-not-exist\", after: $endCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n name\n }\n }\n }\n }'\n\n opslevel graphql --paginate --query \"$QUERY\"\n\nSample panic from running this:\n\n $ OPSLEVEL_API_TOKEN= ./script\n panic: runtime error: index out of range [1] with length 0\n\n goroutine 1 [running]:\n github.com/opslevel/cli/cmd.glob..func21(0x17c9400?, {0xf6e323?, 0x3?, 0x3?})\n /home/user/src/opslevel-cli/src/cmd/graphql.go:145 +0xb0c\n github.com/spf13/cobra.(*Command).execute(0x17c9400, {0xc0002a2720, 0x3, 0x3})\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847\n github.com/spf13/cobra.(*Command).ExecuteC(0x17bf300)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd\n github.com/spf13/cobra.(*Command).Execute(...)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\n github.com/opslevel/cli/cmd.Execute({0xf6d94e?, 0x0?}, {0xdf7f00?, 0xc0000061a0?})\n /home/user/src/opslevel-cli/src/cmd/root.go:29 +0x4a\n main.main()\n /home/user/src/opslevel-cli/src/main.go:13 +0x35","shortMessageHtmlLink":"Fix panic when paginating on empty GQL response"}},{"before":"c55c617c8d096ec3674084364d2ebe786863b8d7","after":"7075c97ba4387c650df25077cbd6cf25ae0ac8fd","ref":"refs/heads/fix-panic-on-empty-pagination","pushedAt":"2023-06-16T07:36:31.972Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"matthewhughes-uw","name":"Matt Hughes","path":"/matthewhughes-uw","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/128392218?s=80&v=4"},"commit":{"message":"Fix panic when paginating on empty GQL response\n\nFixes a panic in `opslevel graphql` when you attempt to paginate over a\nresponse with `\"endCursor\": null`. This can be triggered with the\nfollowing script (assuming there's no team with alias\n`\"does-not-exist\"`):\n\n #!/bin/bash\n\n QUERY='query($endCursor: String) {\n account {\n services(ownerAlias: \"does-not-exist\", after: $endCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n name\n }\n }\n }\n }'\n\n opslevel graphql --paginate --query \"$QUERY\"\n\nSample panic from running this:\n\n $ OPSLEVEL_API_TOKEN= ./script\n panic: runtime error: index out of range [1] with length 0\n\n goroutine 1 [running]:\n github.com/opslevel/cli/cmd.glob..func21(0x17c9400?, {0xf6e323?, 0x3?, 0x3?})\n /home/user/src/opslevel-cli/src/cmd/graphql.go:145 +0xb0c\n github.com/spf13/cobra.(*Command).execute(0x17c9400, {0xc0002a2720, 0x3, 0x3})\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847\n github.com/spf13/cobra.(*Command).ExecuteC(0x17bf300)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd\n github.com/spf13/cobra.(*Command).Execute(...)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\n github.com/opslevel/cli/cmd.Execute({0xf6d94e?, 0x0?}, {0xdf7f00?, 0xc0000061a0?})\n /home/user/src/opslevel-cli/src/cmd/root.go:29 +0x4a\n main.main()\n /home/user/src/opslevel-cli/src/main.go:13 +0x35","shortMessageHtmlLink":"Fix panic when paginating on empty GQL response"}},{"before":null,"after":"c55c617c8d096ec3674084364d2ebe786863b8d7","ref":"refs/heads/fix-panic-on-empty-pagination","pushedAt":"2023-06-16T07:34:55.843Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"matthewhughes-uw","name":"Matt Hughes","path":"/matthewhughes-uw","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/128392218?s=80&v=4"},"commit":{"message":"Fix panic when paginating on empty GQL response\n\nFixes a panic in `opslevel graphql` when you attempt to paginate over a\nresponse with `\"endCursor\": null`. This can be triggered with the\nfollowing script (assuming there's no team with alias\n`\"does-not-exist\"`):\n\n #!/bin/bash\n\n QUERY='query($endCursor: String) {\n account {\n services(ownerAlias: \"does-not-exist\", after: $endCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n name\n }\n }\n }\n }'\n\n opslevel graphql --paginate --query \"$QUERY\"\n\nSample panic from running this:\n\n $ OPSLEVEL_API_TOKEN= ./script\n panic: runtime error: index out of range [1] with length 0\n\n goroutine 1 [running]:\n github.com/opslevel/cli/cmd.glob..func21(0x17c9400?, {0xf6e323?, 0x3?, 0x3?})\n /home/user/src/opslevel-cli/src/cmd/graphql.go:145 +0xb0c\n github.com/spf13/cobra.(*Command).execute(0x17c9400, {0xc0002a2720, 0x3, 0x3})\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847\n github.com/spf13/cobra.(*Command).ExecuteC(0x17bf300)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd\n github.com/spf13/cobra.(*Command).Execute(...)\n /home/user/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\n github.com/opslevel/cli/cmd.Execute({0xf6d94e?, 0x0?}, {0xdf7f00?, 0xc0000061a0?})\n /home/user/src/opslevel-cli/src/cmd/root.go:29 +0x4a\n main.main()\n /home/user/src/opslevel-cli/src/main.go:13 +0x35","shortMessageHtmlLink":"Fix panic when paginating on empty GQL response"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADV9J_AQA","startCursor":null,"endCursor":null}},"title":"Activity ยท matthewhughes-uw/cli"}