Skip to content

Commit

Permalink
Disable auto-commits
Browse files Browse the repository at this point in the history
Disable auto commits until the unicode styling issues have been fixed.

Signed-off-by: cicdguy <[email protected]>
  • Loading branch information
cicdguy authored May 6, 2024
1 parent 8c74959 commit ad4953a
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ jobs:
ext %in% c("R", "Rmd", "Rnw", "Rmarkdown", "qmd")
}
changed_r_files <- Filter(is_r_file, changed_files)
dry <- if(isTRUE(as.logical("${{ inputs.auto-update }}"))) "off" else "on"
# TODO: Re-enable after styler unicode issues are fixed
#dry <- if(isTRUE(as.logical("${{ inputs.auto-update }}"))) "off" else "on"
dry <- "on"
detect <- styler::style_file(changed_r_files, dry = dry)
if (TRUE %in% detect$changed) {
problems <- subset(detect$file, detect$changed == T)
Expand Down Expand Up @@ -153,23 +155,24 @@ jobs:
echo "unstyled-files=$(cat /tmp/style-problems.txt)" >> $GITHUB_OUTPUT
shell: bash

- name: Autocommit styled files ↗️
id: autocommit-styled-files
if: >
inputs.auto-update
&& steps.check_files.outputs.files_exists == 'true'
run: |
git config --global user.name 'github-actions'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config pull.rebase false
git pull origin ${{ steps.branch-name.outputs.head_ref_branch }} || true
git add ${{ steps.problem-files.outputs.unstyled-files }}
git commit -m '[skip style] [skip vbump] Restyle files'
git push -v origin HEAD:${{ steps.branch-name.outputs.head_ref_branch }} || \
echo "⚠️ Could not push to ${BRANCH_NAME} on $(git remote -v show -n origin | grep Push)"
shell: bash
working-directory: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}
continue-on-error: true
# TODO: Re-enable after styler unicode issues are fixed
#- name: Autocommit styled files ↗️
# id: autocommit-styled-files
# if: >
# inputs.auto-update
# && steps.check_files.outputs.files_exists == 'true'
# run: |
# git config --global user.name 'github-actions'
# git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
# git config pull.rebase false
# git pull origin ${{ steps.branch-name.outputs.head_ref_branch }} || true
# git add ${{ steps.problem-files.outputs.unstyled-files }}
# git commit -m '[skip style] [skip vbump] Restyle files'
# git push -v origin HEAD:${{ steps.branch-name.outputs.head_ref_branch }} || \
# echo "⚠️ Could not push to ${BRANCH_NAME} on $(git remote -v show -n origin | grep Push)"
# shell: bash
# working-directory: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}
# continue-on-error: true

- name: Styler check summary 🅾
if: >
Expand Down

0 comments on commit ad4953a

Please sign in to comment.