Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit d2425b5

Browse files
authored
DOP-3665: Remove private field from payload (#839)
1 parent f2b5539 commit d2425b5

File tree

7 files changed

+1
-8
lines changed

7 files changed

+1
-8
lines changed

api/controllers/v1/github.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ async function prepGithubPushPayload(githubEvent: any, branchRepository: BranchR
4949
repoName: githubEvent.repository.name,
5050
branchName: githubEvent.ref.split('/')[2],
5151
isFork: githubEvent.repository.fork,
52-
private: githubEvent.repository.private,
5352
isXlarge: true,
5453
repoOwner: githubEvent.repository.owner.login,
5554
url: githubEvent.repository.clone_url,
@@ -69,7 +68,7 @@ export const TriggerBuild = async (event: any = {}, context: any = {}): Promise<
6968
const consoleLogger = new ConsoleLogger();
7069
const jobRepository = new JobRepository(db, c, consoleLogger);
7170
const branchRepository = new BranchRepository(db, c, consoleLogger);
72-
const sig = event.headers['X-Hub-Signature-256'];
71+
7372
if (!validateJsonWebhook(event, c.get<string>('githubSecret'))) {
7473
const errMsg = "X-Hub-Signature incorrect. Github webhook token doesn't match";
7574
return {

api/controllers/v1/slack.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ function createPayload(
244244
aliased,
245245
urlSlug,
246246
isFork: true,
247-
private: repoOwner === '10gen',
248247
isXlarge: true,
249248
repoOwner,
250249
url: 'https://github.com/' + repoOwner + '/' + repoName,

api/controllers/v2/github.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ async function prepGithubPushPayload(
5454
repoName: githubEvent.repository.name,
5555
branchName: githubEvent.ref.split('/')[2],
5656
isFork: githubEvent.repository.fork,
57-
private: githubEvent.repository.private,
5857
repoOwner: githubEvent.repository.owner.login,
5958
url: githubEvent.repository.clone_url,
6059
newHead: githubEvent.after,

api/controllers/v2/slack.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ function createPayload(
261261
aliased,
262262
urlSlug,
263263
isFork: true,
264-
private: repoOwner === '10gen',
265264
repoOwner,
266265
url: 'https://github.com/' + repoOwner + '/' + repoName,
267266
newHead,

src/entities/job.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export type Payload = {
2424
repoName: string;
2525
branchName: string;
2626
isFork: boolean;
27-
private: boolean;
2827
isXlarge: boolean | null | undefined;
2928
repoOwner: string;
3029
url: string;

tests/data/fullDoc.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default {
3535
aliased: true,
3636
urlSlug: 'upcoming',
3737
isFork: true,
38-
private: false,
3938
isXlarge: true,
4039
repoOwner: 'mongodb',
4140
url: 'https://github.com/mongodb/docs-java',

tests/data/fullDocWrongUrl.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default {
3535
aliased: true,
3636
urlSlug: 'upcoming',
3737
isFork: true,
38-
private: false,
3938
isXlarge: true,
4039
repoOwner: 'mongodb',
4140
url: 'https://github.com/mongodb/docs-java',

0 commit comments

Comments
 (0)