Skip to content

Commit 4a04f6c

Browse files
committed
Add assign_to input to the auto-update workflow
Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
1 parent ac3d08e commit 4a04f6c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/update-toolhive-reference.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
description: 'ToolHive version to update reference docs for'
88
required: true
99
default: 'latest'
10+
assign_to:
11+
description: 'GitHub username to assign the PR to (optional)'
12+
required: false
1013
repository_dispatch:
1114
types: [published-release]
1215

@@ -41,6 +44,20 @@ jobs:
4144
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
4245
fi
4346
47+
- name: Determine assignee
48+
id: get-assignee
49+
run: |
50+
if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
51+
ASSIGNEE="${{ github.event.client_payload.assign_to }}"
52+
else
53+
ASSIGNEE="${{ github.event.inputs.assign_to }}"
54+
fi
55+
# Filter out github-actions bot (can't be assigned to PRs)
56+
if [[ "$ASSIGNEE" =~ ^github-actions ]]; then
57+
ASSIGNEE=""
58+
fi
59+
echo "assign_to=$ASSIGNEE" >> $GITHUB_OUTPUT
60+
4461
- name: Run update script
4562
id: imports
4663
run: |
@@ -75,5 +92,6 @@ jobs:
7592
Update ToolHive reference docs for ${{ steps.imports.outputs.version }}
7693
labels: |
7794
autogen-docs
95+
assignees: ${{ steps.get-assignee.outputs.assign_to }}
7896
delete-branch: true
7997
sign-commits: true

0 commit comments

Comments
 (0)