Skip to content

Uninstall DuckDB ODBC throughout command line #13

Uninstall DuckDB ODBC throughout command line

Uninstall DuckDB ODBC throughout command line #13

name: Create or Label Mirror Issue
on:
issues:
types:
- opened
- edited
env:
GH_TOKEN: ${{ secrets.DUCKDBLABS_BOT_TOKEN }}
TITLE_PREFIX: "[odbc/#${{ github.event.issue.number }}]"
PUBLIC_ISSUE_TITLE: ${{ github.event.issue.title }}
jobs:
create_or_label_issue:
runs-on: ubuntu-latest
steps:
- name: Get mirror issue number
run: |
gh issue list --repo duckdblabs/duckdb-odbc-internal --search "${TITLE_PREFIX}" --json title,number --state all --jq ".[] | select(.title | startswith(\"$TITLE_PREFIX\")).number" > mirror_issue_number.txt
echo "MIRROR_ISSUE_NUMBER=$(cat mirror_issue_number.txt)" >> $GITHUB_ENV
- name: Add label and or create mirror issue
run: |
if [ "$MIRROR_ISSUE_NUMBER" == "" ]; then
echo "Mirror issue with title prefix '$TITLE_PREFIX' does not exist yet"
gh issue create --repo duckdblabs/duckdb-odbc-internal --title "$TITLE_PREFIX - $PUBLIC_ISSUE_TITLE" --body "See https://github.com/duckdb/duckdb-odbc/issues/${{ github.event.issue.number }}" --label "new issue"
else
echo "Mirror issue with title prefix '$TITLE_PREFIX' exists with number $MIRROR_ISSUE_NUMBER"
gh issue edit --repo duckdblabs/duckdb-odbc-internal $MIRROR_ISSUE_NUMBER --title "$PUBLIC_ISSUE_TITLE" --label "updated"
fi