Skip to content

Github webhook errors #839

Merged
epipav merged 2 commits intomainfrom
bugfix/github-teams-and-multiple-assignees
May 9, 2023
Merged

Github webhook errors #839
epipav merged 2 commits intomainfrom
bugfix/github-teams-and-multiple-assignees

Conversation

@epipav
Copy link
Copy Markdown
Collaborator

@epipav epipav commented May 9, 2023

  • Error state webhook processing using npm script
  • Github integration now supports plural form assignee and request_review pr events
  • Github integration now also supports these events from teams
  • Refactored OrganizationRepository.findById method - It was trying to eager load members-activities-identities of a single organization, causing problems when an organization is big

Changes proposed ✍️

What

🤖 Generated by Copilot at 17a5a0b

This pull request adds and improves several features and fixes related to webhooks, GitHub integration, and queue monitoring. It adds a new method to query failed webhooks and a new type for error webhooks. It refactors the organization repository to use a more efficient query. It adds support for team review requests and fixes a bug in star/unstar events in GitHub webhooks. It adds new modules for GraphQL queries and types for GitHub teams. It changes the log level for display options errors. It adds a new function to get the current queue size.

🤖 Generated by Copilot at 17a5a0b

We're fetching team members from GitHub with GraphQL
We're fixing bugs and adding types to make it stable
We're heaving on the queue and the webhooks with a smile
We're coding for the wind, me hearties, coding for the wind

Why

How

🤖 Generated by Copilot at 17a5a0b

  • Implement and optimize UI feature for viewing and retrying failed webhooks
  • Import and use ErrorWebhook and WebhookType types in incomingWebhookRepository.ts (link)
  • Add findError method to IncomingWebhookRepository class to query error webhooks by type and pagination (link)
  • Replace findById method in OrganizationRepository class with a more efficient one that uses raw SQL and subqueries (link)
  • Remove _populateRelations method from OrganizationRepository class as it is no longer needed (link)
  • Import and use TeamsQuery and GithubWebhookTeam modules in githubIntegrationService.ts (link)
  • Add logic branch to parseWebhook method to handle multiple reviewers or teams and fetch team members from GitHub (link)
  • Add condition to parsePullRequestEvents method to create activities for team members (link)
  • Add TeamsQuery class to teams.ts module to query GitHub for team members using GraphQL (link)
  • Add GithubWebhookTeam interface to types.ts module to define the shape of a team object from GitHub (link)
  • Simplify logic branch for merged pull request by removing redundant variable (link)
  • Fix bug where 'star' event with null starred_at property was treated as a valid activity (link)
  • Reduce log level for display options error in activityDisplayService.ts (link)
  • Add utility function to get queue size in aws.ts (link)
  • Add ErrorWebhook interface to webhooks.ts module (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

…error state webhooks - organizationRepository.findById refactored
@epipav epipav added the Bug Created by Linear-GitHub Sync label May 9, 2023
@epipav epipav self-assigned this May 9, 2023
@epipav epipav requested review from joanreyero and themarolt May 9, 2023 13:11
@epipav epipav marked this pull request as ready for review May 9, 2023 13:11
@epipav epipav changed the title plural form assignee and request_review support, process-webhook for … Github webhook errors May 9, 2023
Comment thread backend/src/bin/scripts/process-webhook.ts Outdated
@epipav epipav merged commit ad87e29 into main May 9, 2023
@epipav epipav deleted the bugfix/github-teams-and-multiple-assignees branch May 9, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants