File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Create Internal issue when the "High Priority" label is applied
2
+ on :
3
+ issues :
4
+ types :
5
+ - labeled
6
+
7
+ env :
8
+ GH_TOKEN : ${{ secrets.DUCKDBLABS_BOT_TOKEN }}
9
+ # an event triggering this workflow is either an issue or a pull request,
10
+ # hence only one of the numbers will be filled in the TITLE_PREFIX
11
+ TITLE_PREFIX : " [duckdb-rs/#${{ github.event.issue.number }}]"
12
+ PUBLIC_ISSUE_TITLE : ${{ github.event.issue.title }}
13
+
14
+ jobs :
15
+ create_or_label_issue :
16
+ if : github.event.label.name == 'High Priority'
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - name : Get mirror issue number
20
+ run : |
21
+ gh issue list --repo duckdblabs/duckdb-internal --search "${TITLE_PREFIX}" --json title,number --jq ".[] | select(.title | startswith(\"$TITLE_PREFIX\")).number" > mirror_issue_number.txt
22
+ echo "MIRROR_ISSUE_NUMBER=$(cat mirror_issue_number.txt)" >> $GITHUB_ENV
23
+
24
+ - name : Print whether mirror issue exists
25
+ run : |
26
+ if [ "$MIRROR_ISSUE_NUMBER" == "" ]; then
27
+ echo "Mirror issue with title prefix '$TITLE_PREFIX' does not exist yet"
28
+ else
29
+ echo "Mirror issue with title prefix '$TITLE_PREFIX' exists with number $MIRROR_ISSUE_NUMBER"
30
+ fi
31
+
32
+ - name : Create or label issue
33
+ run : |
34
+ if [ "$MIRROR_ISSUE_NUMBER" == "" ]; then
35
+ gh issue create --repo duckdblabs/duckdb-internal --label "Rust" --label "High Priority" --title "$TITLE_PREFIX - $PUBLIC_ISSUE_TITLE" --body "See https://github.com/duckdb/duckdb/issues/${{ github.event.issue.number }}"
36
+ fi
You can’t perform that action at this time.
0 commit comments