Skip to content

Commit

Permalink
feat: Initial implementation ✨✨✨✨ (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenmathieson authored Dec 14, 2022
1 parent 96cd27f commit deaed3f
Show file tree
Hide file tree
Showing 20 changed files with 37,569 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"plugins": ["@typescript-eslint"],
"env": { "node": true, "es6": true },
"overrides": [
{
"files": ["*.test.ts"],
"plugins": ["mocha"]
}
]
}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @stephenmathieson
1 change: 1 addition & 0 deletions .github/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
review_merges: true
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tests

on: [push]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- run: yarn
- run: yarn lint
generate_report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
product-name: Test
- uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: Generate a VPAT"
branch: test-vpat-report
base: main
title: "docs: Generate a VPAT"
body: |
This patch generates a VPAT based on this repository's currently open issues.
This PR was opened by a robot :robot: :tada:
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,ts,tsx}": ["eslint --fix", "prettier --write", "yarn build"],
"*.{json,css,md}": ["prettier --write"]
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,44 @@

> Generate a VPAT report based on a repository's currently open issues (and their labels).
## Example workflow

```yaml
name: Generate a VPAT report

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * SUN"

jobs:
generate_report:
runs-on: ubuntu-latest
steps:
- uses: dequelabs/action-vpat-report@main
with:
github-token: ${{ secrets.PAT }}
product-name: axe DeveloperHub
output-file: vpats/{DATE}-{PRODUCT}.md
vpat-label: VPAT
additional-labels: "PROD: axe-devhub"
```
## Inputs
| Name | Description | Default |
| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| `github-token` | Optional [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) | `secrets.GITHUB_TOKEN` |
| `product-name` | Product name the report is for | |
| `output-file` | Outputted markdown file name | `vpat-{YYYY-MM-DD}-{PRODUCT NAME}.md` |
| `vpat-label` | VPAT issue label | `VPAT` |
| `additional-labels` | Additional comma separated labels for issue filtering |

## Developer notes

- make sure `dist/` is checked in after updating files in `src/` (_the precommit hook should do this for you_)
- test by opening a _draft_ PR with your changes

## License

Unlicensed, this likely won't work outside of `dequelabs` repositories anyway.
22 changes: 22 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Generate VPAT
description: Generate a VPAT based on open issues (and their labels)
author: Deque Systems, Inc
inputs:
github-token:
description: GitHub token
default: ${{ github.token }}
product-name:
description: Product name
required: true
output-file:
description: File to output the report to. Accepts "{DATE}" and "{PRODUCT}" placeholders.
default: vpat-{DATE}-{PRODUCT}.md
vpat-label:
description: Label to filter VPAT issues by
default: VPAT
additional-labels:
description: Additional labels to filter issues by
default: ""
runs:
using: node16
main: dist/index.js
Loading

0 comments on commit deaed3f

Please sign in to comment.