Skip to content

Bump aiohttp from 3.9.5 to 3.10.1 (#62) #367

Bump aiohttp from 3.9.5 to 3.10.1 (#62)

Bump aiohttp from 3.9.5 to 3.10.1 (#62) #367

Workflow file for this run

name: Reformat code
on:
push:
branches:
- main
jobs:
reformat:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.Action_WRITE_Access_Key }}
fetch-depth: 0
- uses: remarkablemark/sync-branch@v1
with:
base: auto-reformat
head: main
continue-on-error: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install --requirement requirements.txt
pip install autopep8
pip install git+https://github.com/psf/black
pip install reorder-python-imports
- name: Create log files
run: |
mkdir ref-logs
touch ref-logs/autopep8-reformat.txt
touch ref-logs/black-reformat.txt
touch ref-logs/imports-reorder.txt
echo LOGFILE_NAME="logs-$(python3 -V | cut -c 8-)" >> $GITHUB_ENV
- name: Imports reordering
run: |
for f in $(git ls-files '*.py'); do
echo "Reordering imports in " $f >> ref-logs/imports-reorder.txt
reorder-python-imports $f || true >> ref-logs/imports-reorder.txt
done
- name: AutoPEP8 code reformatting
run: |
for f in $(git ls-files '*.py'); do
echo "Reformatting" $f >> ref-logs/autopep8-reformat.txt
autopep8 -i $f >> ref-logs/autopep8-reformat.txt
done
- name: Black code reformatting
run: |
for f in $(git ls-files '*.py'); do
echo "Reformatting" $f >> ref-logs/black-reformat.txt
python -m black $f >> ref-logs/black-reformat.txt
done
- uses: actions/upload-artifact@v4
with:
name: ${{env.LOGFILE_NAME}}
path: ref-logs/
- name: Remove log files
run: |
rm -r ref-logs
- name: Create or update PR
uses: gr2m/create-or-update-pull-request-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: "Automatic reformat PR"
body: "Generated by github actions workflow. Automatically updated by same workflow. Do not push to the branch."
commit-message: "Apply automatic reformat"
author: "googer <googer@mindurka.fun>"
branch: "auto-reformat"