diff --git a/.github/workflows/self_hosted_integration_issues.yml b/.github/workflows/self_hosted_integration_issues.yml new file mode 100644 index 00000000000000..99e2e5d3d6963b --- /dev/null +++ b/.github/workflows/self_hosted_integration_issues.yml @@ -0,0 +1,44 @@ +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"] + })