diff --git a/.editorconfig b/.editorconfig index 32c7098..f431d25 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,7 +4,6 @@ root = true - [*] end_of_line = lf charset = utf-8 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ff6b65c..17b283d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,28 +10,31 @@ assignees: '' A clear and concise description of what the bug is. **To Reproduce** -Steps to reproduce the behavior: +Steps to reproduce the behaviour: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error -**Expected behavior** +**Expected behaviour** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.github/workflows/auto-merge.yaml b/.github/workflows/auto-merge.yaml new file mode 100644 index 0000000..45242ca --- /dev/null +++ b/.github/workflows/auto-merge.yaml @@ -0,0 +1,24 @@ +--- +name: auto-merge +on: + pull_request: +permissions: + contents: write + pull-requests: write +jobs: + dependabot: + if: github.triggering_actor == 'dependabot[bot]' + name: Auto merge pull requests + runs-on: ubuntu-latest + steps: + - name: Approve Dependabot PR + run: gh pr review --approve "${PR_URL}" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.MACHINE_TOKEN }} + - if: contains(github.event.pull_request.labels.*.name, 'github_actions') + name: Enable auto-merge for Dependabot PR + run: gh pr merge --auto --merge "${PR_URL}" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/policy.yaml b/.github/workflows/policy.yaml index c53c3b1..1fdb093 100644 --- a/.github/workflows/policy.yaml +++ b/.github/workflows/policy.yaml @@ -44,8 +44,20 @@ jobs: run: npm install @commitlint/config-conventional - name: Validate all commits run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to HEAD --verbose - yamllint: - name: Lint YAML documents + markdown-style: + name: Check markdown style + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: 19.x + - name: Validate markdown + run: npx markdownlint-cli2 **/*.md + yaml-style: + name: Check YAML style runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -54,5 +66,5 @@ jobs: python-version: "3.10" - name: Install yamllint run: pip install --user yamllint - - name: Lint + - name: Validate YAML run: yamllint . diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 0000000..a4c6c19 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,6 @@ +{ + "default": true, + "line-length": { + "tables": false + } +} diff --git a/.yamlfmt b/.yamlfmt new file mode 100644 index 0000000..829cf0b --- /dev/null +++ b/.yamlfmt @@ -0,0 +1,15 @@ +# vi: ft=yaml +--- +formatter: + type: basic + # There is a "bug" with the behaviour of this option that will move file head + # comments below the initial document start. For example front matter is + # rearraged and therefore misplaced in the file. This behaviour prevents + # `ymalfmt` from being run in CI or automatically in code editors. + include_document_start: true + indentless_arrays: true + pad_line_comments: 2 + # There is missing functionality in `yamlfmt` to remove redundantly quoted + # strings from YAML documents, and prefer the use of double quotes (or + # whatever is configured). This means further manual effort is required to + # correct files. diff --git a/.yamllint b/.yamllint index a2b4b36..3c41533 100644 --- a/.yamllint +++ b/.yamllint @@ -2,6 +2,8 @@ --- extends: default rules: + document-start: + level: error indentation: indent-sequences: false spaces: 2