batches: Specify domain when creating a Github App#52347
Conversation
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 14b81ad...d30ab10.
|
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits d30ab10 and 40870a1 or learn more. Open explanation
|
| WebhookUUID: webhookUUID, | ||
| Domain: domain, | ||
| } | ||
| stateDeets, err := json.Marshal(stateDetails) |
There was a problem hiding this comment.
Lol I like the name. 😂
| return | ||
| } | ||
|
|
||
| cache.Set(s, stateDeets) |
There was a problem hiding this comment.
Can you explain why prior to this change we had to make webhookUUID a byte slice here, but now with the added domain property we don't have to? @BolajiOlajide
There was a problem hiding this comment.
The set method expects a byte slice as the second argument. The webhookUUID variable is a string, so we needed to typecast it into a byte slice; now that we are saving multiple values (via the struct) in the cache, we call the json.Marshal method, which returns a byte slice so we don't need to type cast. @st0nebraker
There was a problem hiding this comment.
Got it, thanks for explaining 😁
Closes [#52346](https://github.com/sourcegraph/sourcegraph/issues/52346) This PR allows the domain to be specified when creating a GitHub app. Right now it's hard coded to only work with the `repos` domain till we figure out the UX for creating a Batch Changes GitHub App. ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> * Create a GitHub app. * inspect the `github_apps` table for the newly created GitHub app - the app should have the value of `repos` in the `domain` column.
Closes #52346
This PR allows the domain to be specified when creating a GitHub app. Right now it's hard coded to only work with the
reposdomain till we figure out the UX for creating a Batch Changes GitHub App.Test plan
github_appstable for the newly created GitHub app - the app should have the value ofreposin thedomaincolumn.