From 3c45dce1ac716ad9f783b0e22c0cae580c803bd1 Mon Sep 17 00:00:00 2001 From: Conrad Date: Thu, 14 Nov 2019 23:59:22 +0100 Subject: [PATCH] Update README.md --- README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0603088..2f7e50c 100644 --- a/README.md +++ b/README.md @@ -1 +1,50 @@ -# action_autopep8 \ No newline at end of file +# GitHub autopep8 Action + +This action uses the newly released GitHub action to automatically restyle your Python code according to [PEP-8](https://www.python.org/dev/peps/pep-0008/) using [autopep8](https://github.com/hhatto/autopep8). + +## Usage +### Parameters +The following parameters can be used in your custom action configuration. + +| Parameter | Required | Default | Description | +| - | - | - | - | +| commit_message | :x: | 'Adjusted files for PEP-8 compliance' | Custom git commit message| +| commit_options | :x: | '*' | Custom git commit options| +| file_pattern | :x: | '.' | Custom file pattern for `git add`| +| dependencies | :x: | 'false' | Path for the repositories 'requirements.txt'. If you have none, you may skip this.| +| branch | :white_check_mark: | - | The specific branch you want to merge into. Use ${{ github.head_ref }} if you want to use this with pull requests.| + +### Example + +This is a simple usage example of this script: + +``` +name: Autopep 8 + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - uses: creyD/action_autopep8@master + with: + dependencies: 'requirements.txt' + branch: ${{ github.head_ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +``` + +## Issues + +Please report all bugs and feature request using the [GitHub issues function](https://github.com/creyD/action_autopep8/issues/new). + +## Special Thanks + +- Hideo Hattori [(GitHub)](https://github.com/hhatto) for creating and maintaining autopep8 +- Stefan Zweifel [(GitHub)](https://github.com/stefanzweifel) for providing an action to commit and push a git change