Преглед на файлове

Enable pre-commit

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
pull/4353/head
Suguru Hirahara преди 9 месеца
committed by Slavi Pantaleev
родител
ревизия
17e14a4b89
променени са 16 файла, в които са добавени 53 реда и са изтрити 34 реда
  1. +2
    -0
      .codespellrc
  2. +1
    -1
      .envrc
  3. +4
    -1
      .github/renovate.json
  4. +9
    -3
      .github/workflows/matrix.yml
  5. +0
    -20
      .github/workflows/reuse.yml
  6. +26
    -0
      .pre-commit-config.yaml
  7. +2
    -0
      REUSE.toml
  8. +1
    -1
      docs/configuring-playbook-bridge-mx-puppet-discord.md
  9. +1
    -1
      docs/configuring-playbook-livekit-jwt-service.md
  10. +1
    -1
      docs/configuring-playbook-livekit-server.md
  11. +1
    -1
      docs/configuring-playbook-matrix-rtc.md
  12. +1
    -1
      roles/custom/matrix-element-call/templates/labels.j2
  13. +1
    -1
      roles/custom/matrix-media-repo/templates/grafana/media-repo.json
  14. +1
    -1
      roles/custom/matrix-prometheus-nginxlog-exporter/templates/grafana/nginx-proxy.json
  15. +1
    -1
      roles/custom/matrix-prometheus-nginxlog-exporter/templates/nginx-proxy.json
  16. +1
    -1
      roles/custom/matrix-synapse-usage-exporter/templates/grafana/synapse-usage-exporter.json

+ 2
- 0
.codespellrc Целия файл

@@ -0,0 +1,2 @@
[codespell]
ignore-words-list = aNULL,brose,doub,Udo,re-use,re-used

+ 1
- 1
.envrc Целия файл

@@ -1 +1 @@
use flake
use flake

+ 4
- 1
.github/renovate.json Целия файл

@@ -28,5 +28,8 @@
],
"ignoreDeps": [
"ghcr.io/matrixgpt/matrix-chatgpt-bot"
]
],
"pre-commit": {
"enabled": true
}
}

+ 9
- 3
.github/workflows/matrix.yml Целия файл

@@ -7,9 +7,7 @@
---
name: Matrix CI

on: # yamllint disable-line rule:truthy
push:
pull_request:
on: [push, pull_request] # yamllint disable-line rule:truthy

jobs:
yamllint:
@@ -30,3 +28,11 @@ jobs:
uses: ansible-community/ansible-lint-action@v6.17.0
with:
path: roles/custom
precommit:
name: Run pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run pre-commit
uses: pre-commit/action@v3.0.1

+ 0
- 20
.github/workflows/reuse.yml Целия файл

@@ -1,20 +0,0 @@
# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org>
#
# SPDX-License-Identifier: CC0-1.0
---
name: REUSE Compliance Check

on: [push, pull_request] # yamllint disable-line rule:truthy

permissions:
contents: read

jobs:
reuse-compliance-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: REUSE Compliance Check
uses: fsfe/reuse-action@v5

+ 26
- 0
.pre-commit-config.yaml Целия файл

@@ -0,0 +1,26 @@
---
default_install_hook_types: [pre-push]

exclude: "LICENSES/"

# See: https://pre-commit.com/hooks.html
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# - id: check-executables-have-shebangs
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: ["--skip=*.po,*.pot,i18n/"]
- repo: https://github.com/fsfe/reuse-tool # https://reuse.software/dev/#pre-commit-hook
rev: v5.0.2
hooks:
- id: reuse

+ 2
- 0
REUSE.toml Целия файл

@@ -13,10 +13,12 @@ path = [
"i18n/PUBLISHED_LANGUAGES",
"i18n/requirements.txt",
"roles/custom/**/*.repo",
".codespellrc",
".editorconfig",
".envrc",
".gitattributes",
".gitignore",
".pre-commit-config.yaml",
".yamllint",
"ansible.cfg",
"flake.lock",


+ 1
- 1
docs/configuring-playbook-bridge-mx-puppet-discord.md Целия файл

@@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
# Setting up MX Puppet Discord bridging (optional)

**Note**: bridging to [Discord](https://discordapp.com/) can also happen via the [matrix-appservice-discord](configuring-playbook-bridge-appservice-discord.md)and [mautrix-discord](configuring-playbook-bridge-mautrix-discord.md) bridges supported by the playbook.
- For using as a Bot we recommend the [Appservice Discord](configuring-playbook-bridge-appservice-discord.md), because it supports plumbing.
- For using as a Bot we recommend the [Appservice Discord](configuring-playbook-bridge-appservice-discord.md), because it supports plumbing.
- For personal use with a discord account we recommend the [mautrix-discord](configuring-playbook-bridge-mautrix-discord.md) bridge, because it is the most fully-featured and stable of the 3 Discord bridges supported by the playbook.

The playbook can install and configure [mx-puppet-discord](https://gitlab.com/mx-puppet/discord/mx-puppet-discord) for you.


+ 1
- 1
docs/configuring-playbook-livekit-jwt-service.md Целия файл

@@ -15,4 +15,4 @@ This is a helper component which is part of the [Matrix RTC stack](configuring-p
Take a look at:

- `roles/custom/matrix-livekit-jwt-service/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
- `roles/custom/matrix-livekit-jwt-service/templates/env.j2` for the component's default configuration.
- `roles/custom/matrix-livekit-jwt-service/templates/env.j2` for the component's default configuration.

+ 1
- 1
docs/configuring-playbook-livekit-server.md Целия файл

@@ -35,4 +35,4 @@ To ensure LiveKit Server functions correctly, the following firewall rules and p

For some reason, LiveKit Server's TURN ports (`3479/udp` and `5350/tcp`) are not reachable over IPv6 regardless of whether you've [enabled IPv6](./configuring-ipv6.md) for your server.

It seems like LiveKit Server intentionally only listens on `udp4` and `tcp4` as seen [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L128) and [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L92).
It seems like LiveKit Server intentionally only listens on `udp4` and `tcp4` as seen [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L128) and [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L92).

+ 1
- 1
docs/configuring-playbook-matrix-rtc.md Целия файл

@@ -56,4 +56,4 @@ The shortcut commands with the [`just` program](just.md) are also available: `ju

Once installed, Matrix clients which support Element Call (like [Element Web](configuring-playbook-client-element-web.md) and Element X on mobile (iOS and Android)) will automatically use the Matrix RTC stack.

These clients typically embed the Element Call frontend UI within them, so installing [Element Call](configuring-playbook-element-call.md) is only necessary if you'd like to use it standalone - directly via a browser.
These clients typically embed the Element Call frontend UI within them, so installing [Element Call](configuring-playbook-element-call.md) is only necessary if you'd like to use it standalone - directly via a browser.

+ 1
- 1
roles/custom/matrix-element-call/templates/labels.j2 Целия файл

@@ -48,4 +48,4 @@ traefik.http.routers.matrix-element-call.tls.certResolver={{ matrix_element_call

{% endif %}

{{ matrix_element_call_container_labels_additional_labels }}
{{ matrix_element_call_container_labels_additional_labels }}

+ 1
- 1
roles/custom/matrix-media-repo/templates/grafana/media-repo.json Целия файл

@@ -1300,4 +1300,4 @@
"uid": "xJUZ3xfmk",
"version": 15,
"weekStart": ""
}
}

+ 1
- 1
roles/custom/matrix-prometheus-nginxlog-exporter/templates/grafana/nginx-proxy.json Целия файл

@@ -1702,4 +1702,4 @@
"uid": "x2_jWNF4k",
"version": 12,
"weekStart": ""
}
}

+ 1
- 1
roles/custom/matrix-prometheus-nginxlog-exporter/templates/nginx-proxy.json Целия файл

@@ -1702,4 +1702,4 @@
"uid": "x2_jWNF4k",
"version": 12,
"weekStart": ""
}
}

+ 1
- 1
roles/custom/matrix-synapse-usage-exporter/templates/grafana/synapse-usage-exporter.json Целия файл

@@ -2743,4 +2743,4 @@
"uid": "c84624d7-3935-4470-83c0-c10d1cee35ff",
"version": 2,
"weekStart": ""
}
}

Зареждане…
Отказ
Запис