mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
chore: Formatting (#9939)
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
require("dotenv").config({
|
||||
require("@dotenvx/dotenvx").config({
|
||||
path: process.env.NODE_ENV === "test" ? ".env.test" : ".env",
|
||||
});
|
||||
|
||||
|
||||
@@ -63,8 +63,6 @@ export function documentEditPath(doc: Document): string {
|
||||
return `${documentPath(doc)}/edit`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function documentHistoryPath(
|
||||
doc: Document,
|
||||
revisionId?: string
|
||||
@@ -152,5 +150,3 @@ export const matchDocumentSlug =
|
||||
export const matchDocumentEdit = `/doc/${matchDocumentSlug}/edit`;
|
||||
|
||||
export const matchDocumentHistory = `/doc/${matchDocumentSlug}/history/:revisionId?`;
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export class GitHubUtils {
|
||||
*/
|
||||
public static callbackUrl(
|
||||
{ baseUrl, params }: { baseUrl: string; params?: string } = {
|
||||
baseUrl: `${env.URL}`,
|
||||
baseUrl: env.URL,
|
||||
params: undefined,
|
||||
}
|
||||
) {
|
||||
|
||||
@@ -29,7 +29,7 @@ export class LinearUtils {
|
||||
|
||||
static callbackUrl(
|
||||
{ baseUrl, params }: { baseUrl: string; params?: string } = {
|
||||
baseUrl: `${env.URL}`,
|
||||
baseUrl: env.URL,
|
||||
params: undefined,
|
||||
}
|
||||
) {
|
||||
|
||||
@@ -36,7 +36,7 @@ export class NotionUtils {
|
||||
|
||||
static callbackUrl(
|
||||
{ baseUrl, params }: { baseUrl: string; params?: string } = {
|
||||
baseUrl: `${env.URL}`,
|
||||
baseUrl: env.URL,
|
||||
params: undefined,
|
||||
}
|
||||
) {
|
||||
|
||||
@@ -35,7 +35,7 @@ export class SlackUtils {
|
||||
|
||||
static callbackUrl(
|
||||
{ baseUrl, params }: { baseUrl: string; params?: string } = {
|
||||
baseUrl: `${env.URL}`,
|
||||
baseUrl: env.URL,
|
||||
params: undefined,
|
||||
}
|
||||
) {
|
||||
@@ -46,7 +46,7 @@ export class SlackUtils {
|
||||
|
||||
static connectUrl(
|
||||
{ baseUrl, params }: { baseUrl: string; params?: string } = {
|
||||
baseUrl: `${env.URL}`,
|
||||
baseUrl: env.URL,
|
||||
params: undefined,
|
||||
}
|
||||
) {
|
||||
|
||||
@@ -787,7 +787,8 @@ export default class DeliverWebhookTask extends BaseTask<Props> {
|
||||
const failedDeliveries = deliveriesInWindow.filter(
|
||||
(delivery) => delivery.status === "failed"
|
||||
);
|
||||
const failureRate = (failedDeliveries.length / deliveriesInWindow.length) * 100;
|
||||
const failureRate =
|
||||
(failedDeliveries.length / deliveriesInWindow.length) * 100;
|
||||
|
||||
// Only log analysis if there are failures to report
|
||||
if (failedDeliveries.length > 0) {
|
||||
@@ -802,7 +803,11 @@ export default class DeliverWebhookTask extends BaseTask<Props> {
|
||||
}
|
||||
|
||||
// Check if failure rate exceeds threshold and we have enough data points
|
||||
if (failureRate >= failureRateThreshold && deliveriesInWindow.length >= DeliverWebhookTask.MIN_DELIVERIES_FOR_ANALYSIS) {
|
||||
if (
|
||||
failureRate >= failureRateThreshold &&
|
||||
deliveriesInWindow.length >=
|
||||
DeliverWebhookTask.MIN_DELIVERIES_FOR_ANALYSIS
|
||||
) {
|
||||
Logger.warn("Disabling webhook due to high failure rate", {
|
||||
subscriptionId: subscription.id,
|
||||
failureRate: Math.round(failureRate * 100) / 100,
|
||||
|
||||
@@ -50,9 +50,9 @@ Webhook settings: ${teamUrl}/settings/webhooks
|
||||
<Body>
|
||||
<Heading>Webhook disabled</Heading>
|
||||
<p>
|
||||
Your webhook ({webhookName}) has been automatically disabled due to a
|
||||
high failure rate in recent delivery attempts. You can re-enable by
|
||||
editing the webhook.
|
||||
Your webhook ({webhookName}) has been automatically disabled due to
|
||||
a high failure rate in recent delivery attempts. You can re-enable
|
||||
by editing the webhook.
|
||||
</p>
|
||||
<EmptySpace height={10} />
|
||||
<p>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.sequelize.transaction(async transaction => {
|
||||
await queryInterface.sequelize.transaction(async (transaction) => {
|
||||
await queryInterface.addColumn(
|
||||
"shares",
|
||||
"collectionId",
|
||||
@@ -24,7 +24,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
async down(queryInterface, Sequelize) {
|
||||
await queryInterface.sequelize.transaction(async transaction => {
|
||||
await queryInterface.sequelize.transaction(async (transaction) => {
|
||||
await queryInterface.removeColumn("shares", "collectionId", {
|
||||
transaction,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user