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
18 changes: 18 additions & 0 deletions .github/workflows/update-toolhive-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
description: 'ToolHive version to update reference docs for'
required: true
default: 'latest'
assign_to:
description: 'GitHub username to assign the PR to (optional)'
required: false
repository_dispatch:
types: [published-release]

Expand Down Expand Up @@ -41,6 +44,20 @@ jobs:
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
fi

- name: Determine assignee
id: get-assignee
run: |
if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
ASSIGNEE="${{ github.event.client_payload.assign_to }}"
else
ASSIGNEE="${{ github.event.inputs.assign_to }}"
fi
# Filter out github-actions bot (can't be assigned to PRs)
if [[ "$ASSIGNEE" =~ ^github-actions ]]; then
ASSIGNEE=""
fi
echo "assign_to=$ASSIGNEE" >> $GITHUB_OUTPUT

- name: Run update script
id: imports
run: |
Expand Down Expand Up @@ -75,5 +92,6 @@ jobs:
Update ToolHive reference docs for ${{ steps.imports.outputs.version }}
labels: |
autogen-docs
assignees: ${{ steps.get-assignee.outputs.assign_to }}
delete-branch: true
sign-commits: true