-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix on pull request: nothing to commit, working tree clean #98
Comments
My name: Format check on pull request
on: pull_request
jobs:
dotnet-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Add dotnet-format problem matcher
uses: xt0rted/dotnet-format-problem-matcher@v1
- name: Restore dotnet tools
uses: xt0rted/dotnet-tool-restore@v1
- name: Run dotnet format
id: format
uses: xt0rted/dotnet-format@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
action: "fix"
only-changed-files: true
- name: Commit files
if: steps.format.outputs.has-changes == 'true'
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -a -m 'Automated dotnet-format update
Co-authored-by: ${{ github.event.pull_request.user.login }} <${{ github.event.pull_request.user.id }}+${{ github.event.pull_request.user.login }}@users.noreply.github.com>'
- name: Push changes
if: steps.format.outputs.has-changes == 'true'
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }} ordering is different to here because we now use the |
All working if I change line 20 to |
Is there a way to run with |
@Hona I'm working on a new release that adds support for dotnet-format v4 and v5 which will include these new options. I'm expecting to release it sometime this week. |
I am seeing similar to the
nothing to commit, working tree clean
issue here: #10 (comment), and it does not seem to be due to line-ending settingsI made a PR, with the config file similar to given there, and also added extra spaces to a code file, so that the format would have something to fix.
The result is that it is formatted on the
format
step,and this is followed by "nothing to commit, working tree clean" at the
commit
stepThe text was updated successfully, but these errors were encountered: