[Bug]: Incorrect logging capability declaration causing connection errors in MCP Inspector #37
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
--- | |
# This workflow automatically creates JIRA tickets when GitHub issues are opened | |
# and closes JIRA tickets when GitHub issues are closed. | |
# | |
# Required secrets: | |
# - JIRA_API_TOKEN: Your JIRA API token | |
# | |
name: Create and close JIRA tickets for GitHub issues | |
on: | |
issues: | |
types: [opened, labeled, closed] | |
permissions: | |
issues: write | |
contents: read | |
jobs: | |
jira_task: | |
name: Create Jira issue | |
runs-on: ubuntu-latest | |
if: github.event.action == 'opened' || github.event.label.name == 'create-jira' | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@v1 | |
with: | |
config: ${{ vars.PERMISSIONS_CONFIG }} | |
- name: Create JIRA ticket | |
uses: mongodb/apix-action/create-jira@v13 | |
id: create | |
continue-on-error: true | |
with: | |
token: ${{ secrets.JIRA_API_TOKEN }} | |
project-key: MCP | |
summary: "HELP: GitHub Issue n. ${{ github.event.issue.number }}" | |
issuetype: Bug | |
description: "This ticket tracks the following GitHub issue: ${{ github.event.issue.html_url }}." | |
extra-data: | | |
{ | |
"fields": { | |
"customfield_12751": [ | |
{ | |
"id": "27247" | |
}, | |
{ | |
"id": "27326" | |
} | |
] | |
} | |
} | |
- name: Show result | |
run: | | |
echo "JIRA action result: ${{ steps.create.outputs.issue-key || 'FAILED' }}" | |
- name: Add comment | |
if: steps.create.outputs.issue-key | |
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 | |
with: | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
Thanks for opening this issue. The ticket [${{ steps.create.outputs.issue-key }}](https://jira.mongodb.org/browse/${{ steps.create.outputs.issue-key }}) was created for internal tracking. | |
- name: Remove create-jira label | |
if: github.event.action == 'labeled' && github.event.label.name == 'create-jira' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
try { | |
await github.rest.issues.removeLabel({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
name: 'create-jira' | |
}); | |
console.log('✅ Removed create-jira label'); | |
} catch (error) { | |
console.log('⚠️ Could not remove create-jira label:', error.message); | |
} | |
close_jira_task: | |
name: Close Jira issue | |
runs-on: ubuntu-latest | |
if: github.event.action == 'closed' | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@v1 | |
with: | |
config: ${{ vars.PERMISSIONS_CONFIG }} | |
- name: Find JIRA ticket by GitHub issue number | |
id: find_jira | |
uses: mongodb/apix-action/find-jira@v13 | |
with: | |
token: ${{ secrets.JIRA_API_TOKEN }} | |
jql: "project = MCP AND description ~ '${{ github.event.issue.html_url }}'" | |
- name: Close JIRA ticket | |
if: steps.find_jira.outputs.found == 'true' | |
uses: mongodb/apix-action/transition-jira@v13 | |
id: close_jira_ticket | |
continue-on-error: true | |
with: | |
token: ${{ secrets.JIRA_API_TOKEN }} | |
issue-key: ${{ steps.find_jira.outputs.issue-key }} | |
transition-id: 1381 # Resolved | |
resolution: Fixed | |
- name: Add closure comment | |
if: steps.close_jira_ticket.outcome == 'success' | |
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 | |
with: | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
The corresponding JIRA ticket has been automatically closed. |