Skip to content

Commit 47e9489

Browse files
committed
docs(core): add how to provide annotation properties
Signed-off-by: Emilien Escalle <[email protected]>
1 parent 930c890 commit 47e9489

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

packages/core/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,22 @@ export interface AnnotationProperties {
170170
}
171171
```
172172

173+
Example:
174+
175+
```js
176+
core.error(
177+
'This is a bad error seen in file.',
178+
{
179+
title: "Unexpected Error",
180+
file: "path/to/errored-file.js",
181+
startLine: 1,
182+
endLine: 2,
183+
startColumn: 1,
184+
endColumn: 10,
185+
}
186+
)
187+
```
188+
173189
#### Styling output
174190

175191
Colored output is supported in the Action logs via standard [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code). 3/4 bit, 8 bit and 24 bit colors are all supported.
@@ -483,4 +499,4 @@ core.summary.emptyBuffer()
483499
484500
// Writes text in the buffer to the summary buffer file and empties the buffer, optionally overwriting all existing content in the summary file with buffer contents. Defaults to false.
485501
core.summary.write({overwrite: true})
486-
```
502+
```

0 commit comments

Comments
 (0)