Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/mirror-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Mirror labeled issues to client repos

on:
issues:
types: [labeled]

jobs:
Comment on lines +3 to +7
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:
Comment on lines +20 to +23
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"
Loading