Skip to content

Commit

Permalink
Fix: Prevent pre-commit from running on merged pull requests
Browse files Browse the repository at this point in the history
This change ensures that the pre-commit workflow only runs on pushes to the repository when the associated pull request has not been merged yet. This prevents unnecessary execution of the workflow on merged PRs, improving efficiency and reducing resource consumption.
  • Loading branch information
RedAtman committed Jul 19, 2024
1 parent 3e6fed2 commit 424046c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
pre-commit:
if: github.event_name == 'push'
if: github.event_name == 'push' && github.event.pull_request.merged == false
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit 424046c

Please sign in to comment.