auto-comment.yml•920 B
name: Add comment
on:
  issues:
    types: [opened]
  pull_request_target:
    types: [opened]
jobs:
  add-comment:
    runs-on: ubuntu-latest
    steps:
      - name: Add comment
        uses: actions/github-script@v7
        with:
          github-token: ${{ secrets.GH_ACCESS_TOKEN }}
          script: |
            const { owner, repo } = context.repo;
            const commentBody = "**Deprecation warning:** This MCP server is deprecated and will only receive critical security updates going forward. It has been superseded by [Elastic Agent Builder](https://ela.st/agent-builder-docs)'s [MCP endpoint](https://ela.st/agent-builder-mcp), which is available in Elastic 9.2.0+ and Elasticsearch Serverless projects.";
            github.rest.issues.createComment({
              owner,
              repo,
              issue_number: context.payload.issue.number,
              body: commentBody
            });