Skip to content

Commit cd3e2ec

Browse files
authored
🔧 chore(github): update github app setup instructions for sentry.conf.py (#15047)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR The instructions for setting up github weren't clear if you are using `sentry.conf.py`, so i added a quick note. I also put a reminder for a common mistake people make when copying their secret into their config ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 90bc95b commit cd3e2ec

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

develop-docs/integrations/github.mdx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,35 @@ github-app.private-key: |
9595
privatekeyprivatekeyprivatekeyprivatekey
9696
-----END RSA PRIVATE KEY-----
9797
```
98+
99+
You can also use a `sentry.conf.py` file to store your configuration as follows:
100+
101+
```python
102+
from sentry.conf.server import SENTRY_OPTIONS
103+
104+
# App ID
105+
SENTRY_OPTIONS["github-app.id"] = GITHUB_APP_ID
106+
# App Name
107+
SENTRY_OPTIONS["github-app.name"] = GITHUB_APP_NAME
108+
# Client ID
109+
SENTRY_OPTIONS["github-app.client-id"] = GITHUB_CLIENT_ID
110+
# Client Secret
111+
SENTRY_OPTIONS["github-app.client-secret"] = GITHUB_CLIENT_SECRET
112+
# Webhook Secret
113+
SENTRY_OPTIONS["github-app.webhook-secret"] = GITHUB_WEBHOOK_SECRET
114+
115+
SENTRY_OPTIONS[
116+
"github-app.private-key"
117+
] = """
118+
-----BEGIN RSA PRIVATE KEY-----
119+
privatekeyprivatekeyprivatekeyprivatekey
120+
privatekeyprivatekeyprivatekeyprivatekey
121+
privatekeyprivatekeyprivatekeyprivatekey
122+
privatekeyprivatekeyprivatekeyprivatekey
123+
privatekeyprivatekeyprivatekeyprivatekey
124+
-----END RSA PRIVATE KEY-----
125+
"""
126+
127+
```
128+
129+
Take note that your private key should be a multiline string without any whitespace before the start of a new line of the key.

0 commit comments

Comments
 (0)