Update self_hosted_integration_issues.yml #1
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: Comment on self-hosted integration issues | ||
| on: | ||
| issues: | ||
| types: [opened] | ||
| jobs: | ||
| comment: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| issues: write | ||
| steps: | ||
| - name: Check if issue contains keywords | ||
| id: check | ||
| run: | | ||
| body="${{ github.event.issue.body }}" | ||
| shopt -s nocasematch | ||
| if [[ "$body" == *"self-hosted (https://develop.sentry.dev/self-hosted/)"* && "$body" == *"integration"* && "$body" == *"sentry.io"* ]]; then | ||
| echo "match=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "match=false" >> $GITHUB_OUTPUT | ||
| fi | ||
| - name: Comment on issue | ||
| if: steps.check.outputs.match == 'true' | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| github.rest.issues.createComment({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| body: "Hi! 👋 It looks like you're asking about an integration with self-hosted Sentry. Integrations work differently on self-hosted Sentry so we created separate docs here: https://develop.sentry.dev/integrations/. Please take a look and let us know if you need further help." | ||
| }) | ||
| - name: Add 'Waiting for: Community' label | ||
| if: steps.check.outputs.match == 'true' | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| github.rest.issues.addLabels({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| labels: ["Waiting for: Community"] | ||
| }) | ||