Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(core): add how to provide annotation properties #1961

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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.
Expand Down Expand Up @@ -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.
core.summary.write({overwrite: true})
```
```