From e635592d843284632dbfa2a2c40b348ee9e9c695 Mon Sep 17 00:00:00 2001 From: Evan Read Date: Thu, 10 Jan 2019 13:05:15 +1000 Subject: [PATCH 1/6] Add more information and refactor format of award emoji-related topics --- doc/api/award_emoji.md | 195 ++++++++++++++++++++++----------------- doc/user/award_emojis.md | 35 ++++--- 2 files changed, 128 insertions(+), 102 deletions(-) diff --git a/doc/api/award_emoji.md b/doc/api/award_emoji.md index 41e39c31069..846f2c3c544 100644 --- a/doc/api/award_emoji.md +++ b/doc/api/award_emoji.md @@ -1,19 +1,27 @@ # Award Emoji API -> [Introduced][ce-4575] in GitLab 8.9, Snippet support in 8.12 +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4575) in GitLab 8.9. Snippet support added in 8.12. +An [awarded emoji](../user/award_emojis.md) tells a thousand words. -An awarded emoji tells a thousand words, and can be awarded on issues, merge -requests, snippets, and notes/comments. Issues, merge requests, snippets, and notes are further called -`awardables`. +Emojis can be awarded on the following (known as "awardables"): + +- [Issues](../user/project/issues/index.md) +- [Merge requests](../user/project/merge_requests/index.md) +- [Snippets](../user/snippets.md) +- Notes + +Emojis can also [be awarded](../user/award_emojis.html#award-emoji-for-comments) on comments. ## Issues, merge requests, and snippets +See [Award Emoji on Notes](#award-emoji-on-notes) for information on using these endpoints with notes. + ### List an awardable's award emoji -Gets a list of all award emoji +Get a list of all award emoji for a specified awardable. -``` +```text GET /projects/:id/issues/:issue_iid/award_emoji GET /projects/:id/merge_requests/:merge_request_iid/award_emoji GET /projects/:id/snippets/:snippet_id/award_emoji @@ -21,16 +29,18 @@ GET /projects/:id/snippets/:snippet_id/award_emoji Parameters: -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -| `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable | +| Attribute | Type | Required | Description | +|:---------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | +| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | -```bash +Example request: + +```sh curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji ``` -Example Response: +Example response: ```json [ @@ -71,9 +81,9 @@ Example Response: ### Get single award emoji -Gets a single award emoji from an issue, snippet, or merge request. +Get a single award emoji from an issue, snippet, or merge request. -``` +```text GET /projects/:id/issues/:issue_iid/award_emoji/:award_id GET /projects/:id/merge_requests/:merge_request_iid/award_emoji/:award_id GET /projects/:id/snippets/:snippet_id/award_emoji/:award_id @@ -81,17 +91,19 @@ GET /projects/:id/snippets/:snippet_id/award_emoji/:award_id Parameters: -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -| `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable | -| `award_id` | integer | yes | The ID of the award emoji | +| Attribute | Type | Required | Description | +|:---------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | +| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | +| `award_id` | integer | yes | ID of the award emoji. | -```bash +Example request: + +```sh curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/1 ``` -Example Response: +Example response: ```json { @@ -114,9 +126,9 @@ Example Response: ### Award a new emoji -This end point creates an award emoji on the specified resource +Create an award emoji on the specified awardable. -``` +```text POST /projects/:id/issues/:issue_iid/award_emoji POST /projects/:id/merge_requests/:merge_request_iid/award_emoji POST /projects/:id/snippets/:snippet_id/award_emoji @@ -124,13 +136,13 @@ POST /projects/:id/snippets/:snippet_id/award_emoji Parameters: -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -| `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable | -| `name` | string | yes | The name of the emoji, without colons | +| Attribute | Type | Required | Description | +|:---------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | +| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | +| `name` | string | yes | Name of the emoji without colons. | -```bash +```sh curl --request POST --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji?name=blowfish ``` @@ -157,10 +169,12 @@ Example Response: ### Delete an award emoji -Sometimes its just not meant to be, and you'll have to remove your award. Only available to -admins or the author of the award. +Sometimes it's just not meant to be and you'll have to remove the award. -``` +NOTE: **Note:** +Only available to administrators or the author of the award. + +```text DELETE /projects/:id/issues/:issue_iid/award_emoji/:award_id DELETE /projects/:id/merge_requests/:merge_request_iid/award_emoji/:award_id DELETE /projects/:id/snippets/:snippet_id/award_emoji/:award_id @@ -168,43 +182,48 @@ DELETE /projects/:id/snippets/:snippet_id/award_emoji/:award_id Parameters: -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -| `issue_iid` | integer | yes | The internal ID of an issue | -| `award_id` | integer | yes | The ID of an award_emoji | +| Attribute | Type | Required | Description | +|:---------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | +| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | +| `award_id` | integer | yes | ID of an award emoji. | -```bash +```sh curl --request DELETE --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/344 ``` ## Award Emoji on Notes -The endpoints documented above are available for Notes as well. Notes -are a sub-resource of Issues, Merge Requests, or Snippets. The examples below -describe working with Award Emoji on notes for an Issue, but can be -easily adapted for notes on a Merge Request. +Notes are a sub-resource of issues, merge requests, and snippets. The endpoints documented above +are available for notes as well. -### List a note's award emoji +NOTE: **Note:** +The examples below describe working with award emoji on notes for an issue, but can be +easily adapted for notes on a merge request. -``` +### List a note's award emojis + +Get all award emojis for a note. + +```text GET /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji ``` Parameters: -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -| `issue_iid` | integer | yes | The internal ID of an issue | -| `note_id` | integer | yes | The ID of a note | +| Attribute | Type | Required | Description | +|:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | +| `issue_iid` | integer | yes | Internal ID of an issue. | +| `note_id` | integer | yes | ID of a note. | +Example request: -```bash +```sh curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji ``` -Example Response: +Example response: ```json [ @@ -227,26 +246,30 @@ Example Response: ] ``` -### Get single note's award emoji +### Get an award emoji for a note -``` +Get a single award emoji for a note. + +```text GET /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id ``` Parameters: -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -| `issue_iid` | integer | yes | The internal ID of an issue | -| `note_id` | integer | yes | The ID of a note | -| `award_id` | integer | yes | The ID of the award emoji | +| Attribute | Type | Required | Description | +|:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | +| `issue_iid` | integer | yes | Internal ID of an issue. | +| `note_id` | integer | yes | ID of a note. | +| `award_id` | integer | yes | ID of the award emoji. | -```bash +Example request: + +```sh curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji/2 ``` -Example Response: +Example response: ```json { @@ -269,24 +292,28 @@ Example Response: ### Award a new emoji on a note -``` +Create an award emoji on the specified note. + +```text POST /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji ``` Parameters: -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -| `issue_iid` | integer | yes | The internal ID of an issue | -| `note_id` | integer | yes | The ID of a note | -| `name` | string | yes | The name of the emoji, without colons | +| Attribute | Type | Required | Description | +|:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | +| `issue_iid` | integer | yes | Internal ID of an issue. | +| `note_id` | integer | yes | ID of a note. | +| `name` | string | yes | Name of the emoji without colons. | -```bash +Example request: + +```sh curl --request POST --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji?name=rocket ``` -Example Response: +Example response: ```json { @@ -307,26 +334,28 @@ Example Response: } ``` -### Delete an award emoji +### Delete an award emoji from a note -Sometimes its just not meant to be, and you'll have to remove your award. Only available to -admins or the author of the award. +Sometimes it's just not meant to be and you'll have to remove the award. -``` +NOTE: **Note:** +Only available to administrators or the author of the award. + +```text DELETE /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id ``` Parameters: -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -| `issue_iid` | integer | yes | The internal ID of an issue | -| `note_id` | integer | yes | The ID of a note | -| `award_id` | integer | yes | The ID of an award_emoji | +| Attribute | Type | Required | Description | +|:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | +| `issue_iid` | integer | yes | Internal ID of an issue. | +| `note_id` | integer | yes | ID of a note. | +| `award_id` | integer | yes | ID of an award_emoji. | -```bash +Example request: + +```sh curl --request DELETE --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/345 ``` - -[ce-4575]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4575 diff --git a/doc/user/award_emojis.md b/doc/user/award_emojis.md index 93be3da44d4..0b32f23c487 100644 --- a/doc/user/award_emojis.md +++ b/doc/user/award_emojis.md @@ -1,24 +1,25 @@ # Award emoji -> **Notes:** -> - First [introduced][1825] in GitLab 8.2. -> - GitLab 9.0 [introduced][ce-9570] the usage of native emojis if the platform +> - First [introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1825) in GitLab 8.2. +> - GitLab 9.0 [introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9570) the usage of native emojis if the platform > supports them and falls back to images or CSS sprites. This change greatly -> improved the award emoji performance overall. +> improved award emoji performance overall. When you're collaborating online, you get fewer opportunities for high-fives -and thumbs-ups. Emoji can be awarded to issues, merge requests, snippets, and -virtually everywhere where you can have a discussion. +and thumbs-ups. Emojis can be awarded to [issues](project/issues/index.md), [merge requests](project/merge_requests/index.md), +[snippets](snippets.md), and virtually everywhere where you can have a discussion. ![Award emoji](img/award_emoji_select.png) -Award emoji make it much easier to give and receive feedback without a long -comment thread. Comments that are only emoji will automatically become -award emoji. +Award emojis make it much easier to give and receive feedback without a long +comment thread. Comments that are only emojis will automatically become +award emojis. + +For information on the relevant API, see [Award Emoji API](../api/award_emoji.md). ## Sort issues and merge requests on vote count -> [Introduced][2871] in GitLab 8.5. +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2781) in GitLab 8.5. You can quickly sort issues and merge requests by the number of votes they have received. The sort options can be found in the dropdown menu as "Most @@ -32,20 +33,16 @@ downvotes. ## Award emoji for comments -> [Introduced][4291] in GitLab 8.9. +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4291) in GitLab 8.9. Award emoji can also be applied to individual comments when you want to celebrate an accomplishment or agree with an opinion. -To add an award emoji, click the smile in the top right of the comment and pick -an emoji from the dropdown. If you want to remove an award emoji, just click -the emoji again and the vote will be removed. +To: + +- Add an award emoji, click the smile in the top right of the comment and pick an emoji from the dropdown. +- Remove an award emoji, click the emoji again and the vote will be removed. ![Picking an emoji for a comment](img/award_emoji_comment_picker.png) ![An award emoji has been applied to a comment](img/award_emoji_comment_awarded.png) - -[2871]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2781 -[1825]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1825 -[4291]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4291 -[ce-9570]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9570 From 7681838a8fdf38cfebe1277a79dd9ac3a72be1cc Mon Sep 17 00:00:00 2001 From: Evan Read Date: Fri, 11 Jan 2019 14:30:02 +1000 Subject: [PATCH 2/6] Be consistent with plural form of emoji. Also, notes are comments --- doc/api/award_emoji.md | 38 ++++++++++++++++++-------------------- doc/user/award_emojis.md | 8 ++++---- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/doc/api/award_emoji.md b/doc/api/award_emoji.md index 846f2c3c544..0b0aa8e2a8f 100644 --- a/doc/api/award_emoji.md +++ b/doc/api/award_emoji.md @@ -4,18 +4,17 @@ An [awarded emoji](../user/award_emojis.md) tells a thousand words. -Emojis can be awarded on the following (known as "awardables"): +Emoji can be awarded on the following (known as "awardables"): - [Issues](../user/project/issues/index.md) - [Merge requests](../user/project/merge_requests/index.md) - [Snippets](../user/snippets.md) -- Notes -Emojis can also [be awarded](../user/award_emojis.html#award-emoji-for-comments) on comments. +Emoji can also [be awarded](../user/award_emojis.html#award-emoji-for-comments) on comments (also known as notes). ## Issues, merge requests, and snippets -See [Award Emoji on Notes](#award-emoji-on-notes) for information on using these endpoints with notes. +See [Award Emoji on Comments](#award-emoji-on-comments) for information on using these endpoints with comments. ### List an awardable's award emoji @@ -192,18 +191,17 @@ Parameters: curl --request DELETE --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/344 ``` -## Award Emoji on Notes +## Award Emoji on Comments -Notes are a sub-resource of issues, merge requests, and snippets. The endpoints documented above -are available for notes as well. +Comments (also known as notes) are a sub-resource of issues, merge requests, and snippets. NOTE: **Note:** -The examples below describe working with award emoji on notes for an issue, but can be -easily adapted for notes on a merge request. +The examples below describe working with award emoji on comments for an issue, but can be +easily adapted for comments on a merge request. -### List a note's award emojis +### List a comment's award emoji -Get all award emojis for a note. +Get all award emoji for a comment (note). ```text GET /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji @@ -215,7 +213,7 @@ Parameters: |:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| | `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | | `issue_iid` | integer | yes | Internal ID of an issue. | -| `note_id` | integer | yes | ID of a note. | +| `note_id` | integer | yes | ID of a comment (note). | Example request: @@ -246,9 +244,9 @@ Example response: ] ``` -### Get an award emoji for a note +### Get an award emoji for a comment -Get a single award emoji for a note. +Get a single award emoji for a comment (note). ```text GET /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id @@ -260,7 +258,7 @@ Parameters: |:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| | `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | | `issue_iid` | integer | yes | Internal ID of an issue. | -| `note_id` | integer | yes | ID of a note. | +| `note_id` | integer | yes | ID of a comment (note). | | `award_id` | integer | yes | ID of the award emoji. | Example request: @@ -290,9 +288,9 @@ Example response: } ``` -### Award a new emoji on a note +### Award a new emoji on a comment -Create an award emoji on the specified note. +Create an award emoji on the specified comment (note). ```text POST /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji @@ -304,7 +302,7 @@ Parameters: |:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| | `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | | `issue_iid` | integer | yes | Internal ID of an issue. | -| `note_id` | integer | yes | ID of a note. | +| `note_id` | integer | yes | ID of a comment (note). | | `name` | string | yes | Name of the emoji without colons. | Example request: @@ -334,7 +332,7 @@ Example response: } ``` -### Delete an award emoji from a note +### Delete an award emoji from a comment Sometimes it's just not meant to be and you'll have to remove the award. @@ -351,7 +349,7 @@ Parameters: |:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| | `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | | `issue_iid` | integer | yes | Internal ID of an issue. | -| `note_id` | integer | yes | ID of a note. | +| `note_id` | integer | yes | ID of a comment (note). | | `award_id` | integer | yes | ID of an award_emoji. | Example request: diff --git a/doc/user/award_emojis.md b/doc/user/award_emojis.md index 0b32f23c487..fdacf230e98 100644 --- a/doc/user/award_emojis.md +++ b/doc/user/award_emojis.md @@ -6,14 +6,14 @@ > improved award emoji performance overall. When you're collaborating online, you get fewer opportunities for high-fives -and thumbs-ups. Emojis can be awarded to [issues](project/issues/index.md), [merge requests](project/merge_requests/index.md), +and thumbs-ups. Emoji can be awarded to [issues](project/issues/index.md), [merge requests](project/merge_requests/index.md), [snippets](snippets.md), and virtually everywhere where you can have a discussion. ![Award emoji](img/award_emoji_select.png) -Award emojis make it much easier to give and receive feedback without a long -comment thread. Comments that are only emojis will automatically become -award emojis. +Award emoji make it much easier to give and receive feedback without a long +comment thread. Comments that are only emoji will automatically become +award emoji. For information on the relevant API, see [Award Emoji API](../api/award_emoji.md). From 9ca5909d1f12aa3ea2d340ae6cc01005e5b47d64 Mon Sep 17 00:00:00 2001 From: Evan Read Date: Fri, 11 Jan 2019 14:44:07 +1000 Subject: [PATCH 3/6] More consistency with plural for emoji --- doc/user/award_emojis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/award_emojis.md b/doc/user/award_emojis.md index fdacf230e98..56135abb4e5 100644 --- a/doc/user/award_emojis.md +++ b/doc/user/award_emojis.md @@ -1,7 +1,7 @@ # Award emoji > - First [introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1825) in GitLab 8.2. -> - GitLab 9.0 [introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9570) the usage of native emojis if the platform +> - GitLab 9.0 [introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9570) the usage of native emoji if the platform > supports them and falls back to images or CSS sprites. This change greatly > improved award emoji performance overall. From a843fccfe79173baf67621a10cb08506259c6fe6 Mon Sep 17 00:00:00 2001 From: Evan Read Date: Tue, 15 Jan 2019 14:04:41 +1000 Subject: [PATCH 4/6] Continue addressing review feedback --- doc/api/award_emoji.md | 84 ++++++++++++++++++++-------------------- doc/user/award_emojis.md | 5 +-- 2 files changed, 44 insertions(+), 45 deletions(-) diff --git a/doc/api/award_emoji.md b/doc/api/award_emoji.md index 0b0aa8e2a8f..67f53e79bcd 100644 --- a/doc/api/award_emoji.md +++ b/doc/api/award_emoji.md @@ -28,10 +28,10 @@ GET /projects/:id/snippets/:snippet_id/award_emoji Parameters: -| Attribute | Type | Required | Description | -|:---------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | +| Attribute | Type | Required | Description | +|:---------------|:---------------|:---------|:-----------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). | +| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | Example request: @@ -90,11 +90,11 @@ GET /projects/:id/snippets/:snippet_id/award_emoji/:award_id Parameters: -| Attribute | Type | Required | Description | -|:---------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | -| `award_id` | integer | yes | ID of the award emoji. | +| Attribute | Type | Required | Description | +|:---------------|:---------------|:---------|:-----------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). | +| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | +| `award_id` | integer | yes | ID of the award emoji. | Example request: @@ -135,11 +135,11 @@ POST /projects/:id/snippets/:snippet_id/award_emoji Parameters: -| Attribute | Type | Required | Description | -|:---------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | -| `name` | string | yes | Name of the emoji without colons. | +| Attribute | Type | Required | Description | +|:---------------|:---------------|:---------|:-----------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). | +| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | +| `name` | string | yes | Name of the emoji without colons. | ```sh curl --request POST --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji?name=blowfish @@ -181,11 +181,11 @@ DELETE /projects/:id/snippets/:snippet_id/award_emoji/:award_id Parameters: -| Attribute | Type | Required | Description | -|:---------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | -| `award_id` | integer | yes | ID of an award emoji. | +| Attribute | Type | Required | Description | +|:---------------|:---------------|:---------|:-----------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). | +| `awardable_id` | integer | yes | ID (`iid` for merge requests/issues, `id` for snippets) of an awardable. | +| `award_id` | integer | yes | ID of an award emoji. | ```sh curl --request DELETE --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/344 @@ -209,11 +209,11 @@ GET /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji Parameters: -| Attribute | Type | Required | Description | -|:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `issue_iid` | integer | yes | Internal ID of an issue. | -| `note_id` | integer | yes | ID of a comment (note). | +| Attribute | Type | Required | Description | +|:------------|:---------------|:---------|:-----------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). | +| `issue_iid` | integer | yes | Internal ID of an issue. | +| `note_id` | integer | yes | ID of a comment (note). | Example request: @@ -254,12 +254,12 @@ GET /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id Parameters: -| Attribute | Type | Required | Description | -|:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `issue_iid` | integer | yes | Internal ID of an issue. | -| `note_id` | integer | yes | ID of a comment (note). | -| `award_id` | integer | yes | ID of the award emoji. | +| Attribute | Type | Required | Description | +|:------------|:---------------|:---------|:-----------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). | +| `issue_iid` | integer | yes | Internal ID of an issue. | +| `note_id` | integer | yes | ID of a comment (note). | +| `award_id` | integer | yes | ID of the award emoji. | Example request: @@ -298,12 +298,12 @@ POST /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji Parameters: -| Attribute | Type | Required | Description | -|:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `issue_iid` | integer | yes | Internal ID of an issue. | -| `note_id` | integer | yes | ID of a comment (note). | -| `name` | string | yes | Name of the emoji without colons. | +| Attribute | Type | Required | Description | +|:------------|:---------------|:---------|:-----------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). | +| `issue_iid` | integer | yes | Internal ID of an issue. | +| `note_id` | integer | yes | ID of a comment (note). | +| `name` | string | yes | Name of the emoji without colons. | Example request: @@ -345,12 +345,12 @@ DELETE /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id Parameters: -| Attribute | Type | Required | Description | -|:------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `issue_iid` | integer | yes | Internal ID of an issue. | -| `note_id` | integer | yes | ID of a comment (note). | -| `award_id` | integer | yes | ID of an award_emoji. | +| Attribute | Type | Required | Description | +|:------------|:---------------|:---------|:-----------------------------------------------------------------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). | +| `issue_iid` | integer | yes | Internal ID of an issue. | +| `note_id` | integer | yes | ID of a comment (note). | +| `award_id` | integer | yes | ID of an award_emoji. | Example request: diff --git a/doc/user/award_emojis.md b/doc/user/award_emojis.md index 56135abb4e5..e4fd08a582c 100644 --- a/doc/user/award_emojis.md +++ b/doc/user/award_emojis.md @@ -7,13 +7,12 @@ When you're collaborating online, you get fewer opportunities for high-fives and thumbs-ups. Emoji can be awarded to [issues](project/issues/index.md), [merge requests](project/merge_requests/index.md), -[snippets](snippets.md), and virtually everywhere where you can have a discussion. +[snippets](snippets.md), and anywhere you can have a discussion. ![Award emoji](img/award_emoji_select.png) Award emoji make it much easier to give and receive feedback without a long -comment thread. Comments that are only emoji will automatically become -award emoji. +comment thread. For information on the relevant API, see [Award Emoji API](../api/award_emoji.md). From dd8f7400027e4e90a75fb470e90a207934e65b8f Mon Sep 17 00:00:00 2001 From: Evan Read Date: Wed, 16 Jan 2019 11:05:11 +1000 Subject: [PATCH 5/6] Add links to other APIs --- doc/api/award_emoji.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/award_emoji.md b/doc/api/award_emoji.md index 67f53e79bcd..22991fffae4 100644 --- a/doc/api/award_emoji.md +++ b/doc/api/award_emoji.md @@ -6,9 +6,9 @@ An [awarded emoji](../user/award_emojis.md) tells a thousand words. Emoji can be awarded on the following (known as "awardables"): -- [Issues](../user/project/issues/index.md) -- [Merge requests](../user/project/merge_requests/index.md) -- [Snippets](../user/snippets.md) +- [Issues](../user/project/issues/index.md) ([API](issues.md)). +- [Merge requests](../user/project/merge_requests/index.md) ([API](merge_requests.md)). +- [Snippets](../user/snippets.md) ([API](snippets.md)). Emoji can also [be awarded](../user/award_emojis.html#award-emoji-for-comments) on comments (also known as notes). From 8c326da25671a4910d7d0313e4e156d499fc76df Mon Sep 17 00:00:00 2001 From: Evan Read Date: Wed, 16 Jan 2019 11:14:22 +1000 Subject: [PATCH 6/6] Add more links to other APIs --- doc/api/award_emoji.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/award_emoji.md b/doc/api/award_emoji.md index 22991fffae4..92936a277ac 100644 --- a/doc/api/award_emoji.md +++ b/doc/api/award_emoji.md @@ -10,7 +10,7 @@ Emoji can be awarded on the following (known as "awardables"): - [Merge requests](../user/project/merge_requests/index.md) ([API](merge_requests.md)). - [Snippets](../user/snippets.md) ([API](snippets.md)). -Emoji can also [be awarded](../user/award_emojis.html#award-emoji-for-comments) on comments (also known as notes). +Emoji can also [be awarded](../user/award_emojis.html#award-emoji-for-comments) on comments (also known as notes). See also [Notes API](notes.md). ## Issues, merge requests, and snippets