feat(GithubApp): update default events to include 'pull_request' and streamline event handling
This commit is contained in:
@@ -277,12 +277,15 @@
|
|||||||
emails: 'read',
|
emails: 'read',
|
||||||
administration: 'read'
|
administration: 'read'
|
||||||
};
|
};
|
||||||
|
const default_events = ['push'];
|
||||||
if (preview_deployment_permissions) {
|
if (preview_deployment_permissions) {
|
||||||
default_permissions.pull_requests = 'write';
|
default_permissions.pull_requests = 'write';
|
||||||
|
default_events.push('pull_request');
|
||||||
}
|
}
|
||||||
if (administration) {
|
if (administration) {
|
||||||
default_permissions.administration = 'write';
|
default_permissions.administration = 'write';
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
name,
|
name,
|
||||||
url: baseUrl,
|
url: baseUrl,
|
||||||
@@ -297,7 +300,7 @@
|
|||||||
setup_url: `${webhookBaseUrl}/source/github/install?source=${uuid}`,
|
setup_url: `${webhookBaseUrl}/source/github/install?source=${uuid}`,
|
||||||
setup_on_update: true,
|
setup_on_update: true,
|
||||||
default_permissions,
|
default_permissions,
|
||||||
default_events: ['pull_request', 'push']
|
default_events
|
||||||
};
|
};
|
||||||
const form = document.createElement('form');
|
const form = document.createElement('form');
|
||||||
form.setAttribute('method', 'post');
|
form.setAttribute('method', 'post');
|
||||||
|
Reference in New Issue
Block a user