Skip to content

Commit

Permalink
Merge pull request #21 from maiadegraaf/more-ci
Browse files Browse the repository at this point in the history
update MirrorInternally.yml
  • Loading branch information
maiadegraaf authored Jun 28, 2024
2 parents 5ee720c + 4288d50 commit ae2c3a8
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/MirrorInternally.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,12 @@ jobs:
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: Print whether mirror issue exists
- 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
- name: Set label environment variable
run: |
if [ "${{ github.event.created }}" == "true" ]; then
echo "LABEL=new issue" >> $GITHUB_ENV
else
echo "LABEL=updated" >> $GITHUB_ENV
fi
- name: Create or Label Mirror Issue
run: |
if [ "$MIRROR_ISSUE_NUMBER" == "" ]; then
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 "$LABEL"
else
gh issue edit --repo duckdblabs/duckdb-odbc-internal $MIRROR_ISSUE_NUMBER --title "$PUBLIC_ISSUE_TITLE" --label "$LABEL"
fi

0 comments on commit ae2c3a8

Please sign in to comment.