-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
.rest.repos.createAutolink()
, .rest.repos.listAutolinks()
, …
…`.rest.repos.getAutolink()`, `.rest.repos.deleteAutolink()` (#427)
- Loading branch information
1 parent
5fb8342
commit dd176ff
Showing
10 changed files
with
561 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
name: Create an autolink reference for a repository | ||
example: octokit.rest.repos.createAutolink({ owner, repo, key_prefix, url_template }) | ||
route: POST /repos/{owner}/{repo}/autolinks | ||
scope: repos | ||
type: API method | ||
--- | ||
|
||
# Create an autolink reference for a repository | ||
|
||
Users with admin access to the repository can create an autolink. | ||
|
||
```js | ||
octokit.rest.repos.createAutolink({ | ||
owner, | ||
repo, | ||
key_prefix, | ||
url_template, | ||
}); | ||
``` | ||
|
||
## Parameters | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>name</th> | ||
<th>required</th> | ||
<th>description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr><td>owner</td><td>yes</td><td> | ||
|
||
</td></tr> | ||
<tr><td>repo</td><td>yes</td><td> | ||
|
||
</td></tr> | ||
<tr><td>key_prefix</td><td>yes</td><td> | ||
|
||
The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. | ||
|
||
</td></tr> | ||
<tr><td>url_template</td><td>yes</td><td> | ||
|
||
The URL must contain <num> for the reference number. | ||
|
||
</td></tr> | ||
</tbody> | ||
</table> | ||
|
||
See also: [GitHub Developer Guide documentation](https://docs.github.com/v3/repos#create-an-autolink). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: Delete an autolink reference from a repository | ||
example: octokit.rest.repos.deleteAutolink({ owner, repo, autolink_id }) | ||
route: DELETE /repos/{owner}/{repo}/autolinks/{autolink_id} | ||
scope: repos | ||
type: API method | ||
--- | ||
|
||
# Delete an autolink reference from a repository | ||
|
||
This deletes a single autolink reference by ID that was configured for the given repository. | ||
|
||
Information about autolinks are only available to repository administrators. | ||
|
||
```js | ||
octokit.rest.repos.deleteAutolink({ | ||
owner, | ||
repo, | ||
autolink_id, | ||
}); | ||
``` | ||
|
||
## Parameters | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>name</th> | ||
<th>required</th> | ||
<th>description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr><td>owner</td><td>yes</td><td> | ||
|
||
</td></tr> | ||
<tr><td>repo</td><td>yes</td><td> | ||
|
||
</td></tr> | ||
<tr><td>autolink_id</td><td>yes</td><td> | ||
|
||
autolink_id parameter | ||
|
||
</td></tr> | ||
</tbody> | ||
</table> | ||
|
||
See also: [GitHub Developer Guide documentation](https://docs.github.com/v3/repos#delete-autolink). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: Get an autolink reference of a repository | ||
example: octokit.rest.repos.getAutolink({ owner, repo, autolink_id }) | ||
route: GET /repos/{owner}/{repo}/autolinks/{autolink_id} | ||
scope: repos | ||
type: API method | ||
--- | ||
|
||
# Get an autolink reference of a repository | ||
|
||
This returns a single autolink reference by ID that was configured for the given repository. | ||
|
||
Information about autolinks are only available to repository administrators. | ||
|
||
```js | ||
octokit.rest.repos.getAutolink({ | ||
owner, | ||
repo, | ||
autolink_id, | ||
}); | ||
``` | ||
|
||
## Parameters | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>name</th> | ||
<th>required</th> | ||
<th>description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr><td>owner</td><td>yes</td><td> | ||
|
||
</td></tr> | ||
<tr><td>repo</td><td>yes</td><td> | ||
|
||
</td></tr> | ||
<tr><td>autolink_id</td><td>yes</td><td> | ||
|
||
autolink_id parameter | ||
|
||
</td></tr> | ||
</tbody> | ||
</table> | ||
|
||
See also: [GitHub Developer Guide documentation](https://docs.github.com/v3/repos#get-autolink). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
name: List all autolinks of a repository | ||
example: octokit.rest.repos.listAutolinks({ owner, repo }) | ||
route: GET /repos/{owner}/{repo}/autolinks | ||
scope: repos | ||
type: API method | ||
--- | ||
|
||
# List all autolinks of a repository | ||
|
||
This returns a list of autolinks configured for the given repository. | ||
|
||
Information about autolinks are only available to repository administrators. | ||
|
||
```js | ||
octokit.rest.repos.listAutolinks({ | ||
owner, | ||
repo, | ||
}); | ||
``` | ||
|
||
## Parameters | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>name</th> | ||
<th>required</th> | ||
<th>description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr><td>owner</td><td>yes</td><td> | ||
|
||
</td></tr> | ||
<tr><td>repo</td><td>yes</td><td> | ||
|
||
</td></tr> | ||
<tr><td>page</td><td>no</td><td> | ||
|
||
Page number of the results to fetch. | ||
|
||
</td></tr> | ||
</tbody> | ||
</table> | ||
|
||
See also: [GitHub Developer Guide documentation](https://docs.github.com/v3/repos#list-autolinks). |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.