Skip to content

Commit 59da986

Browse files
committed
update pulgins docs
1 parent 9f9bb3d commit 59da986

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

PLUGINS.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ Plugins are dynamically loaded by the scanner when it runs. The scanner will loo
1212

1313
When the default function is invoked, the following arguments are passed to the function:
1414

15-
- `page`: this is the [playwright page](https://playwright.dev/docs/api/class-page) instance.
16-
- `addFinding`: this is a function that will add a finding to the list. Findings are used to generate and file issues. This function expects a single object as an argument, and it should match the [`Finding` type](https://github.com/github/accessibility-scanner/blob/main/.github/actions/find/src/types.d.ts#L1-L9).
15+
#### `page`
16+
17+
This is the [playwright page](https://playwright.dev/docs/api/class-page) instance.
18+
19+
#### `addFinding`
20+
21+
This is a function that will add a finding to the list. Findings are used to generate and file issues. This function has 2 arguments:
22+
23+
1. An object that should match the [`Finding` type](https://github.com/github/accessibility-scanner/blob/main/.github/actions/find/src/types.d.ts#L1-L9).
24+
2. An 'options' object that has an optional `includeScreenshots` field. This function will automatically generate a screenshot and add the screenshotId to the `Finding` data if `includeScreenshots` is true in either the action input, or in the options field of this function.
1725

1826
## How to create plugins
1927

0 commit comments

Comments
 (0)