chore(evals): Unified LLM-based connector evaluation #198
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Slash Command Dispatch | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
slashCommandDispatch: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Authenticate as GitHub App | |
uses: actions/create-github-app-token@v2 | |
id: get-app-token | |
with: | |
owner: "airbytehq" | |
repositories: "connector-builder-mcp" | |
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }} | |
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }} | |
- name: Slash Command Dispatch | |
id: dispatch | |
# TODO: Revert to `peter-evans/slash-command-dispatch@v4` after PR merges: | |
# - https://github.com/peter-evans/slash-command-dispatch/pull/372/files | |
uses: aaronsteers/slash-command-dispatch@aj/fix/add-dispatched-bool-output | |
with: | |
repository: ${{ github.repository }} | |
token: ${{ steps.get-app-token.outputs.token }} | |
dispatch-type: workflow | |
issue-type: both | |
# Only run for users with 'write' permission on the main repository | |
permission: write | |
commands: | | |
autofix | |
build-connector | |
poe | |
test | |
# TODO: Add 'publish' slash command when we have time to properly map the PR number to git | |
# refs in that workflow: | |
# publish | |
# Notes regarding static-args: | |
# - Slash commands can be invoked from both issues and comments. | |
# - If the slash command is invoked from an issue, we intentionally pass 'null' as the PR number. | |
# - Comment ID will always be sent, and this is sufficient to post back status updates to the originating comment. | |
static-args: | | |
comment-id=${{ github.event.comment.id }} | |
${{ github.event.issue.pull_request != null && format('pr={0}', github.event.issue.number) || '' }} | |
- name: Edit comment with error message | |
if: steps.dispatch.outputs.error-message | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ github.event.comment.id }} | |
body: | | |
> Error: ${{ steps.dispatch.outputs.error-message }} | |
- name: Generate help text | |
id: help | |
if: > | |
startsWith(github.event.comment.body, '/') && | |
!steps.dispatch.outputs.dispatched | |
run: | | |
HELP_TEXT="The following slash commands are available: | |
- \`/autofix\` - Corrects any linting or formatting issues | |
- \`/test\` - Runs the test suite | |
- \`/uv-lock\` - Re-locks dependencies and updates the uv.lock file | |
- \`/help\` - Shows this help message" | |
if [[ "${{ github.event.comment.body }}" == "/help" ]]; then | |
echo "body=$HELP_TEXT" >> $GITHUB_OUTPUT | |
else | |
echo "body=It looks like you are trying to enter a slash command. Either the slash command is unrecognized or you don't have access to call it. | |
$HELP_TEXT" >> $GITHUB_OUTPUT | |
fi | |
- name: Post help message | |
if: > | |
startsWith(github.event.comment.body, '/') && | |
!steps.dispatch.outputs.dispatched | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ github.event.comment.id }} | |
body: ${{ steps.help.outputs.body }} |