-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement multi-org config #524
Conversation
25c6cdd
to
97ac39b
Compare
97ac39b
to
05dd342
Compare
@@ -516,7 +516,7 @@ describe('DeployFeed', () => { | |||
}); | |||
|
|||
it('post message with commits in deploy link for getsentry', async () => { | |||
const octokit = await getClient(ClientType.App, GETSENTRY_ORG); | |||
const octokit = await getClient(ClientType.App, 'Enterprise'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth parameterizing the somehow for the extra coverage? Not sure if we're mocking the replies, in which case it doesn't matter, but maybe worth considering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are mocking the replies. 🐭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh ... this one wants to be GETSENTRY_ORG
though, good catch!
We end up testing both getClient
cases pretty thoroughly since both are called a ton throughout the test suite.
08bad88
to
e80f759
Compare
e80f759
to
0da91ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me, pending some small comments that are made. Going to give the approval here since I'm out tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I guess I can't really approve if the env vars aren't yet in ci.yml
yet since it'll break everything (Sorry Chad!). One thing there is that it would be nice if these env vars don't come from GH secrets in case we want to run GH graphql queries locally. They're not sensitive and it'd be nice to have those somewhere to use directly.
ISSUES_PROJECT_NODE_ID
PRODUCT_AREA_FIELD_ID
STATUS_FIELD_ID
RESPONSE_DUE_DATE_FIELD_ID
GH_WEBHOOK_SECRET='' | ||
# GitHub App Secret Key | ||
# NOTE: this *must* be on a single line, otherwise it will break | ||
# reading the secret key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need docs in here since we tell people above to look for docs in the README. Let's only maintain docs in one place.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #524 +/- ##
==========================================
+ Coverage 84.65% 85.39% +0.73%
==========================================
Files 97 97
Lines 2509 2533 +24
Branches 476 480 +4
==========================================
+ Hits 2124 2163 +39
+ Misses 378 363 -15
Partials 7 7
☔ View full report in Codecov by Sentry. |
I'm thinking about this one. The risk is that we might process a payload from a non- |
Here are the places where we call
|
I guess the opposite could also happen, an Octokit created with something other than const octokit = await getClient(ClientType.App, 'foo');
const { data } = await octokit.blah.blah({
owner: 'bar',
repo: 'baz',
}); |
Okay, I've audited all of the places where we call
|
Scrapping for parts. |
Part of #482, after #523.
This implements parsing of multiple apps from the environment. I may decide to replace
__tmp_org_placeholder__
on a separate PR first.__tmp_org_placeholder__
throughoutclean up names (puntingGH_APPS
⇒GH_ORGS
, envvars, etc.)