Skip to content

Commit

Permalink
workflows/clean-up-closed-prs: don't try to delete branch if PR is fr…
Browse files Browse the repository at this point in the history
…om fork

Otherwise you can delete a branch from this repo with a PR opened from
a fork's branch with the same name.
  • Loading branch information
ZhongRuoyu committed Aug 6, 2024
1 parent b846376 commit 3822096
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/clean-up-closed-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
delete-branch:
if: >
github.repository_owner == 'Homebrew' &&
github.event.pull_request.head.repo.full_name == github.repository &&
!github.event.pull_request.merged
runs-on: ubuntu-latest
# Ignore errors as branch may already be deleted
Expand Down

0 comments on commit 3822096

Please sign in to comment.