Skip to content

Commit

Permalink
Don't throw error if deleting branch failed (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
yqiu24 authored Nov 16, 2023
1 parent 284e30d commit 7b71822
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ def delete_branches(self, branches: list[str]) -> None:
response = requests.request(method='DELETE', url=url, headers=self.make_headers())
if response.status_code != 204:
print(f'Failed to delete branch `{branch}`')
raise RuntimeError(f'Failed to make DELETE request to {url}. {response} {response.json()}')
# Warn if deleting a single branch failed, but continue the rest of the action
print(f'Failed to make DELETE request to {url}. {response} {response.json()}')

print(f'Branch `{branch}` DELETED!')

Expand Down

0 comments on commit 7b71822

Please sign in to comment.