Skip to content

Commit 4325af2

Browse files
committed
Merge pull request #953 from Fryguy/fix_if_deleted
Fix issue if branch is already deleted
2 parents f80ffa1 + 89e7eca commit 4325af2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/close_prs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ def delete_branch(repo, branch, dry_run:, **_)
2424
if dry_run
2525
puts "** dry_run: github.delete_branch(#{repo.inspect}, #{branch.inspect})".light_black
2626
else
27-
github.delete_branch(repo, branch)
27+
begin
28+
github.delete_branch(repo, branch)
29+
rescue Octokit::UnprocessableEntity
30+
# Ignore since it's already deleted
31+
end
2832
end
2933
end
3034

0 commit comments

Comments
 (0)