Skip to content

Commit 4a1d078

Browse files
committed
Limit the auto-style push to master
It probably doesn't need to run for topic branches created by dependabot, and it's also likely annoying in stable branches like ruby_X_Y too.
1 parent 9b5eb82 commit 4a1d078

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/check_misc.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@ jobs:
3232
- name: Auto-correct code styles
3333
run: |
3434
set -x
35-
ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" "$PUSH_REF"
35+
ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" refs/heads/master
3636
env:
3737
GITHUB_OLD_SHA: ${{ github.event.before }}
3838
GITHUB_NEW_SHA: ${{ github.event.after }}
3939
GIT_AUTHOR_NAME: git
4040
GIT_COMMITTER_NAME: git
4141
42-
PUSH_REF: ${{ github.ref }}
43-
if: ${{ github.repository == 'ruby/ruby' && github.event_name == 'push' }}
42+
if: ${{ github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
4443
- name: Check for code styles
4544
run: |
4645
set -x

0 commit comments

Comments
 (0)