Add option to edit help text #530
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Yapf-ify this PR | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
- 'master' | |
push: | |
branches: | |
- 'main' | |
- 'master' | |
- 'releases/**' | |
jobs: | |
autoyapf: | |
runs-on: ubuntu-latest | |
steps: | |
- if: github.event_name != 'pull_request' | |
uses: actions/checkout@v3 | |
- if: github.event_name == 'pull_request' | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: autoyapf | |
id: autoyapf | |
uses: mritunjaysharma394/autoyapf@v2 | |
with: | |
args: --parallel --recursive --in-place . | |
- name: Check for modified files | |
id: git-check | |
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) | |
- name: Push changes | |
if: steps.git-check.outputs.modified == 'true' | |
continue-on-error: true | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email 'github-actions@github.com' | |
git commit -am "Automated autoyapf fixes" | |
git push |