MCPcopy Index your code
hub / github.com/google/go-github / UnlockUserRepo

Method UnlockUserRepo

github/migrations_user.go:214–225  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

212//
213//meta:operation DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock
214func (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}

Callers 1

Calls 2

NewRequestMethod · 0.80
DoMethod · 0.45

Tested by 1