Skip to content

Commit

Permalink
Merge pull request #1106 from argos-ci/fix-pr-sync
Browse files Browse the repository at this point in the history
fix(pull-request): fix sync when draft / ready to review
  • Loading branch information
gregberge authored Nov 22, 2023
2 parents 6ed9b4d + 53882f3 commit 698ead0
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions apps/backend/src/synchronize/github/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,14 @@ export const handleGitHubEvents = async ({
}
case "pull_request": {
if (
!["closed", "edited", "reopened", "synchronize"].includes(
payload.action,
)
![
"closed",
"edited",
"reopened",
"synchronize",
"ready_for_review",
"converted_to_draft",
].includes(payload.action)
) {
return;
}
Expand All @@ -151,7 +156,15 @@ export const handleGitHubEvents = async ({

if (!pr) return;

if (["closed", "edited", "reopened"].includes(payload.action)) {
if (
[
"closed",
"edited",
"reopened",
"ready_for_review",
"converted_to_draft",
].includes(payload.action)
) {
await pr
.$clone()
.$query()
Expand Down

0 comments on commit 698ead0

Please sign in to comment.