Skip to content

(UnknownError) "userCommand.indexes[0].fields" is required when creating vector search index on local deployments #12

(UnknownError) "userCommand.indexes[0].fields" is required when creating vector search index on local deployments

(UnknownError) "userCommand.indexes[0].fields" is required when creating vector search index on local deployments #12

Workflow file for this run

---
name: Create JIRA ticket for new issues
on:
issues:
types: [opened]
permissions:
issues: write
contents: read
jobs:
jira_task:
name: Create Jira issue
runs-on: ubuntu-latest
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
with:
config: ${{ vars.PERMISSIONS_CONFIG }}
- name: Create JIRA ticket
id: create
shell: bash
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_URL: ${{ github.event.issue.html_url }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_ASSIGNEE: ${{ secrets.ASSIGNEE_JIRA_TICKET }}
run: |
json_response=$(curl --request POST \
--url 'https://jira.mongodb.org/rest/api/2/issue' \
--header 'Authorization: Bearer '"${JIRA_API_TOKEN}" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"fields": {
"project": {
"id": "10984"
},
"summary": "HELP: GitHub Issue n. '"${ISSUE_NUMBER}"'",
"issuetype": {
"id": "12"
},
"customfield_12751": [{
"id": "14562"
}],
"description": "This ticket tracks the following GitHub issue: '"${ISSUE_URL}"'.",
"components": [
{
"id": "30450"
}
],
"assignee": {
"name": "'"${JIRA_ASSIGNEE}"'"
}
}
}')
echo "Response: ${json_response}"
JIRA_TICKET_ID=$(echo "${json_response}" | jq -r '.key')
echo "The following JIRA ticket has been created: ${JIRA_TICKET_ID}"
echo "jira-ticket-id=${JIRA_TICKET_ID}" >> "${GITHUB_OUTPUT}"
- name: Add comment
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.issue.number }}
body: |
Thanks for opening this issue. The ticket [${{ steps.create.outputs.jira-ticket-id }}](https://jira.mongodb.org/browse/${{ steps.create.outputs.jira-ticket-id }}) was created for internal tracking.