Skip to content

Commit 15d1d53

Browse files
committed
docs: issues.listMilestonesForRepo, migrations.getImportProgress
1 parent d0dfa82 commit 15d1d53

File tree

4 files changed

+146
-6
lines changed

4 files changed

+146
-6
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: List milestones
3+
example: octokit.issues.listMilestonesForRepo({ owner, repo })
4+
route: GET /repos/{owner}/{repo}/milestones
5+
scope: issues
6+
type: API method
7+
---
8+
9+
# List milestones
10+
11+
**Deprecated:** This method has been renamed to issues.listMilestones
12+
13+
```js
14+
octokit.issues.listMilestonesForRepo({
15+
owner,
16+
repo,
17+
});
18+
```
19+
20+
## Parameters
21+
22+
<table>
23+
<thead>
24+
<tr>
25+
<th>name</th>
26+
<th>required</th>
27+
<th>description</th>
28+
</tr>
29+
</thead>
30+
<tbody>
31+
<tr><td>owner</td><td>yes</td><td>
32+
33+
</td></tr>
34+
<tr><td>repo</td><td>yes</td><td>
35+
36+
</td></tr>
37+
<tr><td>state</td><td>no</td><td>
38+
39+
The state of the milestone. Either `open`, `closed`, or `all`.
40+
41+
</td></tr>
42+
<tr><td>sort</td><td>no</td><td>
43+
44+
What to sort results by. Either `due_on` or `completeness`.
45+
46+
</td></tr>
47+
<tr><td>direction</td><td>no</td><td>
48+
49+
The direction of the sort. Either `asc` or `desc`.
50+
51+
</td></tr>
52+
<tr><td>per_page</td><td>no</td><td>
53+
54+
Results per page (max 100)
55+
56+
</td></tr>
57+
<tr><td>page</td><td>no</td><td>
58+
59+
Page number of the results to fetch.
60+
61+
</td></tr>
62+
</tbody>
63+
</table>
64+
65+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/issues/milestones/#list-milestones).
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
name: Get an import status
3+
example: octokit.migrations.getImportProgress({ owner, repo })
4+
route: GET /repos/{owner}/{repo}/import
5+
scope: migrations
6+
type: API method
7+
---
8+
9+
# Get an import status
10+
11+
**Deprecated:** This method has been renamed to migrations.getImportStatus
12+
13+
View the progress of an import.
14+
15+
**Import status**
16+
17+
This section includes details about the possible values of the `status` field of the Import Progress response.
18+
19+
An import that does not have errors will progress through these steps:
20+
21+
- `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.
22+
- `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).
23+
- `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.
24+
- `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".
25+
- `complete` - the import is complete, and the repository is ready on GitHub.
26+
27+
If there are problems, you will see one of these in the `status` field:
28+
29+
- `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://developer.github.com/v3/migrations/source_imports/#update-an-import) section.
30+
- `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com) for more information.
31+
- `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://developer.github.com/v3/migrations/source_imports/#update-an-import) section.
32+
- `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://developer.github.com/v3/migrations/source_imports/#cancel-an-import) and [retry](https://developer.github.com/v3/migrations/source_imports/#start-an-import) with the correct URL.
33+
- `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://developer.github.com/v3/migrations/source_imports/#update-an-import) section.
34+
35+
**The project_choices field**
36+
37+
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.
38+
39+
**Git LFS related fields**
40+
41+
This section includes details about Git LFS related fields that may be present in the Import Progress response.
42+
43+
- `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.
44+
- `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.
45+
- `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.
46+
- `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.
47+
48+
```js
49+
octokit.migrations.getImportProgress({
50+
owner,
51+
repo,
52+
});
53+
```
54+
55+
## Parameters
56+
57+
<table>
58+
<thead>
59+
<tr>
60+
<th>name</th>
61+
<th>required</th>
62+
<th>description</th>
63+
</tr>
64+
</thead>
65+
<tbody>
66+
<tr><td>owner</td><td>yes</td><td>
67+
68+
</td></tr>
69+
<tr><td>repo</td><td>yes</td><td>
70+
71+
</td></tr>
72+
</tbody>
73+
</table>
74+
75+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/migrations/source_imports/#get-an-import-status).

src/generated/method-types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2921,9 +2921,9 @@ export type RestEndpointMethods = {
29212921
*/
29222922
listMilestonesForRepo: {
29232923
(
2924-
params?: RestEndpointMethodTypes["issues"]["listMilestones"]["parameters"]
2924+
params?: RestEndpointMethodTypes["issues"]["listMilestonesForRepo"]["parameters"]
29252925
): Promise<
2926-
RestEndpointMethodTypes["issues"]["listMilestones"]["response"]
2926+
RestEndpointMethodTypes["issues"]["listMilestonesForRepo"]["response"]
29272927
>;
29282928
defaults: RequestInterface["defaults"];
29292929
endpoint: EndpointInterface<{ url: string }>;
@@ -3252,9 +3252,9 @@ export type RestEndpointMethods = {
32523252
*/
32533253
getImportProgress: {
32543254
(
3255-
params?: RestEndpointMethodTypes["migrations"]["getImportStatus"]["parameters"]
3255+
params?: RestEndpointMethodTypes["migrations"]["getImportProgress"]["parameters"]
32563256
): Promise<
3257-
RestEndpointMethodTypes["migrations"]["getImportStatus"]["response"]
3257+
RestEndpointMethodTypes["migrations"]["getImportProgress"]["response"]
32583258
>;
32593259
defaults: RequestInterface["defaults"];
32603260
endpoint: EndpointInterface<{ url: string }>;

src/generated/parameters-and-response-types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,15 +2048,15 @@ export type RestEndpointMethodTypes = {
20482048
>;
20492049
response: Endpoints["GET /repos/:owner/:repo/import/authors"]["response"];
20502050
};
2051-
getImportStatus: {
2051+
getImportProgress: {
20522052
parameters: RequestParameters &
20532053
Omit<
20542054
Endpoints["GET /repos/:owner/:repo/import"]["parameters"],
20552055
"baseUrl" | "headers" | "mediaType"
20562056
>;
20572057
response: Endpoints["GET /repos/:owner/:repo/import"]["response"];
20582058
};
2059-
getImportProgress: {
2059+
getImportStatus: {
20602060
parameters: RequestParameters &
20612061
Omit<
20622062
Endpoints["GET /repos/:owner/:repo/import"]["parameters"],

0 commit comments

Comments
 (0)