Optimize merge queue to only run E2E and integrate prettier into lint (#18459)
## Summary - **Merge queue optimization**: Created a dedicated `ci-merge-queue.yaml` workflow that only runs Playwright E2E tests on `ubuntu-latest-8-cores`. Removed `merge_group` trigger from all 7 existing CI workflows (front, server, shared, website, sdk, zapier, docker-compose). The merge queue goes from ~30+ parallel jobs to a single focused E2E job. - **Label-based merge queue simulation**: Added `run-merge-queue` label support so developers can trigger the exact merge queue E2E pipeline on any open PR before it enters the queue. - **Prettier in lint**: Chained `prettier --check` into `lint` and `prettier --write` into `lint --configuration=fix` across `nx.json` defaults, `twenty-front`, and `twenty-server`. Prettier formatting errors are now caught by `lint` and fixed by `lint:fix` / `lint:diff-with-main --configuration=fix`. ## After merge (manual repo settings) Update GitHub branch protection required status checks: 1. Remove old per-workflow merge queue checks (`ci-front-status-check`, `ci-e2e-status-check`, `ci-server-status-check`, etc.) 2. Add `ci-merge-queue-status-check` as the required check for the merge queue
This commit is contained in:
@@ -30,14 +30,14 @@ export class MyService {
|
||||
|
||||
// Track a workspace event
|
||||
auditService.insertWorkspaceEvent(CUSTOM_DOMAIN_ACTIVATED_EVENT, {});
|
||||
|
||||
|
||||
// Track an object event
|
||||
auditService.createObjectEvent(OBJECT_RECORD_CREATED_EVENT, {
|
||||
recordId: 'record-id',
|
||||
objectMetadataId: 'object-metadata-id',
|
||||
// other properties
|
||||
});
|
||||
|
||||
|
||||
// Track a pageview
|
||||
auditService.createPageviewEvent('page-name', {
|
||||
href: '/path',
|
||||
@@ -82,12 +82,14 @@ Then update the `events.type.ts` file:
|
||||
|
||||
```typescript
|
||||
// src/engine/core-modules/analytics/types/events.type.ts
|
||||
import { MY_EVENT, MyEventTrackEvent } from '../utils/events/track/my-feature/my-event';
|
||||
import {
|
||||
MY_EVENT,
|
||||
MyEventTrackEvent,
|
||||
} from '../utils/events/track/my-feature/my-event';
|
||||
|
||||
// Add to the union type
|
||||
export type TrackEventName =
|
||||
| typeof MY_EVENT
|
||||
// ... other event names;
|
||||
export type TrackEventName = typeof MY_EVENT;
|
||||
// ... other event names;
|
||||
|
||||
// Add to the TrackEvents interface
|
||||
export interface TrackEvents {
|
||||
@@ -96,9 +98,8 @@ export interface TrackEvents {
|
||||
}
|
||||
|
||||
// The TrackEventProperties type will automatically use the new event
|
||||
export type TrackEventProperties<T extends TrackEventName> = T extends keyof TrackEvents
|
||||
? TrackEvents[T]['properties']
|
||||
: object;
|
||||
export type TrackEventProperties<T extends TrackEventName> =
|
||||
T extends keyof TrackEvents ? TrackEvents[T]['properties'] : object;
|
||||
```
|
||||
|
||||
## API
|
||||
@@ -136,9 +137,8 @@ export interface TrackEvents {
|
||||
}
|
||||
|
||||
// Use the mapping to extract properties for each event type
|
||||
export type TrackEventProperties<T extends TrackEventName> = T extends keyof TrackEvents
|
||||
? TrackEvents[T]['properties']
|
||||
: object;
|
||||
export type TrackEventProperties<T extends TrackEventName> =
|
||||
T extends keyof TrackEvents ? TrackEvents[T]['properties'] : object;
|
||||
```
|
||||
|
||||
This approach makes it easier to add new events without having to modify a complex nested conditional type.
|
||||
|
||||
+1
-3
@@ -3,6 +3,4 @@ var main = async (params) => {
|
||||
const message = `Hello, input: ${a} and ${b}`;
|
||||
return { message };
|
||||
};
|
||||
export {
|
||||
main
|
||||
};
|
||||
export { main };
|
||||
|
||||
Reference in New Issue
Block a user