From 6213d2cf932cdb3f6b78e075764e6545625c6a27 Mon Sep 17 00:00:00 2001 From: Dirk Kulawiak Date: Thu, 18 Jun 2026 07:26:40 +0200 Subject: [PATCH] Add mirror issue GHA --- .github/workflows/mirror-issues.yaml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/mirror-issues.yaml diff --git a/.github/workflows/mirror-issues.yaml b/.github/workflows/mirror-issues.yaml new file mode 100644 index 000000000..6178714d4 --- /dev/null +++ b/.github/workflows/mirror-issues.yaml @@ -0,0 +1,44 @@ +name: Mirror labeled issues to client repos + +on: + issues: + types: [labeled] + +jobs: + mirror: + if: github.event.label.name == 'needs-mirror' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + repo: + - typescript-client + - java-client + - weaviate-go-client + - csharp-client + steps: + - name: Mint app token for weaviate/${{ matrix.repo }} + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.MIRROR_APP_ID }} + private-key: ${{ secrets.MIRROR_APP_PRIVATE_KEY }} + owner: weaviate + repositories: ${{ matrix.repo }} + + - name: Create mirrored issue + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + SRC_REPO: ${{ github.repository }} + SRC_NUMBER: ${{ github.event.issue.number }} + SRC_URL: ${{ github.event.issue.html_url }} + SRC_TITLE: ${{ github.event.issue.title }} + SRC_BODY: ${{ github.event.issue.body }} + TARGET: weaviate/${{ matrix.repo }} + run: | + body=$(printf '> Mirrored from %s#%s (%s)\n\n%s' \ + "$SRC_REPO" "$SRC_NUMBER" "$SRC_URL" "$SRC_BODY") + gh issue create \ + --repo "$TARGET" \ + --title "$SRC_TITLE" \ + --body "$body"