Skip to content

Update self_hosted_integration_issues.yml #1

Update self_hosted_integration_issues.yml

Update self_hosted_integration_issues.yml #1

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

Check failure on line 34 in .github/workflows/self_hosted_integration_issues.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/self_hosted_integration_issues.yml

Invalid workflow file

You have an error in your yaml syntax on line 34
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"]
})