GitLabgitlab-org
cli
main
1//go:build !integration
3package list
5import (
6 "encoding/json"
7 "testing"
8 "time"
10 "github.com/spf13/cobra"
11 "github.com/stretchr/testify/assert"
12 "github.com/stretchr/testify/require"
13 "go.uber.org/mock/gomock"
15 gitlab "gitlab.com/gitlab-org/api/client-go/v3"
16 gitlabtesting "gitlab.com/gitlab-org/api/client-go/v3/testing"
18 "gitlab.com/gitlab-org/cli/internal/api"
19 "gitlab.com/gitlab-org/cli/internal/testing/cmdtest"
20)
22// noMorePages creates a response that indicates no more pages are available
23func noMorePages() *gitlab.Response {
24 return &gitlab.Response{NextPage: 0}
25}
27func parseTime(s string) *time.Time {
28 t, _ := time.Parse(time.RFC3339, s)
29 return &t
30}
32func TestListProjectAccessToken(t *testing.T) {
33 type testCase struct {
34 name string
35 cli string
36 expectedOut string
37 wantErr bool
38 wantStderr string
39 setupMock func(tc *gitlabtesting.TestClient)
40 }
42 testProjectToken := &gitlab.ProjectAccessToken{
43 PersonalAccessToken: gitlab.PersonalAccessToken{
44 ID: 10179584,
45 UserID: 21973696,
46 Name: "sadfsdfsdf",
47 Description: "example description",
48 Scopes: []string{"api", "read_api"},
49 CreatedAt: parseTime("2024-07-07T07:59:35.767Z"),
50 ExpiresAt: new(gitlab.ISOTime(*parseTime("2024-08-06T00:00:00Z"))),
51 Active: true,
52 Revoked: false,
53 },
54 AccessLevel: gitlab.GuestPermissions,
55 }
57 testCases := []testCase{
58 {
59 name: "list project access token as text",
60 cli: "",
61 expectedOut: "ID NAME DESCRIPTION ACCESS_LEVEL ACTIVE REVOKED CREATED_AT EXPIRES_AT LAST_USED_AT SCOPES \n10179584 sadfsdfsdf example description guest true false 2024-07-07T07:59:35Z 2024-08-06 - api,read_api\n",
62 setupMock: func(tc *gitlabtesting.TestClient) {
63 tc.MockProjectAccessTokens.EXPECT().
64 ListProjectAccessTokens("OWNER/REPO", gomock.Any(), gomock.Any()).
65 Return([]*gitlab.ProjectAccessToken{testProjectToken}, noMorePages(), nil)
66 },
67 },
68 {
69 name: "list project access token as json",
70 cli: "--output json",
71 setupMock: func(tc *gitlabtesting.TestClient) {
72 tc.MockProjectAccessTokens.EXPECT().
73 ListProjectAccessTokens("OWNER/REPO", gomock.Any(), gomock.Any()).
74 Return([]*gitlab.ProjectAccessToken{testProjectToken}, noMorePages(), nil)
75 },
76 },
77 }
79 for _, tc := range testCases {
80 t.Run(tc.name, func(t *testing.T) {
81 // GIVEN
82 testClient := gitlabtesting.NewTestClient(t)
83 tc.setupMock(testClient)
84 exec := cmdtest.SetupCmdForTest(
85 t,
86 NewCmdList,
87 true,
88 cmdtest.WithApiClient(cmdtest.NewTestApiClient(t, nil, "", "", api.WithGitLabClient(testClient.Client))),
89 )
91 // WHEN
92 out, err := exec(tc.cli)
94 // THEN
95 if tc.wantErr {
96 require.Error(t, err)
97 assert.Contains(t, err.Error(), tc.wantStderr)
98 return
99 }
100 require.NoError(t, err)
101 if tc.expectedOut != "" {
102 assert.Equal(t, tc.expectedOut, out.OutBuf.String())
103 }
104 if tc.cli == "--output json" {
105 // For JSON output, verify it's valid JSON
106 var result []map[string]any
107 err := json.Unmarshal(out.OutBuf.Bytes(), &result)
108 require.NoError(t, err)
109 assert.Len(t, result, 1)
110 }
111 assert.Empty(t, out.ErrBuf.String())
112 })
113 }
114}
116func TestListGroupAccessToken(t *testing.T) {
117 type testCase struct {
118 name string
119 cli string
120 expectedOut string
121 wantErr bool
122 wantStderr string
123 setupMock func(tc *gitlabtesting.TestClient)
124 }
126 testGroupToken := &gitlab.GroupAccessToken{
127 PersonalAccessToken: gitlab.PersonalAccessToken{
128 ID: 10179685,
129 UserID: 21973881,
130 Name: "sadfsdfsdf",
131 Description: "example description",
132 Scopes: []string{"read_api"},
133 CreatedAt: parseTime("2024-07-07T08:41:16.287Z"),
134 ExpiresAt: new(gitlab.ISOTime(*parseTime("2024-08-06T00:00:00Z"))),
135 Active: true,
136 Revoked: false,
137 },
138 AccessLevel: gitlab.GuestPermissions,
139 }
141 testCases := []testCase{
142 {
143 name: "list group access token as text",
144 cli: "--group GROUP",
145 expectedOut: "ID NAME DESCRIPTION ACCESS_LEVEL ACTIVE REVOKED CREATED_AT EXPIRES_AT LAST_USED_AT SCOPES \n10179685 sadfsdfsdf example description guest true false 2024-07-07T08:41:16Z 2024-08-06 - read_api\n",
146 setupMock: func(tc *gitlabtesting.TestClient) {
147 tc.MockGroupAccessTokens.EXPECT().
148 ListGroupAccessTokens("GROUP", gomock.Any(), gomock.Any()).
149 Return([]*gitlab.GroupAccessToken{testGroupToken}, noMorePages(), nil)
150 },
151 },
152 {
153 name: "list group access token as json",
154 cli: "--group GROUP --output json",
155 setupMock: func(tc *gitlabtesting.TestClient) {
156 tc.MockGroupAccessTokens.EXPECT().
157 ListGroupAccessTokens("GROUP", gomock.Any(), gomock.Any()).
158 Return([]*gitlab.GroupAccessToken{testGroupToken}, noMorePages(), nil)
159 },
160 },
161 }
163 for _, tc := range testCases {
164 t.Run(tc.name, func(t *testing.T) {
165 // GIVEN
166 testClient := gitlabtesting.NewTestClient(t)
167 tc.setupMock(testClient)
168 exec := cmdtest.SetupCmdForTest(
169 t,
170 NewCmdList,
171 true,
172 cmdtest.WithApiClient(cmdtest.NewTestApiClient(t, nil, "", "", api.WithGitLabClient(testClient.Client))),
173 )
175 // WHEN
176 out, err := exec(tc.cli)
178 // THEN
179 if tc.wantErr {
180 require.Error(t, err)
181 assert.Contains(t, err.Error(), tc.wantStderr)
182 return
183 }
184 require.NoError(t, err)
185 if tc.expectedOut != "" {
186 assert.Equal(t, tc.expectedOut, out.OutBuf.String())
187 }
188 if tc.cli == "--group GROUP --output json" {
189 // For JSON output, verify it's valid JSON
190 var result []map[string]any
191 err := json.Unmarshal(out.OutBuf.Bytes(), &result)
192 require.NoError(t, err)
193 assert.Len(t, result, 1)
194 }
195 assert.Empty(t, out.ErrBuf.String())
196 })
197 }
198}
200func TestListPersonalAccessToken(t *testing.T) {
201 type testCase struct {
202 name string
203 cli string
204 expectedOut string
205 wantErr bool
206 wantStderr string
207 setupMock func(tc *gitlabtesting.TestClient)
208 }
210 testUser := &gitlab.User{
211 ID: 1,
212 Username: "johndoe",
213 Name: "John Doe",
214 Email: "john.doe@acme.com",
215 }
217 testPATs := []*gitlab.PersonalAccessToken{
218 {
219 ID: 9860015,
220 Name: "awsssm",
221 Description: "example description 1",
222 Scopes: []string{"api"},
223 CreatedAt: parseTime("2024-05-29T07:25:56.846Z"),
224 ExpiresAt: new(gitlab.ISOTime(*parseTime("2024-06-28T00:00:00Z"))),
225 UserID: 926857,
226 Active: false,
227 Revoked: false,
228 },
229 {
230 ID: 9860076,
231 Name: "glab",
232 Description: "example description 2",
233 Scopes: []string{"api"},
234 CreatedAt: parseTime("2024-05-29T07:34:14.044Z"),
235 ExpiresAt: new(gitlab.ISOTime(*parseTime("2024-06-28T00:00:00Z"))),
236 UserID: 926857,
237 LastUsedAt: parseTime("2024-06-05T17:32:34.466Z"),
238 Active: false,
239 Revoked: false,
240 },
241 {
242 ID: 10171440,
243 Name: "api",
244 Description: "example description 3",
245 Scopes: []string{"api"},
246 CreatedAt: parseTime("2024-07-05T10:02:37.182Z"),
247 ExpiresAt: new(gitlab.ISOTime(*parseTime("2024-08-04T00:00:00Z"))),
248 UserID: 926857,
249 LastUsedAt: parseTime("2024-07-07T20:02:49.595Z"),
250 Active: true,
251 Revoked: false,
252 },
253 }
255 testCases := []testCase{
256 {
257 name: "list personal access tokens as text",
258 cli: "--user @me",
259 expectedOut: "ID NAME DESCRIPTION ACCESS_LEVEL ACTIVE REVOKED CREATED_AT EXPIRES_AT LAST_USED_AT SCOPES \n9860015 awsssm example description 1 - false false 2024-05-29T07:25:56Z 2024-06-28 - api \n9860076 glab example description 2 - false false 2024-05-29T07:34:14Z 2024-06-28 2024-06-05T17:32:34Z api \n10171440 api example description 3 - true false 2024-07-05T10:02:37Z 2024-08-04 2024-07-07T20:02:49Z api \n",
260 setupMock: func(tc *gitlabtesting.TestClient) {
261 tc.MockUsers.EXPECT().
262 CurrentUser(gomock.Any()).
263 Return(testUser, nil, nil)
264 tc.MockPersonalAccessTokens.EXPECT().
265 ListPersonalAccessTokens(gomock.Any(), gomock.Any()).
266 Return(testPATs, noMorePages(), nil)
267 },
268 },
269 {
270 name: "list active personal access tokens only",
271 cli: "--user @me --active",
272 expectedOut: "ID NAME DESCRIPTION ACCESS_LEVEL ACTIVE REVOKED CREATED_AT EXPIRES_AT LAST_USED_AT SCOPES \n10171440 api example description 3 - true false 2024-07-05T10:02:37Z 2024-08-04 2024-07-07T20:02:49Z api \n",
273 setupMock: func(tc *gitlabtesting.TestClient) {
274 tc.MockUsers.EXPECT().
275 CurrentUser(gomock.Any()).
276 Return(testUser, nil, nil)
277 tc.MockPersonalAccessTokens.EXPECT().
278 ListPersonalAccessTokens(gomock.Any(), gomock.Any()).
279 Return(testPATs, noMorePages(), nil)
280 },
281 },
282 {
283 name: "list personal access tokens as json",
284 cli: "--user @me --output json",
285 setupMock: func(tc *gitlabtesting.TestClient) {
286 tc.MockUsers.EXPECT().
287 CurrentUser(gomock.Any()).
288 Return(testUser, nil, nil)
289 tc.MockPersonalAccessTokens.EXPECT().
290 ListPersonalAccessTokens(gomock.Any(), gomock.Any()).
291 Return(testPATs, noMorePages(), nil)
292 },
293 },
294 {
295 name: "list active personal access tokens as json",
296 cli: "--user @me --active --output json",
297 setupMock: func(tc *gitlabtesting.TestClient) {
298 tc.MockUsers.EXPECT().
299 CurrentUser(gomock.Any()).
300 Return(testUser, nil, nil)
301 tc.MockPersonalAccessTokens.EXPECT().
302 ListPersonalAccessTokens(gomock.Any(), gomock.Any()).
303 Return(testPATs, noMorePages(), nil)
304 },
305 },
306 }
308 for _, tc := range testCases {
309 t.Run(tc.name, func(t *testing.T) {
310 // GIVEN
311 testClient := gitlabtesting.NewTestClient(t)
312 tc.setupMock(testClient)
313 exec := cmdtest.SetupCmdForTest(
314 t,
315 NewCmdList,
316 true,
317 cmdtest.WithApiClient(cmdtest.NewTestApiClient(t, nil, "", "", api.WithGitLabClient(testClient.Client))),
318 )
320 // WHEN
321 out, err := exec(tc.cli)
323 // THEN
324 if tc.wantErr {
325 require.Error(t, err)
326 assert.Contains(t, err.Error(), tc.wantStderr)
327 return
328 }
329 require.NoError(t, err)
330 if tc.expectedOut != "" {
331 assert.Equal(t, tc.expectedOut, out.OutBuf.String())
332 }
333 if tc.cli == "--user @me --output json" {
334 // For JSON output, verify it's valid JSON
335 var result []map[string]any
336 err := json.Unmarshal(out.OutBuf.Bytes(), &result)
337 require.NoError(t, err)
338 assert.Len(t, result, 3)
339 }
340 if tc.cli == "--user @me --active --output json" {
341 // For JSON output with --active flag, verify only active tokens are returned
342 var result []map[string]any
343 err := json.Unmarshal(out.OutBuf.Bytes(), &result)
344 require.NoError(t, err)
345 assert.Len(t, result, 1, "should only return 1 active token")
346 // Verify the returned token is the active one
347 assert.Equal(t, "10171440", result[0]["id"])
348 assert.Equal(t, "true", result[0]["active"])
349 }
350 assert.Empty(t, out.ErrBuf.String())
351 })
352 }
353}
355func TestListPersonalAccessTokenWithoutExpiration(t *testing.T) {
356 testUser := &gitlab.User{
357 ID: 1,
358 Username: "johndoe",
359 Name: "John Doe",
360 Email: "john.doe@acme.com",
361 }
363 testPATs := []*gitlab.PersonalAccessToken{
364 {
365 ID: 1,
366 Name: "awsssm",
367 Scopes: []string{"api"},
368 CreatedAt: parseTime("2024-05-29T07:25:56.846Z"),
369 ExpiresAt: nil, // no expiration
370 UserID: 926857,
371 Active: false,
372 Revoked: false,
373 },
374 {
375 ID: 2,
376 Name: "glab",
377 Scopes: []string{"api"},
378 CreatedAt: parseTime("2024-05-29T07:34:14.044Z"),
379 ExpiresAt: new(gitlab.ISOTime(*parseTime("2024-06-28T00:00:00Z"))),
380 UserID: 926857,
381 LastUsedAt: parseTime("2024-06-05T17:32:34.466Z"),
382 Active: false,
383 Revoked: false,
384 },
385 {
386 ID: 3,
387 Name: "api",
388 Scopes: []string{"api"},
389 CreatedAt: parseTime("2024-07-05T10:02:37.182Z"),
390 ExpiresAt: new(gitlab.ISOTime(*parseTime("2024-08-04T00:00:00Z"))),
391 UserID: 926857,
392 LastUsedAt: parseTime("2024-07-07T20:02:49.595Z"),
393 Active: true,
394 Revoked: false,
395 },
396 }
398 // GIVEN
399 testClient := gitlabtesting.NewTestClient(t)
400 testClient.MockUsers.EXPECT().
401 CurrentUser(gomock.Any()).
402 Return(testUser, nil, nil)
403 testClient.MockPersonalAccessTokens.EXPECT().
404 ListPersonalAccessTokens(gomock.Any(), gomock.Any()).
405 Return(testPATs, noMorePages(), nil)
407 exec := cmdtest.SetupCmdForTest(
408 t,
409 NewCmdList,
410 true,
411 cmdtest.WithApiClient(cmdtest.NewTestApiClient(t, nil, "", "", api.WithGitLabClient(testClient.Client))),
412 )
414 // WHEN
415 out, err := exec("--user @me")
417 // THEN
418 require.NoError(t, err)
419 assert.Equal(t, "ID NAME DESCRIPTION ACCESS_LEVEL ACTIVE REVOKED CREATED_AT EXPIRES_AT LAST_USED_AT SCOPES \n1 awsssm - - false false 2024-05-29T07:25:56Z - - api \n2 glab - - false false 2024-05-29T07:34:14Z 2024-06-28 2024-06-05T17:32:34Z api \n3 api - - true false 2024-07-05T10:02:37Z 2024-08-04 2024-07-07T20:02:49Z api \n", out.OutBuf.String())
420 assert.Empty(t, out.ErrBuf.String())
421}
423func TestList_Completions(t *testing.T) {
424 testClient := gitlabtesting.NewTestClient(t)
425 // No mock expectations: completions must not call the API.
426 f := cmdtest.NewTestFactory(nil,
427 cmdtest.WithApiClient(cmdtest.NewTestApiClient(t, nil, "", "", api.WithGitLabClient(testClient.Client))),
428 )
430 cmd := NewCmdList(f)
431 cmd.SetContext(t.Context())
433 testCases := map[string]struct {
434 wantComps []cobra.Completion
435 wantDirective cobra.ShellCompDirective
436 }{
437 "group": {wantDirective: cobra.ShellCompDirectiveNoFileComp},
438 "user": {
439 wantComps: []cobra.Completion{cobra.CompletionWithDesc("@me", "Current user")},
440 wantDirective: cobra.ShellCompDirectiveNoFileComp,
441 },
442 }
444 for flag, tc := range testCases {
445 t.Run(flag, func(t *testing.T) {
446 compFn, ok := cmd.GetFlagCompletionFunc(flag)
447 require.True(t, ok, "--%s should have a completion function registered", flag)
449 comps, directive := compFn(cmd, nil, "")
450 assert.Equal(t, tc.wantComps, comps)
451 assert.Equal(t, tc.wantDirective, directive)
452 })
453 }
454}
Diagnostics8 git calls · 226 ms
CallStatusSizeTime0226 ms
discover200185 B2 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=185 git.server.agent=git/2.56.g1891de4-Linux git.server.object_format=sha1 git.server.caps=agent ls-refs fetch server-option object-format git.server.fetch=shallow wait-for-done filter git.protocol.version=2 git.pkt.frames=9 git.pkt.data=7 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=185 git.pkt.payload.max=35
ls-refs20058 KiB · hit3 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 git.response.bytes=59849 git.response.cache=HIT git.response.duration_ms=3 git.protocol.version=2 git.pkt.frames=731 git.pkt.data=730 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=59849 git.pkt.payload.max=143 git.ls_refs.count=730 git.ls_refs.head=refs/heads/main
fetchtree:0 · deepen 1020032 KiB · hit2 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=2 git.response.bytes=32926 git.response.cache=HIT git.response.duration_ms=2 git.fetch.filter=tree:0 git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9 git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=22 git.pkt.data=20 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=32926 git.pkt.payload.max=32046 git.sideband.band1.bytes=32046 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=80 git.pack.bytes=32046 git.pack.ofs_delta=36 git.pack.ref_delta=0 git.pack.chain.max=2 git.pack.trailer=cb0bad5d7ffc514895d8b21c4dd470327f90bc91 git.pack.full=44Open pack map
fetchcombine:blob:none+tree:2 · deepen 12004.2 KiB · hit4 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=4 git.response.bytes=4273 git.response.cache=HIT git.response.duration_ms=4 git.fetch.filter=combine:blob:none+tree:2 git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9 git.fetch.haves.count=0 git.fetch.deepen=1 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=7 git.pkt.data=5 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=4273 git.pkt.payload.max=4173 git.sideband.band1.bytes=4173 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=11 git.pack.bytes=4173 git.fetch.wide.objects=11 git.fetch.wide.extra_bytes=3930 git.fetch.wide.blobs=0
fetchtree:02001.8 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=1857 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=dce174ff8c632a19d17eea99c8a9b7c37fb2b592 git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=1857 git.pkt.payload.max=1830 git.sideband.band1.bytes=1830 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=1830 git.pack.trailer=fb03183b7909876778f740d196d7516811003517Open pack map
fetchtree:0200358 B · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=358 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=218b543e075f31e84c52193d193103408c52cb34 git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=358 git.pkt.payload.max=331 git.sideband.band1.bytes=331 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=331 git.pack.trailer=fbb77d44047cd3e1ee682eb9483227c59489e50fOpen pack map
fetchtree:0200166 B · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=166 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=7ffadcddc38f99e36058507eb8d63e0e25e9ea92 git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=166 git.pkt.payload.max=139 git.sideband.band1.bytes=139 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=139 git.pack.trailer=6fdee11b341c1742d386c579f67477f500331d89Open pack map
fetch2002.6 KiB210 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=210 git.response.bytes=2668 git.response.cache=MISS git.response.duration_ms=210 git.fetch.wants=4eafa193bc265d38f763ee604b179df0dbbb75a2 git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=2668 git.pkt.payload.max=2641 git.sideband.band1.bytes=2641 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://gitlab.com/gitlab-org/cli
- Ref
- refs/heads/main
- Commit
- 0dd7574dce9e385c5c30540e6c15657adc6bdce9
- cf-ray
- a5e2ca53ac894b67
- Request
- 83ff7e52…
- Protocol
- v2 · sha1
- Agent
- git/2.56.g1891de4-Linux
- Filter
- advertised
- Fetch
- shallow wait-for-done filter
- Capabilities
- agent ls-refs fetch server-option object-format