ListUserMigrations lists the most recent migrations. GitHub API docs: https://docs.github.com/rest/migrations/users?apiVersion=2022-11-28#list-user-migrations meta:operation GET /user/migrations
(ctx context.Context, opts *ListOptions)
| 101 | // |
| 102 | //meta:operation GET /user/migrations |
| 103 | func (s *MigrationService) ListUserMigrations(ctx context.Context, opts *ListOptions) ([]*UserMigration, *Response, error) { |
| 104 | u := "user/migrations" |
| 105 | u, err := addOptions(u, opts) |
| 106 | if err != nil { |
| 107 | return nil, nil, err |
| 108 | } |
| 109 | |
| 110 | req, err := s.client.NewRequest(ctx, "GET", u, nil) |
| 111 | if err != nil { |
| 112 | return nil, nil, err |
| 113 | } |
| 114 | |
| 115 | req.Header.Set("Accept", mediaTypeMigrationsPreview) |
| 116 | |
| 117 | var m []*UserMigration |
| 118 | resp, err := s.client.Do(req, &m) |
| 119 | if err != nil { |
| 120 | return nil, resp, err |
| 121 | } |
| 122 | |
| 123 | return m, resp, nil |
| 124 | } |
| 125 | |
| 126 | // UserMigrationStatus gets the status of a specific migration archive. |
| 127 | // id is the migration ID. |