File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 2323 - name : Update pre-commit config packages
2424 uses : technote-space/create-pr-action@v2
2525 with :
26- GITHUB_TOKEN : ${{ secrets.ACTION_TRIGGER_TOKEN }}
26+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2727 EXECUTE_COMMANDS : |
2828 pip install pre-commit
2929 pre-commit autoupdate || (exit 0);
Original file line number Diff line number Diff line change 1+ name : Comment-bot
2+
3+ on :
4+ issue_comment :
5+ types :
6+ - created
7+ - edited
8+
9+ jobs :
10+ autotune :
11+ name : " Fixup pre-commit formatting"
12+ if : startsWith(github.event.comment.body, '@github-actions pre-commit')
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v2
16+ - uses : r-lib/actions/pr-fetch@master
17+ with :
18+ repo-token : ${{ secrets.GITHUB_TOKEN }}
19+ - name : Cache multiple paths
20+ uses : actions/cache@v2
21+ with :
22+ path : |
23+ ~/.cache/pre-commit
24+ ~/.cache/pip
25+ key : pre-commit-dispatched-${{ runner.os }}-build
26+ - uses : actions/setup-python@v2
27+ with :
28+ python-version : 3.8
29+ - name : Install-pre-commit
30+ run : python -m pip install --upgrade pre-commit
31+ - name : Run pre-commit
32+ run : pre-commit run --all-files || (exit 0)
33+ - name : Commit results
34+ run : |
35+ git config user.name "$(git log -1 --pretty=format:%an)"
36+ git config user.email "$(git log -1 --pretty=format:%ae)"
37+ git commit -a -m 'Fixes from pre-commit [automated commit]' || echo "No changes to commit"
38+ - uses : r-lib/actions/pr-push@master
39+ with :
40+ repo-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments