From 85bf1df2bfdc49b3050d4a91e4cf13c3996da6a7 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Mon, 15 Apr 2024 17:12:59 -0500 Subject: [PATCH] feat: remove deprecated migration import endpoints and reorder bypass_actors.actor_type enum values to be in alphabetical order (#731) BREAKING CHANGE: Remove deprecated migration import endpoints --- docs/migrations/cancelImport.md | 48 ----- docs/migrations/getCommitAuthors.md | 55 ------ docs/migrations/getImportStatus.md | 81 --------- docs/migrations/getLargeFiles.md | 48 ----- docs/migrations/mapCommitAuthor.md | 63 ------- docs/migrations/setLfsPreference.md | 58 ------ docs/migrations/startImport.md | 76 -------- docs/migrations/updateImport.md | 73 -------- .../update-endpoints/generated/endpoints.json | 8 +- src/generated/endpoints.ts | 64 ------- src/generated/method-types.ts | 172 ------------------ .../parameters-and-response-types.ts | 40 ---- 12 files changed, 4 insertions(+), 782 deletions(-) delete mode 100644 docs/migrations/cancelImport.md delete mode 100644 docs/migrations/getCommitAuthors.md delete mode 100644 docs/migrations/getImportStatus.md delete mode 100644 docs/migrations/getLargeFiles.md delete mode 100644 docs/migrations/mapCommitAuthor.md delete mode 100644 docs/migrations/setLfsPreference.md delete mode 100644 docs/migrations/startImport.md delete mode 100644 docs/migrations/updateImport.md diff --git a/docs/migrations/cancelImport.md b/docs/migrations/cancelImport.md deleted file mode 100644 index 6a5cb5856..000000000 --- a/docs/migrations/cancelImport.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -name: Cancel an import -example: octokit.rest.migrations.cancelImport({ owner, repo }) -route: DELETE /repos/{owner}/{repo}/import -scope: migrations -type: API method ---- - -# Cancel an import - -**This method is deprecated.** - -Stop an import for a repository. - -**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - -```js -octokit.rest.migrations.cancelImport({ - owner, - repo, -}); -``` - -## Parameters - - - - - - - - - - - - - -
namerequireddescription
owneryes - -The account owner of the repository. The name is not case sensitive. - -
repoyes - -The name of the repository without the `.git` extension. The name is not case sensitive. - -
- -See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/migrations/source-imports#cancel-an-import). diff --git a/docs/migrations/getCommitAuthors.md b/docs/migrations/getCommitAuthors.md deleted file mode 100644 index 3f893b0b4..000000000 --- a/docs/migrations/getCommitAuthors.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: Get commit authors -example: octokit.rest.migrations.getCommitAuthors({ owner, repo }) -route: GET /repos/{owner}/{repo}/import/authors -scope: migrations -type: API method ---- - -# Get commit authors - -**This method is deprecated.** - -Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - -This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. - -**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - -```js -octokit.rest.migrations.getCommitAuthors({ - owner, - repo, -}); -``` - -## Parameters - - - - - - - - - - - - - - -
namerequireddescription
owneryes - -The account owner of the repository. The name is not case sensitive. - -
repoyes - -The name of the repository without the `.git` extension. The name is not case sensitive. - -
sinceno - -A user ID. Only return users with an ID greater than this ID. - -
- -See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/migrations/source-imports#get-commit-authors). diff --git a/docs/migrations/getImportStatus.md b/docs/migrations/getImportStatus.md deleted file mode 100644 index 68473d712..000000000 --- a/docs/migrations/getImportStatus.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -name: Get an import status -example: octokit.rest.migrations.getImportStatus({ owner, repo }) -route: GET /repos/{owner}/{repo}/import -scope: migrations -type: API method ---- - -# Get an import status - -**This method is deprecated.** - -View the progress of an import. - -**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - -**Import status** - -This section includes details about the possible values of the `status` field of the Import Progress response. - -An import that does not have errors will progress through these steps: - -- `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. -- `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). -- `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. -- `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". -- `complete` - the import is complete, and the repository is ready on GitHub. - -If there are problems, you will see one of these in the `status` field: - -- `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. -- `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. -- `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. -- `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/rest/migrations/source-imports#start-an-import) with the correct URL. -- `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. - -**The project_choices field** - -When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - -**Git LFS related fields** - -This section includes details about Git LFS related fields that may be present in the Import Progress response. - -- `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. -- `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. -- `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. -- `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - -```js -octokit.rest.migrations.getImportStatus({ - owner, - repo, -}); -``` - -## Parameters - - - - - - - - - - - - - -
namerequireddescription
owneryes - -The account owner of the repository. The name is not case sensitive. - -
repoyes - -The name of the repository without the `.git` extension. The name is not case sensitive. - -
- -See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/migrations/source-imports#get-an-import-status). diff --git a/docs/migrations/getLargeFiles.md b/docs/migrations/getLargeFiles.md deleted file mode 100644 index 176358619..000000000 --- a/docs/migrations/getLargeFiles.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -name: Get large files -example: octokit.rest.migrations.getLargeFiles({ owner, repo }) -route: GET /repos/{owner}/{repo}/import/large_files -scope: migrations -type: API method ---- - -# Get large files - -**This method is deprecated.** - -List files larger than 100MB found during the import - -**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - -```js -octokit.rest.migrations.getLargeFiles({ - owner, - repo, -}); -``` - -## Parameters - - - - - - - - - - - - - -
namerequireddescription
owneryes - -The account owner of the repository. The name is not case sensitive. - -
repoyes - -The name of the repository without the `.git` extension. The name is not case sensitive. - -
- -See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/migrations/source-imports#get-large-files). diff --git a/docs/migrations/mapCommitAuthor.md b/docs/migrations/mapCommitAuthor.md deleted file mode 100644 index 095a17822..000000000 --- a/docs/migrations/mapCommitAuthor.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -name: Map a commit author -example: octokit.rest.migrations.mapCommitAuthor({ owner, repo, author_id }) -route: PATCH /repos/{owner}/{repo}/import/authors/{author_id} -scope: migrations -type: API method ---- - -# Map a commit author - -**This method is deprecated.** - -Update an author's identity for the import. Your application can continue updating authors any time before you push -new commits to the repository. - -**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - -```js -octokit.rest.migrations.mapCommitAuthor({ - owner, - repo, - author_id, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - -
namerequireddescription
owneryes - -The account owner of the repository. The name is not case sensitive. - -
repoyes - -The name of the repository without the `.git` extension. The name is not case sensitive. - -
author_idyes - -
emailno - -The new Git author email. - -
nameno - -The new Git author name. - -
- -See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author). diff --git a/docs/migrations/setLfsPreference.md b/docs/migrations/setLfsPreference.md deleted file mode 100644 index 3f4736795..000000000 --- a/docs/migrations/setLfsPreference.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -name: Update Git LFS preference -example: octokit.rest.migrations.setLfsPreference({ owner, repo, use_lfs }) -route: PATCH /repos/{owner}/{repo}/import/lfs -scope: migrations -type: API method ---- - -# Update Git LFS preference - -**This method is deprecated.** - -You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability -is powered by [Git LFS](https://git-lfs.com). - -You can learn more about our LFS feature and working with large files [on our help -site](https://docs.github.com/repositories/working-with-files/managing-large-files). - -**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - -```js -octokit.rest.migrations.setLfsPreference({ - owner, - repo, - use_lfs, -}); -``` - -## Parameters - - - - - - - - - - - - - - -
namerequireddescription
owneryes - -The account owner of the repository. The name is not case sensitive. - -
repoyes - -The name of the repository without the `.git` extension. The name is not case sensitive. - -
use_lfsyes - -Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. - -
- -See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference). diff --git a/docs/migrations/startImport.md b/docs/migrations/startImport.md deleted file mode 100644 index 12b87d515..000000000 --- a/docs/migrations/startImport.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -name: Start an import -example: octokit.rest.migrations.startImport({ owner, repo, vcs_url }) -route: PUT /repos/{owner}/{repo}/import -scope: migrations -type: API method ---- - -# Start an import - -**This method is deprecated.** - -Start a source import to a GitHub repository using GitHub Importer. -Importing into a GitHub repository with GitHub Actions enabled is not supported and will -return a status `422 Unprocessable Entity` response. - -**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - -```js -octokit.rest.migrations.startImport({ - owner, - repo, - vcs_url, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - -
namerequireddescription
owneryes - -The account owner of the repository. The name is not case sensitive. - -
repoyes - -The name of the repository without the `.git` extension. The name is not case sensitive. - -
vcs_urlyes - -The URL of the originating repository. - -
vcsno - -The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. - -
vcs_usernameno - -If authentication is required, the username to provide to `vcs_url`. - -
vcs_passwordno - -If authentication is required, the password to provide to `vcs_url`. - -
tfvc_projectno - -For a tfvc import, the name of the project that is being imported. - -
- -See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/migrations/source-imports#start-an-import). diff --git a/docs/migrations/updateImport.md b/docs/migrations/updateImport.md deleted file mode 100644 index 9b8ec26ca..000000000 --- a/docs/migrations/updateImport.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -name: Update an import -example: octokit.rest.migrations.updateImport({ owner, repo }) -route: PATCH /repos/{owner}/{repo}/import -scope: migrations -type: API method ---- - -# Update an import - -**This method is deprecated.** - -An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API -request. If no parameters are provided, the import will be restarted. - -Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will -have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. -You can select the project to import by providing one of the objects in the `project_choices` array in the update request. - -**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - -```js -octokit.rest.migrations.updateImport({ - owner, - repo, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - -
namerequireddescription
owneryes - -The account owner of the repository. The name is not case sensitive. - -
repoyes - -The name of the repository without the `.git` extension. The name is not case sensitive. - -
vcs_usernameno - -The username to provide to the originating repository. - -
vcs_passwordno - -The password to provide to the originating repository. - -
vcsno - -The type of version control system you are migrating from. - -
tfvc_projectno - -For a tfvc import, the name of the project that is being imported. - -
- -See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/migrations/source-imports#update-an-import). diff --git a/scripts/update-endpoints/generated/endpoints.json b/scripts/update-endpoints/generated/endpoints.json index ea86e4033..569df89bd 100644 --- a/scripts/update-endpoints/generated/endpoints.json +++ b/scripts/update-endpoints/generated/endpoints.json @@ -53268,7 +53268,7 @@ "in": "BODY", "type": "string", "required": true, - "enum": ["RepositoryRole", "Team", "Integration", "OrganizationAdmin"], + "enum": ["Integration", "OrganizationAdmin", "RepositoryRole", "Team"], "allowNull": false, "mapToData": null, "validation": null, @@ -54147,7 +54147,7 @@ "in": "BODY", "type": "string", "required": true, - "enum": ["RepositoryRole", "Team", "Integration", "OrganizationAdmin"], + "enum": ["Integration", "OrganizationAdmin", "RepositoryRole", "Team"], "allowNull": false, "mapToData": null, "validation": null, @@ -67346,7 +67346,7 @@ "in": "BODY", "type": "string", "required": true, - "enum": ["RepositoryRole", "Team", "Integration", "OrganizationAdmin"], + "enum": ["Integration", "OrganizationAdmin", "RepositoryRole", "Team"], "allowNull": false, "mapToData": null, "validation": null, @@ -68328,7 +68328,7 @@ "in": "BODY", "type": "string", "required": true, - "enum": ["RepositoryRole", "Team", "Integration", "OrganizationAdmin"], + "enum": ["Integration", "OrganizationAdmin", "RepositoryRole", "Team"], "allowNull": false, "mapToData": null, "validation": null, diff --git a/src/generated/endpoints.ts b/src/generated/endpoints.ts index b631f27e4..a08681ba8 100644 --- a/src/generated/endpoints.ts +++ b/src/generated/endpoints.ts @@ -853,14 +853,6 @@ const Endpoints: EndpointsDefaultsAndDecorations = { root: ["GET /"], }, migrations: { - cancelImport: [ - "DELETE /repos/{owner}/{repo}/import", - {}, - { - deprecated: - "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import", - }, - ], deleteArchiveForAuthenticatedUser: [ "DELETE /user/migrations/{migration_id}/archive", ], @@ -873,30 +865,6 @@ const Endpoints: EndpointsDefaultsAndDecorations = { getArchiveForAuthenticatedUser: [ "GET /user/migrations/{migration_id}/archive", ], - getCommitAuthors: [ - "GET /repos/{owner}/{repo}/import/authors", - {}, - { - deprecated: - "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors", - }, - ], - getImportStatus: [ - "GET /repos/{owner}/{repo}/import", - {}, - { - deprecated: - "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status", - }, - ], - getLargeFiles: [ - "GET /repos/{owner}/{repo}/import/large_files", - {}, - { - deprecated: - "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files", - }, - ], getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], listForAuthenticatedUser: ["GET /user/migrations"], @@ -910,46 +878,14 @@ const Endpoints: EndpointsDefaultsAndDecorations = { {}, { renamed: ["migrations", "listReposForAuthenticatedUser"] }, ], - mapCommitAuthor: [ - "PATCH /repos/{owner}/{repo}/import/authors/{author_id}", - {}, - { - deprecated: - "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author", - }, - ], - setLfsPreference: [ - "PATCH /repos/{owner}/{repo}/import/lfs", - {}, - { - deprecated: - "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference", - }, - ], startForAuthenticatedUser: ["POST /user/migrations"], startForOrg: ["POST /orgs/{org}/migrations"], - startImport: [ - "PUT /repos/{owner}/{repo}/import", - {}, - { - deprecated: - "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import", - }, - ], unlockRepoForAuthenticatedUser: [ "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock", ], unlockRepoForOrg: [ "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", ], - updateImport: [ - "PATCH /repos/{owner}/{repo}/import", - {}, - { - deprecated: - "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import", - }, - ], }, oidc: { getOidcCustomSubTemplateForOrg: [ diff --git a/src/generated/method-types.ts b/src/generated/method-types.ts index ea90e9353..a46e12043 100644 --- a/src/generated/method-types.ts +++ b/src/generated/method-types.ts @@ -6247,22 +6247,6 @@ export type RestEndpointMethods = { }; }; migrations: { - /** - * Stop an import for a repository. - * - * **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - * - * @deprecated octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import - */ - cancelImport: { - ( - params?: RestEndpointMethodTypes["migrations"]["cancelImport"]["parameters"], - ): Promise< - RestEndpointMethodTypes["migrations"]["cancelImport"]["response"] - >; - defaults: RequestInterface["defaults"]; - endpoint: EndpointInterface<{ url: string }>; - }; /** * Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/migrations/users#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/migrations/users#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ @@ -6331,87 +6315,6 @@ export type RestEndpointMethods = { defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string }>; }; - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. - * - * **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - * @deprecated octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors - */ - getCommitAuthors: { - ( - params?: RestEndpointMethodTypes["migrations"]["getCommitAuthors"]["parameters"], - ): Promise< - RestEndpointMethodTypes["migrations"]["getCommitAuthors"]["response"] - >; - defaults: RequestInterface["defaults"]; - endpoint: EndpointInterface<{ url: string }>; - }; - /** - * View the progress of an import. - * - * **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/rest/migrations/source-imports#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - * @deprecated octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status - */ - getImportStatus: { - ( - params?: RestEndpointMethodTypes["migrations"]["getImportStatus"]["parameters"], - ): Promise< - RestEndpointMethodTypes["migrations"]["getImportStatus"]["response"] - >; - defaults: RequestInterface["defaults"]; - endpoint: EndpointInterface<{ url: string }>; - }; - /** - * List files larger than 100MB found during the import - * - * **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - * - * @deprecated octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files - */ - getLargeFiles: { - ( - params?: RestEndpointMethodTypes["migrations"]["getLargeFiles"]["parameters"], - ): Promise< - RestEndpointMethodTypes["migrations"]["getLargeFiles"]["response"] - >; - defaults: RequestInterface["defaults"]; - endpoint: EndpointInterface<{ url: string }>; - }; /** * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: * @@ -6513,43 +6416,6 @@ export type RestEndpointMethods = { defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string }>; }; - /** - * Update an author's identity for the import. Your application can continue updating authors any time before you push - * new commits to the repository. - * - * **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - * - * @deprecated octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author - */ - mapCommitAuthor: { - ( - params?: RestEndpointMethodTypes["migrations"]["mapCommitAuthor"]["parameters"], - ): Promise< - RestEndpointMethodTypes["migrations"]["mapCommitAuthor"]["response"] - >; - defaults: RequestInterface["defaults"]; - endpoint: EndpointInterface<{ url: string }>; - }; - /** - * You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability - * is powered by [Git LFS](https://git-lfs.com). - * - * You can learn more about our LFS feature and working with large files [on our help - * site](https://docs.github.com/repositories/working-with-files/managing-large-files). - * - * **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - * - * @deprecated octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference - */ - setLfsPreference: { - ( - params?: RestEndpointMethodTypes["migrations"]["setLfsPreference"]["parameters"], - ): Promise< - RestEndpointMethodTypes["migrations"]["setLfsPreference"]["response"] - >; - defaults: RequestInterface["defaults"]; - endpoint: EndpointInterface<{ url: string }>; - }; /** * Initiates the generation of a user migration archive. */ @@ -6574,24 +6440,6 @@ export type RestEndpointMethods = { defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string }>; }; - /** - * Start a source import to a GitHub repository using GitHub Importer. - * Importing into a GitHub repository with GitHub Actions enabled is not supported and will - * return a status `422 Unprocessable Entity` response. - * - * **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - * - * @deprecated octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import - */ - startImport: { - ( - params?: RestEndpointMethodTypes["migrations"]["startImport"]["parameters"], - ): Promise< - RestEndpointMethodTypes["migrations"]["startImport"]["response"] - >; - defaults: RequestInterface["defaults"]; - endpoint: EndpointInterface<{ url: string }>; - }; /** * Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/migrations/users#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/repos/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ @@ -6616,26 +6464,6 @@ export type RestEndpointMethods = { defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string }>; }; - /** - * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API - * request. If no parameters are provided, the import will be restarted. - * - * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will - * have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. - * You can select the project to import by providing one of the objects in the `project_choices` array in the update request. - * - * **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - * @deprecated octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import - */ - updateImport: { - ( - params?: RestEndpointMethodTypes["migrations"]["updateImport"]["parameters"], - ): Promise< - RestEndpointMethodTypes["migrations"]["updateImport"]["response"] - >; - defaults: RequestInterface["defaults"]; - endpoint: EndpointInterface<{ url: string }>; - }; }; oidc: { /** diff --git a/src/generated/parameters-and-response-types.ts b/src/generated/parameters-and-response-types.ts index 2aa832a9b..fe38d378c 100644 --- a/src/generated/parameters-and-response-types.ts +++ b/src/generated/parameters-and-response-types.ts @@ -2043,11 +2043,6 @@ export type RestEndpointMethodTypes = { }; }; migrations: { - cancelImport: { - parameters: RequestParameters & - Endpoints["DELETE /repos/{owner}/{repo}/import"]["parameters"]; - response: Endpoints["DELETE /repos/{owner}/{repo}/import"]["response"]; - }; deleteArchiveForAuthenticatedUser: { parameters: RequestParameters & Endpoints["DELETE /user/migrations/{migration_id}/archive"]["parameters"]; @@ -2068,21 +2063,6 @@ export type RestEndpointMethodTypes = { Endpoints["GET /user/migrations/{migration_id}/archive"]["parameters"]; response: Endpoints["GET /user/migrations/{migration_id}/archive"]["response"]; }; - getCommitAuthors: { - parameters: RequestParameters & - Endpoints["GET /repos/{owner}/{repo}/import/authors"]["parameters"]; - response: Endpoints["GET /repos/{owner}/{repo}/import/authors"]["response"]; - }; - getImportStatus: { - parameters: RequestParameters & - Endpoints["GET /repos/{owner}/{repo}/import"]["parameters"]; - response: Endpoints["GET /repos/{owner}/{repo}/import"]["response"]; - }; - getLargeFiles: { - parameters: RequestParameters & - Endpoints["GET /repos/{owner}/{repo}/import/large_files"]["parameters"]; - response: Endpoints["GET /repos/{owner}/{repo}/import/large_files"]["response"]; - }; getStatusForAuthenticatedUser: { parameters: RequestParameters & Endpoints["GET /user/migrations/{migration_id}"]["parameters"]; @@ -2118,16 +2098,6 @@ export type RestEndpointMethodTypes = { Endpoints["GET /user/migrations/{migration_id}/repositories"]["parameters"]; response: Endpoints["GET /user/migrations/{migration_id}/repositories"]["response"]; }; - mapCommitAuthor: { - parameters: RequestParameters & - Endpoints["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"]["parameters"]; - response: Endpoints["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"]["response"]; - }; - setLfsPreference: { - parameters: RequestParameters & - Endpoints["PATCH /repos/{owner}/{repo}/import/lfs"]["parameters"]; - response: Endpoints["PATCH /repos/{owner}/{repo}/import/lfs"]["response"]; - }; startForAuthenticatedUser: { parameters: RequestParameters & Endpoints["POST /user/migrations"]["parameters"]; @@ -2138,11 +2108,6 @@ export type RestEndpointMethodTypes = { Endpoints["POST /orgs/{org}/migrations"]["parameters"]; response: Endpoints["POST /orgs/{org}/migrations"]["response"]; }; - startImport: { - parameters: RequestParameters & - Endpoints["PUT /repos/{owner}/{repo}/import"]["parameters"]; - response: Endpoints["PUT /repos/{owner}/{repo}/import"]["response"]; - }; unlockRepoForAuthenticatedUser: { parameters: RequestParameters & Endpoints["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"]["parameters"]; @@ -2153,11 +2118,6 @@ export type RestEndpointMethodTypes = { Endpoints["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"]["parameters"]; response: Endpoints["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"]["response"]; }; - updateImport: { - parameters: RequestParameters & - Endpoints["PATCH /repos/{owner}/{repo}/import"]["parameters"]; - response: Endpoints["PATCH /repos/{owner}/{repo}/import"]["response"]; - }; }; oidc: { getOidcCustomSubTemplateForOrg: {