Skip to content

Add fallback query to GitHub integration commits#1048

Merged
garrrikkotua merged 3 commits intomainfrom
fix/github-commits-addittions
Jun 27, 2023
Merged

Add fallback query to GitHub integration commits#1048
garrrikkotua merged 3 commits intomainfrom
fix/github-commits-addittions

Conversation

@garrrikkotua
Copy link
Copy Markdown
Contributor

@garrrikkotua garrrikkotua commented Jun 27, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at e49b595

This pull request improves the robustness and consistency of the Github integration service by adding a fallback query for pull request commits. The new query omits the additions field, which can cause errors for large commits, and the service handles the missing data accordingly. The changes affect the backend/src/serverless/integrations folder, mainly the githubIntegrationService.ts and pullRequestCommitsNoAdditions.ts files.

copilot:poem

Why

How

🤖 Generated by Copilot at e49b595

  • Add a new class PullRequestCommitsQueryNoAdditions to fetch pull request commits without the additions field (link)
  • Handle query errors due to large additions field and retry with the new class in GithubIntegrationService.fetchStream (link)
  • Allow parseActivities to accept both types of commit records and use zero as default for missing additions field (link, link)
  • Import the new class in githubIntegrationService.ts (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.

@garrrikkotua garrrikkotua added the Bug Created by Linear-GitHub Sync label Jun 27, 2023
@garrrikkotua garrrikkotua merged commit 6d4b10e into main Jun 27, 2023
@garrrikkotua garrrikkotua deleted the fix/github-commits-addittions branch June 27, 2023 15:38
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.

1 participant