-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Expand file tree
/
Copy pathself_hosted_integration_issues.yml
More file actions
44 lines (42 loc) · 1.62 KB
/
self_hosted_integration_issues.yml
File metadata and controls
44 lines (42 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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"]
})