UnlockUserRepo will unlock a repo that was locked for migration. id is migration ID. You should unlock each migrated repository and delete them when the migration is complete and you no longer need the source data. GitHub API docs: https://docs.github.com/rest/migrations/users?apiVersion=2022-11-28
(ctx context.Context, id int64, repo string)
| 212 | // |
| 213 | //meta:operation DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock |
| 214 | func (s *MigrationService) UnlockUserRepo(ctx context.Context, id int64, repo string) (*Response, error) { |
| 215 | url := fmt.Sprintf("user/migrations/%v/repos/%v/lock", id, repo) |
| 216 | |
| 217 | req, err := s.client.NewRequest(ctx, "DELETE", url, nil) |
| 218 | if err != nil { |
| 219 | return nil, err |
| 220 | } |
| 221 | |
| 222 | req.Header.Set("Accept", mediaTypeMigrationsPreview) |
| 223 | |
| 224 | return s.client.Do(req, nil) |
| 225 | } |