feat: committees implementation [CM-1066]#3995
Conversation
Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
1 similar comment
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
There was a problem hiding this comment.
Pull request overview
Adds “committees” as a first-class platform across the pipeline (types/config, Snowflake connector extraction+transform, and DB activity type registration) so committee membership events can be exported and represented as activities.
Changes:
- Added
committeesto platform/org source enums and organization attribute source priority. - Implemented Snowflake connector source query + transformer for committee membership events.
- Added DB migration to register new committee membership activity types.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/libs/types/src/enums/platforms.ts | Adds PlatformType.COMMITTEES. |
| services/libs/types/src/enums/organizations.ts | Adds COMMITTEES to org source enums. |
| services/libs/integrations/src/integrations/index.ts | Re-exports committees integration types. |
| services/libs/integrations/src/integrations/committees/types.ts | Defines committee activity types + scoring grid. |
| services/libs/data-access-layer/src/organizations/attributesConfig.ts | Adds committees to org attribute source priority list. |
| services/apps/snowflake_connectors/src/integrations/types.ts | Adds committees datasource name. |
| services/apps/snowflake_connectors/src/integrations/index.ts | Registers committees platform and datasource. |
| services/apps/snowflake_connectors/src/integrations/committees/committees/buildSourceQuery.ts | Adds Snowflake query for committee membership export. |
| services/apps/snowflake_connectors/src/integrations/committees/committees/transformer.ts | Transforms exported rows into committee membership activities. |
| backend/src/database/migrations/V1775064222__addCommitteesActivityTypes.sql | Inserts committees activity types into activityTypes. |
| backend/src/database/migrations/U1775064222__addCommitteesActivityTypes.sql | Undo migration placeholder (empty). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return null | ||
| } | ||
|
|
||
| const committeeId = (row.COMMITTEE_ID as string).trim() |
There was a problem hiding this comment.
committeeId is computed via (row.COMMITTEE_ID as string).trim() without null/undefined protection. If COMMITTEE_ID is missing or not a string for any row, this will throw and safeTransformRow will skip the row. Consider using optional chaining + explicit skip/log when COMMITTEE_ID is not present.
| const committeeId = (row.COMMITTEE_ID as string).trim() | |
| const rawCommitteeId = row.COMMITTEE_ID | |
| const committeeId = | |
| typeof rawCommitteeId === 'string' && rawCommitteeId.trim().length > 0 | |
| ? rawCommitteeId.trim() | |
| : null | |
| if (!committeeId) { | |
| log.warn( | |
| { sfid: row.SFID, rawCommitteeId: row.COMMITTEE_ID, email }, | |
| 'Skipping row: missing or invalid committeeId', | |
| ) | |
| return null | |
| } |
Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
|
Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
cb61fdd to
2f5b708
Compare
Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
|
|
||
| export const COMMITTEES_GRID: Record<CommitteesActivityType, IActivityScoringGrid> = { | ||
| [CommitteesActivityType.ADDED_TO_COMMITTEE]: { score: 1 }, | ||
| [CommitteesActivityType.REMOVED_FROM_COMMITTEE]: { score: 1 }, |
There was a problem hiding this comment.
Removal activity score inconsistent with codebase pattern
Medium Severity
REMOVED_FROM_COMMITTEE has score: 1, which is inconsistent with the established codebase scoring convention. Analogous removal activities use negative scores: UNSTAR is -2 (reversal of STAR at 2), and MEMBER_LEAVE is -2 (reversal of MEMBER_JOIN at 2). A committee removal with a positive score would incorrectly boost member engagement metrics.
Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Reviewed by Cursor Bugbot for commit 0ba6e3e. Configure here.
| identities, | ||
| }, | ||
| ] | ||
| } |
There was a problem hiding this comment.
Duplicated buildOrganizations logic across transformers
Low Severity
The buildOrganizations method in CommitteesCommitteesTransformer is nearly identical to the same method in CventTransformer and TncTransformerBase, differing only in OrganizationSource and PlatformType constants. This duplicated logic across three transformers increases the risk of inconsistent bug fixes and maintenance burden. It could live in TransformerBase parameterized by the platform-specific values.
Reviewed by Cursor Bugbot for commit 0ba6e3e. Configure here.


This pull request introduces support for "committees" as a new platform throughout the data pipeline, including database, integrations, and attribute configuration. The main changes add new activity types for committee membership, implement the data extraction and transformation logic for committee events, and update the type system and configuration to recognize "committees" as a first-class source.
Support for "committees" platform and data pipeline:
added-to-committeeandremoved-from-committee, to theactivityTypestable for tracking committee membership events.Type system and configuration updates:
PlatformType,OrganizationSource, andOrganizationAttributeSourceenums, and included it in the organization attribute source priority list, ensuring proper handling and prioritization. [1] [2] [3] [4]Note
Medium Risk
Adds a new data source and transformer to the Snowflake ingestion pipeline and introduces new activity types, which could affect export volume/deduping and downstream activity/organization attribution if the query or mapping is incorrect.
Overview
Adds first-class support for the
committeesplatform across the pipeline.Introduces a DB migration that registers new activity types (
added-to-committee,removed-from-committee) and a new integrations library export (CommitteesActivityType+COMMITTEES_GRID) used for scoring.Implements a new Snowflake connector source (
buildSourceQuery) and transformer that export committee membership records (including deletes), map them into activities with segment routing and optional organization domain identities, and registers this new data source (DataSourceName.COMMITTEES_COMMITTEES) in the platform registry. Also addsCOMMITTEESto platform/org source enums and includes it in organization attribute source priority.Reviewed by Cursor Bugbot for commit 0ba6e3e. Bugbot is set up for automated code reviews on this repo. Configure here.