File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Auto Format Code
2+
3+ on : push
4+
5+ jobs :
6+ lint :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v4
10+ - uses : actions/setup-python@v5.4.0
11+ with :
12+ python-version : " 3.13"
13+ architecture : " x64"
14+ - name : install packages
15+ run : pip install black[jupyter] autopep8 isort
16+ - name : Auto format code
17+ run : |
18+ black .
19+ autopep8 --recursive --in-place --aggressive --aggressive .
20+ isort .
21+ - name : Get branch name
22+ run : |
23+ branch_name="${{ github.head_ref }}"
24+ echo "Branch name is ${branch_name}"
25+ echo "Branch name is ${{ github.event.pull_request.title }}"
26+ - name : Create Pull Request
27+ uses : peter-evans/create-pull-request@v7.0.6
28+ env :
29+ TITLE : ${{ github.event.pull_request.title }}
30+ with :
31+ token : ${{ secrets.ROCM_BLOG_PAT }}
32+ commit-message : Auto Code Format
33+ author : ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
34+ title : Black Auto format for ${{ env.TITLE }}
35+ body : Auto-Generated Pull Request
36+ reviewers : " Saad Rahim (AMD) <44449863+saadrahim@users.noreply.github.com>"
37+ maintainer-can-modify : true
38+ labels : Backend
39+ branch : python-code-format${{ github.event.pull_request.number }}
40+
You can’t perform that action at this time.
0 commit comments