Repository: airtai/faststream (language: python)

Issue:
CI: pre-commit can't push to forks
Seems like it can't find correct outer repo and tries to push to not-existed our repo branch: 

https://github.com/airtai/faststream/actions/runs/11632699466/job/32396345536


Discussion / hints:
@Lancetnik That is strange. I have tested the code with my PR before merging to main. I will take a look later. Next week probably.

Fix patch:
diff --git a/.github/workflows/docs_update-references.yaml b/.github/workflows/pr_update-linting-and-api-references.yaml
similarity index 76%
rename from .github/workflows/docs_update-references.yaml
rename to .github/workflows/pr_update-linting-and-api-references.yaml
index 8776fb6507..e666f40db9 100644
--- a/.github/workflows/docs_update-references.yaml
+++ b/.github/workflows/pr_update-linting-and-api-references.yaml
@@ -1,4 +1,4 @@
-name: Generate API References documentation
+name: Run linting, update API References and commit changes
 
 on:
   pull_request_target:
@@ -6,8 +6,6 @@ on:
       - opened
       - synchronize
       - ready_for_review
-    paths:
-      - faststream/**
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -17,7 +15,7 @@ permissions:
   contents: write
 
 jobs:
-  check-docs-changes:
+  check-linting-and-docs-changes:
     if: github.event.pull_request.draft == false
     runs-on: ubuntu-latest
     steps:
@@ -32,6 +30,8 @@ jobs:
         uses: actions/setup-python@v5
         with:
           python-version: "3.12"
+      - name: Set $PY environment variable
+        run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
       - name: Install Dependencies
         if: steps.cache.outputs.cache-hit != 'true'
         shell: bash
@@ -39,8 +39,15 @@ jobs:
         run: |
           set -ux
           uv pip install --system -e .[dev]
+
+      - uses: pre-commit/action@v3.0.1
+        continue-on-error: true
+        with:
+          extra_args: --hook-stage manual --all-files
+
       - name: Run build docs
         run: bash scripts/build-docs.sh
+
       - name: Commit
         uses: stefanzweifel/git-auto-commit-action@v5
         with:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e4cde3a9c5..306f7c8001 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -68,3 +68,4 @@ repos:
     -   id: detect-secrets
         args: ['--baseline', '.secrets.baseline']
         exclude: package.lock.json
+        stages: [pre-commit, pre-merge-commit, manual]


Test patch:
diff --git a/.github/workflows/pr_tests.yaml b/.github/workflows/pr_tests.yaml
index a8be0eff57..b75380074e 100644
--- a/.github/workflows/pr_tests.yaml
+++ b/.github/workflows/pr_tests.yaml
@@ -38,14 +38,6 @@ jobs:
           path: ~/.cache/pre-commit
           key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }}
       - uses: pre-commit/action@v3.0.1
-        continue-on-error: true
-        with:
-          extra_args: --hook-stage manual --all-files
-      - name: Commit
-        uses: stefanzweifel/git-auto-commit-action@v5
-        with:
-          commit_message: "fix: add missing pre-commit changes"
-      - uses: pre-commit/action@v3.0.1
 
   test-basic:
     if: github.event.pull_request.draft == false