Skip to content

failed-pa11y-scan

failed-pa11y-scan #92

name: Create GH Issue from CircleCI
on: repository_dispatch
jobs:
create_issue:
name: Create failed pa11y scan issue
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create GH issue
run: |
if [[ $CLOSE_PREVIOUS == true ]]; then
previous_issue_number=$(gh issue list \
--label "$LABELS" \
--json number \
--jq '.[0].number')
if [[ -n $previous_issue_number ]]; then
gh issue close "$previous_issue_number"
fi
fi
gh issue create \
--title "Nightly pa11y scan failed" \
--assignee "$ASSIGNEES" \
--label "$LABELS" \
--body "$BODY"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
ASSIGNEES: caleywoods
LABELS: type:accessibility,nightly-pa11y-scan-failed
BODY: ${{ github.event.client_payload.report }}
CLOSE_PREVIOUS: false
BODY: |

Check failure on line 34 in .github/workflows/repository_dispatch_create_issue.yml

View workflow run for this annotation

GitHub Actions / Create GH Issue from CircleCI

Invalid workflow file

The workflow is not valid. .github/workflows/repository_dispatch_create_issue.yml (Line: 34, Col: 11): 'BODY' is already defined
```
$(echo $BODY | base64 --decode)
```