From 0e481988022913e45dda0ee56648c650c84d49d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 21 Aug 2026 14:33:48 +0200 Subject: [PATCH] chore: sync with WeblateOrg/meta --- .github/workflows/pre-commit.yml | 14 +------------- .github/workflows/pull_requests.yaml | 24 ------------------------ 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 .github/workflows/pull_requests.yaml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index f7a3843..5425ca3 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -31,9 +31,7 @@ jobs: - name: detect method id: detect run: | - if test -f requirements-lint.txt ; then - echo "method=requirements" >> "$GITHUB_OUTPUT" - elif test -f pyproject.toml && grep -q dependency-groups pyproject.toml ; then + if test -f pyproject.toml ; then echo "method=pep735" >> "$GITHUB_OUTPUT" else echo "method=uvx" >> "$GITHUB_OUTPUT" @@ -56,16 +54,6 @@ jobs: RUFF_OUTPUT_FORMAT: github REUSE_OUTPUT_FORMAT: github GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: pre-commit (requirements) - if: steps.detect.outputs.method == 'requirements' - run: | - uv pip install --system -r requirements-lint.txt - prek run --all-files --show-diff-on-failure - prek cache gc - env: - RUFF_OUTPUT_FORMAT: github - REUSE_OUTPUT_FORMAT: github - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: diff run: git diff if: always() diff --git a/.github/workflows/pull_requests.yaml b/.github/workflows/pull_requests.yaml deleted file mode 100644 index 28c0469..0000000 --- a/.github/workflows/pull_requests.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright © Michal Čihař -# -# SPDX-License-Identifier: CC0-1.0 - -# This file is maintained in https://github.com/WeblateOrg/meta/ -name: Pull request automation - -on: # zizmor: ignore[dangerous-triggers] - pull_request_target: - types: opened - -permissions: {} - -jobs: - weblate-automerge: - runs-on: ubuntu-slim - name: Weblate automerge - if: github.event.pull_request.user.login == 'weblate' || github.event.pull_request.user.login == 'hosted-weblate[bot]' - steps: - - name: Enable Pull Request Automerge - run: gh pr merge --repo "$GITHUB_REPOSITORY" --rebase --auto "$PR_NUMBER" - env: - GH_TOKEN: ${{ secrets.WEBLATE_CI_TOKEN }} # zizmor: ignore[secrets-outside-env] - PR_NUMBER: ${{ github.event.pull_request.number }}