mirror of https://github.com/actions/toolkit
docs(core): add how to provide annotation properties
parent
2b08dc18f2
commit
aa6719ed20
|
@ -170,6 +170,22 @@ export interface AnnotationProperties {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```js
|
||||||
|
core.error(
|
||||||
|
'This is a bad error seen in file.',
|
||||||
|
{
|
||||||
|
title: "Unexecpted Error",
|
||||||
|
file: "path/to/errored-file.js",
|
||||||
|
startLine: 1,
|
||||||
|
endLine: 2,
|
||||||
|
startColumn: 1,
|
||||||
|
endColumn: 10,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
#### Styling output
|
#### Styling output
|
||||||
|
|
||||||
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.
|
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()
|
||||||
|
|
||||||
// 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.
|
// 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.
|
||||||
core.summary.write({overwrite: true})
|
core.summary.write({overwrite: true})
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue