Skip to content

Commit 7f6712d

Browse files
authored
Merge pull request #20 from vitaliytv/patch-1
#19 Branches that contain # causes the action to fail
2 parents 0f42444 + 3143881 commit 7f6712d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_deletable_branches(self, last_commit_age_days: int, ignore_branches: lis
8989
def delete_branches(self, branches: list) -> None:
9090
for branch in branches:
9191
print(f'Deleting branch `{branch}`...')
92-
url = f'{self.github_base_url}/repos/{self.github_repo}/git/refs/heads/{branch}'
92+
url = f'{self.github_base_url}/repos/{self.github_repo}/git/refs/heads/{branch.replace("#", "%23")}'
9393

9494
response = requests.request(method='DELETE', url=url, headers=self.make_headers())
9595
if response.status_code != 204:

0 commit comments

Comments
 (0)