|
6 | 6 |
|
7 | 7 | --- |
8 | 8 |
|
9 | | -## Options |
10 | | - |
11 | | -### Example |
| 9 | +## YAML Snippet |
12 | 10 |
|
13 | 11 | ```yaml |
14 | 12 | - task: PullRequestComments@0 |
|
24 | 22 |
|
25 | 23 | ``` |
26 | 24 |
|
27 | | -### All Options |
| 25 | +## Arguments |
28 | 26 |
|
29 | | -| Option | Default Value | Required | Help | Options | |
30 | | -| :-------------------- | :------------------------------------ | :------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------ | |
31 | | -| `action` | `create` | ❌ | Action to perform | `create`, `createOrUpdate`, `update` | |
32 | | -| `skipIfCommentExists` | `true` | ❌ | If the comment exists on the pull request, do not post it again | -- | |
33 | | -| `commentId` | -- | ❌ | Is used to uniqely identify the comment when using the same task multiple times in the same pipeline | -- | |
34 | | -| `status` | `Active` | ❌ | Post the comment with a given status | `Active`, `Fixed`, `WontFix`, `Closed`, `Pending` | |
35 | | -| `content` | -- | ✅ | The content of the comment. For Markdown syntax, see [Syntax guidance for basic Markdown usage](http://go.microsoft.com/fwlink/?LinkId=823918) | -- | |
36 | | -| `useDefined` | `false` | ❌ | If set, overrides the value from `System.PullRequest.PullRequestId` | -- | |
37 | | -| `pullRequestId` | `$(System.PullRequest.PullRequestId)` | ❌ | If no id is given, the value from `System.PullRequest.PullRequestId` is taken. If a value is given, this overrides the value from `System.PullRequest.PullRequestId` | -- | |
38 | | -| `type` | `Text` | ❌ | The type of comment. `Text` represents a regular user comment while `System` indicates a system message | `Text`, `System` | |
| 27 | +| Argument | Description | |
| 28 | +| :----------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 29 | +| `action` <br />Action | **(Optional)** Action to perform <br /> Options: `create`, `createOrUpdate`, `update` <br /> Default value: `create` | |
| 30 | +| `skipIfCommentExists` <br />Do not post comment if it exists | **(Optional)** If the comment exists on the pull request, do not post it again <br /> Default value: `true` | |
| 31 | +| `commentId` <br />Comment Id | **(Optional)** Is used to uniqely identify the comment when using the same task multiple times in the same pipeline <br /> | |
| 32 | +| `status` <br />Comment Status | **(Optional)** Post the comment with a given status <br /> Options: `Active`, `Fixed`, `WontFix`, `Closed`, `Pending` <br /> Default value: `Active` | |
| 33 | +| `content` <br />Comment Content | **(Required)** The content of the comment. For Markdown syntax, see [Syntax guidance for basic Markdown usage](http://go.microsoft.com/fwlink/?LinkId=823918) <br /> | |
| 34 | +| `useDefined` <br />Use defined id | **(Optional)** If set, overrides the value from `System.PullRequest.PullRequestId` <br /> | |
| 35 | +| `pullRequestId` <br />Pull Request Id | **(Optional)** If no id is given, the value from `System.PullRequest.PullRequestId` is taken. If a value is given, this overrides the value from `System.PullRequest.PullRequestId` <br /> Default value: `$(System.PullRequest.PullRequestId)` | |
| 36 | +| `type` <br />Comment Type | **(Optional)** The type of comment. `Text` represents a regular user comment while `System` indicates a system message <br /> Options: `Text`, `System` <br /> Default value: `Text` | |
39 | 37 |
|
40 | 38 |
|
41 | | -## Examples |
| 39 | +### Examples |
42 | 40 |
|
43 | 41 | ## Posting a comment |
44 | 42 |
|
|
56 | 54 |
|
57 | 55 | after a run against a pull request it will post the comment: |
58 | 56 |
|
59 | | - |
| 57 | + |
60 | 58 |
|
61 | 59 |
|
62 | 60 | ## Posting a comment with markdown |
|
81 | 79 |
|
82 | 80 | after a run against a pull request it will post the comment: |
83 | 81 |
|
84 | | - |
| 82 | + |
85 | 83 |
|
86 | 84 |
|
87 | 85 | ## Posting multiple comments |
|
0 commit comments